Training control method, device and system
By introducing the data service module into large model training to manage the consumption progress of training data and dynamically append the mechanism, the problem of data loss and time overhead caused by unstable training environment is solved, and the effect and efficiency of model training are improved.
Patent Information
- Application Number
- CN202410931345.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-10-11
AI Technical Summary
During the training of large models, unstable training environments or system failures may cause training to exit or be interrupted, resulting in huge resource overhead for models and training data. In addition, newly generated training data in long-cycle training scenarios cannot be dynamically appended, affecting the model training effect and Time overhead.
Introduce a data service module to manage training data, reduce training data loss through consumption progress management and dynamic addition mechanisms, improve model training effects, and achieve dynamic addition of training data without restarting training.
It achieves training data consumption management with a smaller granularity than files, reduces training data loss, improves model training effects, and reduces training time overhead caused by appending new data, making the training framework capable of continuous training.
Smart Images

Figure CN118761482A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computers, and in particular to a training control method, a training control device, and a training control system. Background Art
[0002] During the training of a large model, training may be terminated or interrupted due to abnormalities such as unstable training environment or system failure. When restarting the training, the model needs to be reloaded and the pre-specified training data needs to be read. If the model is large or the training data set is large, it will undoubtedly bring huge resource overhead.
[0003] Related technologies use checkpoints to save model parameters and read training file indexes, and resume training based on the information saved in the checkpoints. Summary of the invention
[0004] In the related art, on the one hand, if the index of the training file being read when the exception occurs has been saved to the checkpoint, after reloading the checkpoint, the next training file of the training file recorded in the checkpoint is read and training continues. If the training file being read when the exception occurs is relatively large, more training data will be lost, affecting the training effect of the model.
[0005] In related technologies, on the other hand, before the model training task starts, the training data is pre-specified, and the pre-specified training data will be read when the training starts or continues. However, in some long-term training scenarios, new training data may be generated while the model is training, but these new training data cannot be appended to the existing training tasks. To use these new training data, you need to restart the training, reload the checkpoint, and re-read the new training data set. Since the trained models are usually large, loading the checkpoint takes a long time, and the time-consuming training task startup itself will increase the training time overhead.
[0006] The disclosed embodiment of the present invention adds a data service module for managing training data. The data service module manages the consumption progress or update of the training files of the model training task during the training process, thereby enhancing the management of the training data during the training process. On the one hand, it implements the consumption management of training data with a smaller granularity than files, reduces the training data lost due to abnormal interruptions in training, and improves the training effect of the model. On the other hand, it implements dynamic append management of training data without restarting the training, so that the training framework has the ability to conduct continuous training and reduces the training time overhead caused by appending new training data.
[0007] Some embodiments of the present disclosure propose a training control method, which is applied to a data service module, including: determining training data for a model training task, wherein the training data includes one or more training files; processing the consumption progress or update of the training files of the model training task during the training process; and providing a distribution service for the training data of the model training task to a training node device based on the processing result.
[0008] In some embodiments, processing the consumption progress of the training file of the model training task during the training process includes: sending the training file to the training node device; receiving the consumption progress information of the training file sent by the training node device during the training process; and saving the consumption progress information of the training file.
[0009] In some embodiments, the distribution service of the training data of the model training task provided to the training node device includes: in response to a request for recovering training data sent by the training node device, sending unconsumed file data in the training file to the training node device based on the consumption progress information of the saved training file.
[0010] In some embodiments, receiving the consumption progress information of the training file sent by the training node device during the training process includes: receiving the consumption offset information of the file data of the training file currently consumed and sent by the training node device each time the file data of a preset batch size is consumed during the training process, wherein the consumption offset information uses the preset batch size as the offset granularity and is used to characterize the consumption progress information of the training file.
[0011] In some embodiments, receiving the consumption progress information of the training files sent by the training node device during the training process includes: receiving the consumption progress information of the training files corresponding to each consumption thread of the training node device sent by the training node device during the training process; saving the consumption progress information of the training files includes: using the consumption queue of the training node device to save the consumption progress information of the training files corresponding to each consumption thread.
[0012] In some embodiments, the distribution service of the training data of the model training task provided to the training node device includes: responding to the request of the training node device to recover the training data, sending the unconsumed file data in the training files corresponding to each consumer thread to the training node device based on the consumption progress information of the training files corresponding to each consumer thread saved in the training node device.
[0013] In some embodiments, processing updates of the training files of the model training task during the training process includes: receiving a request for appending a new training file sent during the training process, and appending the new training file to a distribution queue of the training files of the model training task.
[0014] In some embodiments, providing a distribution service of training data of the model training task to the training node device includes: sending the new training file to the training node device according to the distribution queue.
[0015] In some embodiments, it also includes: after receiving a checkpoint save request, determining that all training files of the current pre-fetch thread of all training node devices have been downloaded and all training files of the current consumption thread have been consumed, and then saving the current training model parameters to the checkpoint.
[0016] Some embodiments of the present disclosure propose a training control method, which is applied to a training node device, including: obtaining a training file of a model training task from a data service module; and sending consumption progress information of the training file to the data service module during the training process.
[0017] In some embodiments, it also includes: sending a request to the data service module to recover the training data; receiving the unconsumed file data in the training file sent by the data service module according to the consumption progress information of the training file.
[0018] In some embodiments, sending the consumption progress information of the training file to the data service module during the training process includes: during the training process, each time file data of a preset batch size is consumed, sending the consumption offset information of the file data of the training file currently consumed to the data service module, the consumption offset information uses the preset batch size as the offset granularity, and is used to characterize the consumption progress information of the training file.
[0019] In some embodiments, sending the consumption progress information of the training file to the data service module during the training process includes: sending the consumption progress information of the training file corresponding to each consumption thread to the data service module during the training process.
[0020] In some embodiments, it also includes: sending a request to the data service module to recover the training data; receiving the unconsumed file data in the training files corresponding to each consumer thread and sent by the data service module according to the consumption progress information of the training files corresponding to each consumer thread.
[0021] Some embodiments of the present disclosure propose a training control method, comprising: sending a request to a data service module to append a new training file during a training process, so as to instruct the data service module to append the new training file to a distribution queue of training files of a model training task; and receiving, during a training process, the new training file sent by the data service module based on the distribution queue by a training node device.
[0022] Some embodiments of the present disclosure provide a training control device, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute a training control method based on instructions stored in the memory.
[0023] Some embodiments of the present disclosure provide a training control system, including: a data service module, configured to execute a training control method on the data service module side; and a training node device, configured to execute the training control method on the training node device side.
[0024] Some embodiments of the present disclosure provide a computer-readable storage medium having a computer program stored thereon, which implements the steps of a training control method when the computer program is executed by a processor.
[0025] Some embodiments of the present disclosure provide a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, the steps of the training control method are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. The present disclosure can be more clearly understood according to the following detailed description with reference to the drawings.
[0027] Obviously, the drawings described below are only some embodiments of the present disclosure, and a person skilled in the art can obtain other drawings based on these drawings without creative work.
[0028] Figure 1 A schematic diagram showing a training control system according to some embodiments of the present disclosure.
[0029] Figure 2 A schematic diagram showing a training control method according to some embodiments of the present disclosure.
[0030] Figure 3 A schematic diagram showing a training control method according to some embodiments of the present disclosure.
[0031] Figure 4 Shows Figure 3 A schematic diagram of a computer-implemented training control method of an embodiment.
[0032] Figure 5 Shows Figure 3 A schematic diagram of a training control method for multi-threaded parallel consumption according to an embodiment.
[0033] Figure 6 A schematic diagram showing a training control method according to some embodiments of the present disclosure.
[0034] Figure 7 A schematic diagram showing the distribution of training files and dynamic distribution of training files according to some embodiments of the present disclosure.
[0035] Figure 8 A schematic diagram showing a training node device for dynamic distribution of training files according to some embodiments of the present disclosure.
[0036] Fig. 9 A schematic diagram showing the structure of a training control device according to some embodiments of the present disclosure. DETAILED DESCRIPTION
[0037] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
[0038] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.
[0039] It should also be understood that in the embodiments of the present disclosure, “plurality” may refer to two or more than two, and “at least one” may refer to one, two, or more than two.
[0040] It should also be understood that any component, data or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0041] In addition, the term "and / or" in the present disclosure is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present disclosure generally indicates that the associated objects before and after are in an "or" relationship.
[0042] It should also be understood that the description of the various embodiments in the present disclosure focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0043] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0044] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0045] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0046] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0047] In addition, in order to avoid obscuring the present disclosure due to unnecessary details, only the processing steps and / or device structures closely related to at least the scheme according to the present disclosure are shown in the drawings, and other details that are not closely related to the present disclosure are omitted. It should also be noted that similar reference numerals and letters in the drawings indicate similar items, and therefore once an item is defined in one drawing, it does not need to be discussed again for subsequent drawings.
[0048] Figure 1 A schematic diagram showing a training control system according to some embodiments of the present disclosure.
[0049] like Figure 1 As shown, the training control system 100 of this embodiment includes: a data service module 110 and a training node device 120. Among them, the data service module 110 is the server end of the training data service, and the training node device 120 is the client end of the training data service. The data service module 110 is a module or functional block that implements the training data management and distribution service, for example, it can be set on the server. A data service module 110 can provide one or more training node devices 120 with services such as management and distribution of training data during the training process.
[0050] In the disclosed embodiment, a data service module for managing training data is newly added. The data service module manages the consumption progress information or update information of the training files of the model training tasks of each training node device during the training process, thereby enhancing the management of the training data during the training process.
[0051] Figure 2 A schematic diagram showing a training control method according to some embodiments of the present disclosure.
[0052] like Figure 2 As shown, the training control method of this embodiment includes steps 210-230.
[0053] In step 210 , the data service module determines the training data for the model training task, where the training data includes one or more training files.
[0054] The training data of a model training task may include one or more training files, and usually, multiple training files. The sizes of different training files may be different, and a training file with a larger size includes more file data than a training file with a smaller size.
[0055] The data service module can pre-import all training files of the model training task according to the user's configuration.
[0056] In step 220, the data service module processes the consumption progress or update of the training files of the model training task during the training process to manage the consumption progress information or update information of the training files of the model training task during the training process.
[0057] The training file consumption progress information, also called training consumption progress information, is used to indicate the file data that has been consumed in the training file that the training node device is consuming during the model training process. Therefore, according to the consumption progress information, it is possible to know which file data in the training file has been consumed by the training and which has not been consumed by the training during the training process.
[0058] The update information of the training file is used to indicate the changes of the training file of the model training task during the training process, for example, the training file of the model training task is appended during the training process. The data service module can append the new training file to the distribution queue of the training file of the model training task.
[0059] In step 230, the data service module provides a distribution service of the training data of the model training task to the training node device based on the processing result.
[0060] For example, when resuming training after an abnormal interruption, the data service module responds to the request for resuming training data sent by the training node device, skips the file data in the training file that has been consumed by the training node device according to the consumption progress information of the saved training file, and sends the file data in the training file that has not been consumed by the training node device to the training node device.
[0061] For example, during the training process, a new training file is added to the distribution queue of the training file of the model training task, and the data service module sends the new training file to the training node device according to the training file recorded in the distribution queue. Thus, the dynamic update and distribution of training data is realized during the training process.
[0062] The disclosed embodiment of the present invention adds a data service module for managing training data. The data service module manages the consumption progress or update of the training files of the model training task during the training process, thereby enhancing the management of the training data during the training process. On the one hand, it implements the consumption management of training data with a smaller granularity than files, reduces the training data lost due to abnormal interruptions in training, and improves the training effect of the model. On the other hand, it implements dynamic append management of training data without restarting the training, so that the training framework has the ability to conduct continuous training and reduces the training time overhead caused by appending new training data.
[0063] Figure 3 A schematic diagram of a training control method according to some embodiments of the present disclosure is shown. This embodiment can implement consumption management of training data with a granularity smaller than that of a file.
[0064] like Figure 3 As shown, the training control method of this embodiment includes steps 310-350.
[0065] In step 310 , the data service module determines the training data for the model training task, where the training data includes one or more training files.
[0066] The data service module can pre-import all training files of the model training task according to the user's configuration.
[0067] In step 320, the data service module sends the training file of the model training task to the training node device, and correspondingly, the training node device obtains the training file of the model training task.
[0068] In step 330, the training node device sends the consumption progress information of the training file to the data service module in real time during the training process, and the data service module receives the consumption progress information of the training file sent by the training node device during the training process.
[0069] After obtaining the information of the training file (such as the training file name) from the data service module, the training node device uses the pre-fetch thread to read the training file into the cache, and then uses the consumer thread to obtain the data of the training file from the cache for training consumption, and sends the consumption progress of the file data in the training file to the data service module.
[0070] During the training process, the training node device can send the consumption offset information of the file data of the training file currently consumed to the data service module every time the file data of the preset batch size is consumed. The consumption offset information uses the preset batch size as the offset granularity and is used to characterize the consumption progress information of the training file. This controls the number of times the training node device reports the consumption progress to the data service module. The preset batch size can be pre-set, and is usually set to a value smaller than the size of a general training file.
[0071] The training node device can set one or more consumption threads for a model training task, and different consumption threads can correspond to different training files of the model training task. The training node device sends the consumption progress information of the training files corresponding to each consumption thread to the data service module during the training process. The data service module receives the consumption progress information of the training files corresponding to each consumption thread of the training node device sent by the training node device during the training process. Thus, the reporting and storage of the consumption progress information of multiple training files is realized based on multi-threading.
[0072] In step 340, the data service module saves the consumption progress information of the training file.
[0073] The data service module can set a consumption queue for each training node device to record the consumption progress information of the training files corresponding to each consumption thread of the training node device.
[0074] The data service module uses the consumption queue corresponding to the training node device to save the consumption progress information of the training files corresponding to each consumption thread of the training node device. Thus, based on the consumption queue, the consumption progress information of multiple training files can be managed.
[0075] In step 350, the training node device sends a request to the data service module to recover the training data. The data service module responds to the request to recover the training data sent by the training node device and, based on the saved consumption progress information of the training file, sends the unconsumed file data in the training file to the training node device. The training node device receives the unconsumed file data in the training file sent by the data service module based on the consumption progress information of the training file.
[0076] The data service module responds to the request for restoring training data sent by the training node device, determines the unconsumed training files and the consumption progress according to the saved consumption progress information of the training files, skips the file data in the training files that have been consumed by the training node device, and sends the unconsumed file data in the training files to the training node device. Thus, the unconsumed file data in the training files are restored.
[0077] The data service module responds to the request of the training node device to restore the training data, determines the unconsumed training files and the consumption progress according to the saved consumption progress information of the training files corresponding to the consumption threads of the training node device, skips the file data consumed by the training node device in the training files corresponding to the consumption threads, and sends the file data not consumed by the training node device in the training files corresponding to the consumption threads to the training node device. Thus, the unconsumed file data in multiple training files are restored at the same time.
[0078] According to the solutions of the related technology, after the training is abnormally interrupted, the training data at the granularity of the training file may be lost, which greatly affects the training effect of the model; according to the solution of this embodiment, the consumption management of training data with a granularity smaller than the file (batch size granularity, the preset batch size is smaller than the training file size) is implemented, reducing the training data lost due to the abnormal interruption of training and improving the training effect of the model.
[0079] Figure 4 Shows Figure 3 A schematic diagram of a computer-implemented training control method of an embodiment. Figure 4 As shown in the figure, three RPCs (Remote Procedure Calls) are set up in the training node device, including: Register RPC, Fetch RPC, and Commit RPC. RPC (or rpc) is a computer communication protocol used to implement inter-thread communication in a distributed system. It allows one thread to call a function or method in another thread through the network, just like a local call. RPC requests usually use a client-server model, in which the client sends a request to the server and waits for a response. The training node device sends a registration request to the data service module through the Register RPC; after successful registration, the training node device applies to the data service module for obtaining training files for model training through the Get RPC; during the model training process, the training node device sends the consumption progress information of the training file to the data service module through the Submit RPC. The data service module starts an RPC processing thread to uniformly process various RPC requests sent by the training node device, for example, responding to the registration request, distributing training files, and recording the consumption progress information of the training files.
[0080] Figure 5 Shows Figure 3 Schematic diagram of a multi-threaded parallel consumption training control method of an embodiment. Figure 5As shown in part (a) of the figure, the training node device has multiple threads for parallel consumption. The figure shows n threads for parallel consumption as an example. Each thread can report the consumption progress of the training file to the data service module. The data service module sets a consumption queue for each training node device to record the consumption progress information of the training file corresponding to each thread of the training node device. Figure 5 As shown in part (b), it is assumed that the model training task involves 8 training files, which are marked as f1~f8 respectively. The training node device is assumed to have 4 parallel consumption threads, and the training files f1~f4 have been consumed, and the training files f5~f8 are being consumed. The consumption offsets of the file data of each training file f5~f8 are 5, 3, 10, and 6 respectively. The training node device reports the consumption offsets of the training files f5~f8 being consumed to the data service module. The data service module records the training files consumed by the 4 threads of the training node device and their consumption offsets into the consumption queue, where f represents the training file and offset represents the consumption offset. If training is abnormally interrupted at this time, the training node device requests to restore the training data. The data service module skips the training files f1~f4 that have been consumed according to the consumption progress information of each training file saved, and skips the file data f5:1~5, f6:1~3, f7:1~10, f8:1~6 that have been consumed in the training files f5~f8, and sends the unconsumed file data in the training files f5~f8 (i.e., f5: file data after consumption offset 5, f6: file data after consumption offset 3, f7: file data after consumption offset 10, f8: file data after consumption offset 6) to the training node device. This realizes the consumption management of training data with a smaller granularity than files, and reduces the training data lost due to abnormal training interruption.
[0081] The data service module can set distribution status queue, consumption queue, completion queue, etc. to control the status of training files. After receiving the training data request from the training node device, the data service module sends the training files in the distribution queue to the training node device and puts them into the distribution status queue. When the training file is distributed and begins to be consumed, the data service module receives the consumption progress information, deletes the training file from the distribution status queue, and puts it into the consumption queue. When the training file is consumed by the training node device and receives the end information sent by the training node device, the data service module deletes the training file from the consumption queue and puts it into the completion queue.
[0082] Figure 6 A schematic diagram of a training control method of some embodiments of the present disclosure is shown. The dynamic file distribution function of this embodiment enables the training framework to have continuous training capabilities, and can achieve dynamic additional management of training data without restarting the training, so that the training framework has continuous training capabilities.
[0083] like Figure 6 As shown, the training control method of this embodiment includes one or more of step 610, step 620, and step 630.
[0084] In step 610, the data service module receives a request for adding a new training file sent during the training process, and adds the new training file to a distribution queue of training files of the model training task.
[0085] The data service module receives the request for adding new training files from the sending end in real time, and puts the new training files into the distribution queue to achieve uninterrupted training. The sending end includes, for example, but is not limited to, a training node device or other external node devices.
[0086] In step 620, the data service module sends the new training file to the training node device according to the distribution queue.
[0087] Figure 7 A schematic diagram showing the distribution of training files and dynamic distribution of training files according to some embodiments of the present disclosure.
[0088] like Figure 7 As shown in the figure, the training file distribution is realized through the file list (File_list) and the generator operator (Tensorslice). Among them, the file list (File_list) records the various training files pre-specified before the training starts. The generator operator (Tensorslice) traverses the file list (File_list), generates the training files to be distributed, and sends them to the training node. In this way, the training file distribution is realized.
[0089] like Figure 7 As shown, dynamic distribution of training files is achieved through the data update service module and the data distribution operator. A separate thread is opened in the data service module to receive and process requests for appending new training files, which is named the data update service module. In the data update service module, the first processing function (append handler) for requests to append new training files, the second processing function (terminate handler) for requests to stop appending new training files, the registration function (Generator Call) of the generator operator (Generator), and the distribution status queue and the consumption status queue are set. The data distribution operator (DispatcherDataset) responsible for the distribution of training files contains a service RPC for receiving training file requests from training node devices.
[0090] The dynamic distribution process of training files includes, for example: the processing function (appendhandler) of the request to append new training files responds to the request to append new training files sent by the training node device through the append RPC (append RPC), and appends the new training files to the distribution queue of the training files of the model training task; the processing function (terminate handler) of the request to stop appending new training files responds to the request to stop appending new training files sent by the training node device through the stop RPC (terminate RPC), and stops appending new training files. Thus, the dynamic appending of new training files is completed. When the data distribution operator (DispatcherDataset) receives the training file request from the training node device, it triggers the iteration of the generator operator (Generator), and the generator operator (Generator) traverses the distribution queue (including the original training files and the new training files added), generates the training files that need to be distributed (that is, the training files that have not been distributed (such as the new training files added), and the training files that have been distributed can be excluded), and sends them to the training node. Thus, the dynamic distribution of training files is realized.
[0091] Figure 8 A schematic diagram of a training node device for dynamically distributing training files in some embodiments of the present disclosure is shown. Figure 8 As shown, each training node device may include one or more pre-fetch threads and one or more consumption threads. The training node device uses the pre-fetch thread to read the training file into the cache, and the training node device uses the consumption thread to obtain the data of the training file from the cache for training consumption. For example, the training node devices 1-k include pre-fetch threads 1-n and consumption threads 1-m.
[0092] In step 630, after receiving the checkpoint save request, the data service module determines that the training files of the current pre-fetching threads of all training node devices have been downloaded and the training files of the current consuming threads have been consumed, and then saves the model parameters of the current training to the checkpoint.
[0093] Continuous training requires ensuring that the training file is trained before saving the checkpoint. The data service module maintains a distribution status queue and a consumption status queue for each training node device.
[0094] The distribution status queue is used to record the downloading status of each prefetch thread of each training node device. Its size is: the number of training node devices × the number of prefetch threads. Its initial value is, for example, 0, indicating that each prefetch thread of each training node device has not yet obtained the corresponding training file. When a message is received (from a training node device) indicating that a prefetch thread of a training node device has obtained the training file, the value of the corresponding position in the distribution status queue is set to 1, indicating that the prefetch thread of the training node device corresponding to the position has obtained the corresponding training file.
[0095] The consumption status queue is used to record the consumption status of each consumption thread of each training node device. Its size is: the number of training node devices × the number of consumption threads. Its initial value is, for example, 1, indicating that the training files corresponding to each consumption thread of each training node device still have file data to be consumed. When a message is received (from a training node device) indicating that a consumption thread of a training node device has consumed the file data of the training file, the value of the corresponding position in the consumption status queue is set to 0, for example, indicating that the consumption thread of the training node device corresponding to the position has consumed the file data of the corresponding training file.
[0096] When the data service module receives a checkpoint save request, it first checks the distribution status queue and the consumption status queue. If all values in the distribution status queue are 1 and all values in the consumption status queue are 0, it can be determined that the training files of the current pre-fetching threads of all training node devices have been downloaded and the training files of the current consumption threads have been consumed. Then, normal checkpoint save is performed, such as saving the currently trained model parameters to the checkpoint.
[0097] In addition, since the checkpoint save request in continuous training needs to be actively initiated by the training node device, it is usually completed by the master node device in the hook function. The master node device is, for example, a specified training node device. The last file in the distribution list can be left to the master node device to ensure that the hook function can be triggered, avoiding the situation where the checkpoint save request cannot be triggered because the master node device cannot allocate training files when the number of files is small.
[0098] According to the solution of related technology, new training data cannot be appended to the existing training task. In order to use these new training data, it is necessary to restart the training. Without restarting the training, the dynamic append management of training data is realized, so that the training framework has the ability of continuous training and reduces the training time overhead caused by appending new training data.
[0099] Fig. 9 A schematic diagram showing the structure of a training control device according to some embodiments of the present disclosure.
[0100] like Fig. 9 As shown, the training control device 900 of this embodiment includes: a memory 910 and a processor 920 coupled to the memory 910 , and the processor 920 is configured to execute the training control method in any of the aforementioned embodiments based on instructions stored in the memory 910 .
[0101] If the training control device 900 is set at the data service side, its processor 920 is configured to execute the training control method of the data service module. If the training control device 900 is set at the training node device, its processor 920 is configured to execute the training control method of the training node device.
[0102] The training control device 900 may further include an input / output interface 930 , a network interface 940 , a storage interface 950 , etc. These interfaces 930 , 940 , 950 , the memory 910 , and the processor 920 may be connected via a bus 960 , for example.
[0103] The memory 910 may include, for example, a system memory, a fixed non-volatile storage medium, etc. The system memory may store, for example, an operating system, an application program, a boot loader, and other programs.
[0104] The processor 920 may be implemented by a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistors and other discrete hardware components.
[0105] Among them, the input and output interface 930 provides a connection interface for input and output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 940 provides a connection interface for various networked devices. The storage interface 950 provides a connection interface for external storage devices such as SD cards and USB flash drives. The bus 960 can use any bus structure among a variety of bus structures. For example, the bus structure includes but is not limited to the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MCA) bus, and the Peripheral Component Interconnect (PCI) bus.
[0106] The embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and the steps of the training control method are implemented when the computer program is executed by a processor.
[0107] The embodiment of the present disclosure provides a computer program product, including a computer program, which implements the steps of the training control method when executed by a processor.
[0108] It should be noted that in the technical solution of this disclosure, the collection, collection, update, analysis, processing, use, transmission, storage and other aspects of the user personal information involved in the training data are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.
[0109] It should be understood by those skilled in the art that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present disclosure may take the form of a computer program product implemented on one or more (non-transient) computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, cloud storage, etc.) containing computer program code. A computer program product should be understood as a software product that implements its solution mainly through a computer program.
[0110] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0111] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0112] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0113] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.
Claims
1. A training control method, applied to a data service module, characterized in that: include: Determine training data for a model training task, wherein the training data includes one or more training files; Processing the consumption progress or update of the training files of the model training task during the training process; Based on the processing results, a distribution service of the training data of the model training task is provided to the training node device.
2. The training control method according to claim 1, characterized in that: Processing the consumption progress of the training file of the model training task during the training process includes: Sending a training file to the training node device; Receiving consumption progress information of the training file sent by the training node device during the training process; The consumption progress information of the training file is saved.
3. The training control method according to claim 2, characterized in that: The distribution service of providing the training data of the model training task to the training node device includes: In response to a request for restoring training data sent by the training node device, unconsumed file data in the training file is sent to the training node device according to the saved consumption progress information of the training file.
4. The training control method according to claim 2, characterized in that: Receiving the consumption progress information of the training file sent by the training node device during the training process includes: Receive the consumption offset information of the file data of the training file currently consumed by the training node device each time the file data of the preset batch size is consumed during the training process, wherein the consumption offset information uses the preset batch size as the offset granularity and is used to characterize the consumption progress information of the training file.
5. The training control method according to claim 2, characterized in that: Receiving the consumption progress information of the training file sent by the training node device during the training process includes: receiving the consumption progress information of the training file corresponding to each consumption thread of the training node device sent by the training node device during the training process; Saving the consumption progress information of the training file includes: using the consumption queue of the training node device to save the consumption progress information of the training file corresponding to each consumption thread.
6. The training control method according to claim 5, characterized in that: The distribution service of providing the training data of the model training task to the training node device includes: In response to the request of the training node device to recover the training data, the unconsumed file data in the training files corresponding to each consumer thread is sent to the training node device according to the consumption progress information of the training files corresponding to each consumer thread saved in the training node device.
7. The training control method according to claim 1, characterized in that: Processing the update of the training file of the model training task during the training process includes: A request for adding a new training file sent during the training process is received, and the new training file is added to a distribution queue of training files of the model training task.
8. The training control method according to claim 7, characterized in that: The distribution service of providing the training data of the model training task to the training node device includes: According to the distribution queue, the new training file is sent to the training node device.
9. The training control method according to claim 1, characterized in that: Also includes: After receiving the checkpoint save request, it is determined that the training files of the current pre-fetch thread of all training node devices have been downloaded and the training files of the current consumption thread have been consumed, and then the model parameters of the current training are saved to the checkpoint.
10. A training control method, applied to a training node device, characterized in that: include: Get the training files of the model training task from the data service module; During the training process, the consumption progress information of the training file is sent to the data service module.
11. The training control method according to claim 10, characterized in that: Also includes: Sending a request to the data service module to restore training data; Receive unconsumed file data in the training file sent by the data service module according to the consumption progress information of the training file.
12. The training control method according to claim 10, characterized in that: Sending the consumption progress information of the training file to the data service module during the training process includes: During the training process, each time file data of a preset batch size is consumed, consumption offset information of the file data of the training file currently being consumed is sent to the data service module. The consumption offset information uses the preset batch size as the offset granularity and is used to characterize the consumption progress information of the training file.
13. The training control method according to claim 10, characterized in that: Sending the consumption progress information of the training file to the data service module during the training process includes: During the training process, the consumption progress information of the training files corresponding to each consumption thread is sent to the data service module.
14. The training control method according to claim 13, characterized in that: Also includes: Sending a request to the data service module to restore training data; The data service module receives the consumption progress information of the training files corresponding to each consumption thread and the unconsumed file data in the training files corresponding to each consumption thread sent.
15. A training control method, characterized in that: include: During the training process, a request for appending a new training file is sent to the data service module to instruct the data service module to append the new training file to a distribution queue of training files of the model training task; During the training process, the training node device receives a new training file sent by the data service module based on the distribution queue.
16. A training control device, comprising: Memory; And a processor coupled to the memory, characterized in that the processor is configured to execute the training control method according to any one of claims 1-15 based on instructions stored in the memory.
17. A training control system, characterized in that: include: A data service module, configured to execute the training control method according to any one of claims 1 to 9; as well as A training node device, configured to execute the training control method described in any one of claims 10-15.
18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the training control method described in any one of claims 1 to 15 are implemented.
19. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the training control method described in any one of claims 1 to 15 are implemented.
