Model training method, device, electronic device and medium

By building a target training container and performing model training in it, the problems of high labor costs and low efficiency in the training process of existing models are solved, and automated model training is realized, reducing the computing resource requirements.

CN114549929BActive Publication Date: 2025-04-18BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210156947.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-21
Publication Date
2025-04-18
Estimated Expiration
2042-02-21

AI Technical Summary

Technical Problem

The existing model training process requires users to write a lot of code on the local side, resulting in high labor costs, low efficiency, and high requirements for computing resources, especially GPU hardware resources.

Method used

By building a target training container, using the algorithm code in the container for model training, and monitoring the training state to obtain model training results, an automated model training process is realized.

Benefits of technology

It reduces the labor cost required for model training, improves the efficiency of model training, and saves the computing resources on the local side of the user.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114549929B_ABST
    Figure CN114549929B_ABST
Patent Text Reader

Abstract

The present disclosure provides a model training method, device, electronic device and medium, which relate to the field of computer technology, especially to the technical fields of machine learning, container technology, cloud native technology, AI development, etc. The specific implementation scheme is: according to the target identification information of the model to be trained, a target training container corresponding to the model to be trained is constructed; the model to be trained is trained in the target training container, and the training status of the target training container is determined; the model training result is obtained according to the training status. The present disclosure achieves the effect of completing model training without the user having to write a large amount of code, reduces the labor cost required for model training, and improves the efficiency of model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, in particular to technical fields such as machine learning, container technology, cloud native technology, and AI development, and in particular to a model training method, device, electronic device, and medium. Background Art

[0002] Model training is the process of performing machine learning on a pre-prepared data set and ultimately producing a trained model. The model training process is relatively complex and involves preparing training data sets, iterative data training, implementing model files, and evaluating training results.

[0003] The current model training process requires users to write a lot of code on their local end. Summary of the invention

[0004] The present disclosure provides a method, an apparatus, an electronic device, and a medium for automatically training a model to be trained.

[0005] According to one aspect of the present disclosure, a model training method is provided, comprising:

[0006] Constructing a target training container corresponding to the model to be trained according to the target identification information of the model to be trained;

[0007] Training the model to be trained in the target training container, and determining a training state of the target training container;

[0008] The model training result is obtained according to the training status.

[0009] According to another aspect of the present disclosure, a model training device is provided, comprising:

[0010] A training container construction module, used to construct a target training container corresponding to the model to be trained according to the target identification information of the model to be trained;

[0011] A training state determination module, used to train the model to be trained in the target training container and determine the training state of the target training container;

[0012] The training result acquisition module is used to acquire the model training result according to the training state.

[0013] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to at least one processor; wherein,

[0016] The memory stores instructions that can be executed by at least one processor. The instructions are executed by at least one processor to enable the at least one processor to perform any method in the present disclosure.

[0017] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute any one of the methods in the present disclosure.

[0018] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and the computer program executes any one of the methods of the present disclosure when a processor is used.

[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0021] Figure 1 is a flowchart of some model training methods disclosed in embodiments of the present disclosure;

[0022] Figure 2A is a flowchart of other model training methods disclosed according to embodiments of the present disclosure;

[0023] Figure 2B It is a node diagram of some model training tasks disclosed in the embodiments of the present disclosure;

[0024] Figure 3 It is a schematic diagram of the structure of some model training devices disclosed in the embodiments of the present disclosure;

[0025] Figure 4 It is a block diagram of an electronic device used to implement the model training method disclosed in the embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0027] During the research and development process, the applicant discovered that the current model training process usually requires users to manually write training algorithm codes on their local end and execute the model training process on the local end. However, this traditional method requires users to pay a large labor cost, and the efficiency of model training is also low. At the same time, model training also has high requirements for computer hardware resources, especially GPU hardware resources. Therefore, if the user's local hardware resources are poor, the model training process cannot be successfully executed.

[0028] Figure 1 This is a flowchart of some model training methods disclosed in the embodiments of the present disclosure. This embodiment can be applied to the case of unsupervised model training. The method of this embodiment can be executed by the model training device disclosed in the embodiments of the present disclosure. The device can be implemented in software and / or hardware and can be integrated on any electronic device with computing capabilities.

[0029] like Figure 1 As shown, the model training method disclosed in this embodiment may include:

[0030] S101. Construct a target training container corresponding to the model to be trained according to the target identification information of the model to be trained.

[0031] Among them, the model to be trained represents the model that the user expects to train, and the target identification information of the model to be trained reflects the specific model type of the model to be trained. Optionally, the model ID (Identity Document) of the model to be trained is used as the target identification information, such as a face recognition model, a target detection model or a classification model, etc. This embodiment does not limit the specific model type of the model to be trained. The training container represents a container for model training, and the container represents a lightweight, portable and self-contained software packaging technology. Through the container, all applications can be placed in a software package called a "mirror". After other users get the "mirror", they can run all the programs and files contained in the "mirror" based on it. In this embodiment, the training container contains the mirror file of all algorithm codes involved in the model training process.

[0032] In one embodiment, the user operates the client to interact with the server for data, wherein the server in this embodiment is built based on the kubernetes cluster. The user first enters verification information in the client, such as an account number and password, and the client sends the verification information to the server, which authenticates the verification information. If the verification is successful, the server controls the client to display a list of models that the server can currently provide training services for in the display interface. The user selects at least one model in the model list as the model to be trained. The client responds to the user's selection operation, generates a model training request carrying the target identification information of the model to be trained, and then sends the model training request to the server.

[0033] The server parses the target identification information from the received model training request, matches it in the configuration parameter template according to the target identification information, determines the target configuration parameters that match the target identification information, and builds the target training container corresponding to the model to be trained based on the target configuration parameters. Among them, the target configuration parameters include but are not limited to version apiVersion, resource kind, metadata metadata and target state spec, etc. The version apiVersion contains the version information of the target training container, the resource kind defines the resource type of the target training container, the metadata metadata contains the resource name and namespace of the target training container, the target state spec defines the name of the target training container, the runtime image and the image pull strategy, and the image contains all the algorithm codes involved in training the model to be trained.

[0034] Exemplarily, assuming that the target identification information is "face recognition model", the server obtains the target configuration parameters that match the "face recognition model" in the configuration parameter template, and constructs a target training container corresponding to the "face recognition model" based on the target configuration parameters.

[0035] By constructing a target training container corresponding to the model to be trained according to the target identification information of the model to be trained, a data foundation is laid for subsequent model training based on the target training container.

[0036] S102: Train the model to be trained in the target training container, and determine the training state of the target training container.

[0037] In one embodiment, the model training request also includes a compressed package of training data required for model training. The server parses the compressed package from the model training request and decompresses it to obtain the training data. The server imports the training data into the target training container, and controls the start of the target training container to train the model to be trained using the training data according to the container identifier of the target training container.

[0038] After the target training container is successfully built, the server will also monitor the training status of the target training container according to the container identifier of the target training container. Specifically, the server presets a monitoring interval, that is, after the target training container is successfully built, the server periodically monitors the training status of the target training container according to the monitoring interval. Among them, the training status includes the training completion status and the training incomplete status.

[0039] S103: Obtain model training results according to the training status.

[0040] In one implementation, the server determines whether to trigger the operation of obtaining the model training result according to the training state of the monitored target training container. Specifically, if the training state of the monitored target training container is the training completed state, the server triggers the acquisition of the model training result, and then feeds back the model training result to the client, so that the user can directly use the model training result to perform operations; if the training state of the monitored target training container is the training incomplete state, the server continues to monitor the training state of the target training container until the training state of the monitored target training container is the training completed state.

[0041] The present disclosure constructs a target training container corresponding to the model to be trained according to the target identification information of the model to be trained, trains the model to be trained in the target training container, determines the training status of the target training container, and then obtains the model training result according to the training status, thereby achieving the effect of unsupervised training of the model to be trained in the training container of the server, and can complete the model training effect without the user writing a large amount of code, thereby reducing the labor cost required for model training and improving the efficiency of model training. In addition, since the entire model training process is executed by the server, the computing resources of the user's local end are saved.

[0042] Figure 2A It is a flowchart of other model training methods disclosed in the embodiments of the present disclosure, which is further optimized and expanded based on the above technical solution and can be combined with the above optional implementation methods.

[0043] like Figure 2A As shown, the model training method disclosed in this embodiment may include:

[0044] S201, obtaining fixed configuration parameters, and determining target dynamic configuration parameters associated with the target identification information according to the target identification information of the model to be trained and the association relationship between the identification information and the dynamic configuration parameters.

[0045] Among them, fixed configuration parameters represent general configuration parameters, that is, configuration parameters that are applicable to any training container, such as computing resources, storage resources, and network resources. Dynamic configuration parameters represent parameters related to the model to be trained. The dynamic configuration parameters are different for different types of models to be trained, such as image file content and image file pulling strategy. In this embodiment, the server pre-builds an association relationship between the identification information and the dynamic configuration parameters, that is, the corresponding dynamic configuration parameters can be determined based on the identification information.

[0046] In one embodiment, the server obtains fixed configuration parameters from the configuration parameter template, matches the target identification information with the association relationship between the identification information and the dynamic configuration parameters recorded in the configuration parameter template, and uses the dynamic configuration parameters associated with the identification information that matches the target identification information as the target dynamic configuration parameters associated with the target identification information.

[0047] S202. Construct a target training container corresponding to the model to be trained according to the fixed configuration parameters and the target dynamic configuration parameters.

[0048] In one implementation, corresponding resources required for constructing a target training container are acquired according to fixed configuration parameters and target dynamic configuration parameters, and are used to construct the target training container.

[0049] S203: Acquire address information included in the model training request, and acquire target training data according to the address information, and use the target training data to train the model to be trained in the target training container.

[0050] The model training request sent by the client includes address information, and the address information represents the unique access address of the target training data in the network, such as a URL (Uniform Resource Locator) address.

[0051] In one implementation, the server parses the model training request to obtain address information, and accesses resources according to the address information to obtain target training data. The server imports the training data into the target training container, generates a container startup instruction according to the container identifier of the target training container, and controls the target training container to execute the image file according to the container startup instruction, so as to train the model to be trained using the training data based on the algorithm code included in the image file.

[0052] S204: Determine a container construction time corresponding to the target training container, and determine a monitoring interval time corresponding to the target training container according to the target identification information.

[0053] The container build time indicates the time corresponding to when the target training container is successfully built. The monitoring interval indicates the time between each status monitoring. For example, if the status monitoring is performed every 5 seconds, the monitoring interval is 5 seconds.

[0054] In one implementation, when the target training container is built, the server receives a successful build prompt message and records the moment as the container build time.

[0055] In this embodiment, different models to be trained are set to correspond to different monitoring intervals. Therefore, the server matches the target identification information of the model to be trained with the association between the identification information and the monitoring interval to determine the monitoring interval associated with the target identification information.

[0056] S205. Determine a status monitoring time corresponding to the target training container according to the container construction time and the monitoring interval time.

[0057] In one implementation, the sum of the container construction time and the monitoring interval time is used as the state monitoring time corresponding to the target training container.

[0058] Exemplarily, assuming that the container construction time is 7:00 and the monitoring interval is 1 minute, 7:01, 7:02, 7:03, ... are used as the state monitoring time corresponding to the target training container. Optionally, this embodiment selects the first state monitoring time as the state monitoring time corresponding to the target training container.

[0059] S206: Perform training status monitoring on the target training container according to the status monitoring time to determine the training status of the target training container.

[0060] In one implementation, the current time is compared with the status monitoring time. If it is determined that the current time reaches the status monitoring time, training status monitoring of the target training container is triggered to determine the training status of the target training container.

[0061] Optionally, S206 includes:

[0062] A timer is generated according to the status monitoring time, and when the timer is triggered, the training status of the target training container is monitored.

[0063] In one implementation, a timer is set as a status monitoring time, and when the timer is triggered, the server responds to the trigger prompt information and performs training status monitoring on the target training container according to the identification information of the target training container.

[0064] By generating a timer according to the status monitoring time and monitoring the training status of the target training container when the timer is triggered, there is no need to compare the current time with the status monitoring time in real time, thus avoiding occupying too many threads and saving computing resources.

[0065] Optionally, when the number of target training containers is at least two, S206 further includes the following steps A and B:

[0066] A. Determine the time difference between the state monitoring time corresponding to each target training container and the current time, and sort the state monitoring times according to the time difference.

[0067] Among them, in this embodiment, the server can execute multiple model training tasks in parallel, that is, the server may have at least two target training containers performing model training at the same time, so the server needs to monitor the training status of at least two target training containers.

[0068] In one embodiment, the server determines the state monitoring time corresponding to each target training container, and determines the time difference between each state monitoring time and the current time. For example, assuming that the state monitoring time of target training container 1 is 8:00, the state monitoring time of target training container 2 is 9:00, and the current time is 7:00, the time difference between the two is 1 hour and 2 hours respectively.

[0069] The server sorts the status monitoring time according to the size of the time difference. The smaller the time difference, the higher the status monitoring time is sorted. For example, assuming that the time difference between status monitoring time 1 and the current time is 1 hour, the time difference between status monitoring time 2 and the current time is 2 hours, and the time difference between status monitoring time 3 and the current time is 3 hours, then the first ranking is status monitoring time 1, the second ranking is status monitoring time 2, and the third ranking is status monitoring time 3.

[0070] B. Generate a timer according to the target state monitoring time, and when the timer is triggered, perform training state monitoring on the target training container corresponding to the target state monitoring time; wherein the target state monitoring time is the state monitoring time that is currently ranked first.

[0071] In one implementation, the state monitoring time currently ranked first is used as the target state monitoring time. A timer is set as the target state monitoring time, and when the timer is triggered, the server responds to the trigger prompt information and performs training state monitoring on the target training container according to the identification information of the target training container corresponding to the target state monitoring time.

[0072] After the training state monitoring is completed, if the corresponding target training container is determined to be in the unfinished training state, the next state monitoring time is calculated according to the target state monitoring time and the monitoring interval time, and the next state monitoring time is reordered. In addition, the original target state monitoring time is removed, and the state monitoring time currently ranked second is used as the new target state monitoring time.

[0073] By determining the time difference between the state monitoring time corresponding to each target training container and the current time, and sorting the state monitoring time according to the time difference, a timer is generated according to the target state monitoring time, and when the timer is triggered, the training state monitoring is performed on the target training container corresponding to the target state monitoring time; wherein the target state monitoring time is the state monitoring time that is currently ranked first, thereby achieving the effect of setting the timers in sequence according to the queue sorting method, so that the server can perform training state monitoring on at least two target training containers in an orderly manner, avoid occupying too many threads, and save computing resources.

[0074] S207: When the training status is a training completion status, obtain the model training result from a preset storage path.

[0075] The preset storage path is a pre-set path for storing model training results. When the target training container completes the model training and obtains the model training results, the model training results are stored in the disk of the preset storage path.

[0076] In one embodiment, when it is monitored that the training status of the target training container is in the training completion status, the server obtains the model training results from the disk of the preset storage path and sends the model training results to the client, so that the user can directly use the model training results in the client to perform operations.

[0077] The present disclosure obtains fixed configuration parameters, and determines the target dynamic configuration parameters associated with the target identification information according to the target identification information of the model to be trained and the association relationship between the identification information and the dynamic configuration parameters, and then constructs a target training container corresponding to the model to be trained according to the fixed configuration parameters and the target dynamic configuration parameters, thereby ensuring that the target training container can be adapted to the model to be trained, so that the model training results obtained by subsequent training according to the target training container are more accurate; by obtaining the address information included in the model training request, and obtaining the target training data according to the address information, the target training data is used to train the model to be trained in the target training container, thereby achieving the goal of obtaining the target training data according to the address information The effect is achieved by not carrying a large amount of original data in the model training request. Since the address information data volume is small, the data transmission pressure is reduced. By determining the status monitoring time corresponding to the target training container according to the container construction time and the monitoring interval time, and monitoring the training status of the target training container according to the status monitoring time, the training status of the target training container is determined, and the effect of periodically monitoring the training status of the target training container is achieved, thereby ensuring the timeliness of the monitoring results. By obtaining the model training results from the preset storage path when the training status is the training completion status, the operation of obtaining the model training results is triggered only when the training is completed, thereby saving computing resources.

[0078] Based on the above embodiments, Figure 2B is a schematic diagram of nodes of some model training tasks disclosed in the embodiments of the present disclosure, such as Figure 2B As shown, the entire process of model training in this embodiment is node-based, that is, the model training process is divided into different sub-processes, and different sub-processes are abstracted into different task nodes. Model training tasks include:

[0079] The data preparation node 20 includes a process of obtaining training data. Specifically, the process included in the data preparation node 20 is: obtaining address information included in the model training request, and obtaining target training data according to the address information.

[0080] The training node 21 includes the process of constructing a target training container and model training. Specifically, the process included in the training node 21 is: the implementation methods related to S201 to S203 in the above embodiment will not be discussed here.

[0081] The monitoring node 22 includes a process for monitoring the training state of the target training container. Specifically, the process included in the monitoring node 22 is: the implementation methods related to S204 to S206 in the above embodiment are not further discussed here.

[0082] The training result acquisition node 23 includes a process for acquiring the model training result. Specifically, the process included in the monitoring node 23 is: the implementation method related to 207 in the above embodiment will not be discussed here.

[0083] The data preparation node 20, training node 21, monitoring node 22 and training result acquisition node 23 are executed in sequence, and the output of each node will be used as the input of the next node. For example, the data preparation node 20 will output the target training data to the training node 21; the training node 21 will output the container identifier of the constructed target training container to the monitoring node 22; the monitoring node 22 will output the training status monitoring result to the training result acquisition node 23.

[0084] During the execution of each task node, the output of each task node will also be stored in the server's disk, that is, the output of each task node will be stored after each task node is executed. When the server suddenly crashes while executing a task node, when the server restarts, it will obtain the output of the previous node from the disk and re-execute the node, thereby realizing breakpoint processing and improving the stability and timeliness of model training.

[0085] The server in this embodiment executes model training tasks concurrently, that is, it can execute multiple model training tasks at the same time, and the maximum concurrency is determined according to the maximum service capacity of the server. The greater the maximum service capacity, the greater the maximum concurrency. Each time the server starts to execute a model training task, the concurrent number is reduced by 1, and each time the server completes a model training task, the concurrent number is increased by 1. If the current concurrent number is 0, the server will no longer execute the model training task to ensure the stability of the server.

[0086] Figure 3 This is a schematic diagram of the structure of some model training devices disclosed in the embodiments of the present disclosure, which can be applied to the case of unsupervised model training. The device of this embodiment can be implemented by software and / or hardware, and can be integrated on any electronic device with computing capabilities.

[0087] like Figure 3 As shown, the model training device 30 disclosed in this embodiment may include a training container construction module 31, a training state determination module 32 and a training result acquisition module 33, wherein:

[0088] A training container construction module 31 is used to construct a target training container corresponding to the model to be trained according to the target identification information of the model to be trained;

[0089] A training state determination module 32, used for training the model to be trained in the target training container and determining the training state of the target training container;

[0090] The training result acquisition module 33 is used to acquire the model training result according to the training state.

[0091] Optionally, the training container construction module 31 is specifically used for:

[0092] Obtaining fixed configuration parameters, and determining target dynamic configuration parameters associated with the target identification information according to the target identification information and the association relationship between the identification information and the dynamic configuration parameters;

[0093] A target training container corresponding to the model to be trained is constructed according to the fixed configuration parameters and the target dynamic configuration parameters.

[0094] Optionally, the training state determination module 32 is specifically configured to:

[0095] Determine a container construction time corresponding to the target training container, and determine a monitoring interval time corresponding to the target training container according to the target identification information;

[0096] Determine a status monitoring time corresponding to the target training container according to the container construction time and the monitoring interval time;

[0097] The training state of the target training container is monitored according to the state monitoring time to determine the training state of the target training container.

[0098] Optionally, the training state determination module 32 is further configured to:

[0099] A timer is generated according to the status monitoring time, and when the timer is triggered, the training status of the target training container is monitored.

[0100] Optionally, when the number of the target training containers is at least two, the training state determination module 32 is further configured to:

[0101] Determine the time difference between the state monitoring time corresponding to each target training container and the current time, and sort the state monitoring times according to the time difference;

[0102] A timer is generated according to the target state monitoring time, and when the timer is triggered, training state monitoring is performed on the target training container corresponding to the target state monitoring time; wherein the target state monitoring time is the state monitoring time that is currently ranked first.

[0103] Optionally, the training state determination module 32 is further configured to:

[0104] Obtaining address information included in the model training request, and obtaining target training data according to the address information;

[0105] The target training data is used to train the model to be trained in the target training container.

[0106] Optionally, the training result acquisition module 33 is specifically used to:

[0107] When the training state is a training completion state, the model training result is obtained from a preset storage path.

[0108] The model training device 30 disclosed in the embodiment of the present disclosure can execute the model training method disclosed in the embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method. For the contents not described in detail in this embodiment, reference can be made to the description in the embodiment of the method of the present disclosure.

[0109] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0110] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0111] Figure 4 A schematic block diagram of an example electronic device 400 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0112] like Figure 4 As shown, the device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0113] A number of components in the device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0114] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above, such as the model training method. For example, in some embodiments, the model training method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 400 via ROM 402 and / or communication unit 409. When the computer program is loaded into RAM 403 and executed by the computing unit 401, one or more steps of the model training method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the model training method in any other appropriate manner (e.g., by means of firmware).

[0115] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0116] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0117] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0118] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0119] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0120] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0121] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0122] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A model training method, comprising: Constructing a target training container corresponding to the model to be trained according to the target identification information of the model to be trained; Training the model to be trained in the target training container, and determining a training state of the target training container; Acquire a model training result according to the training state; The target identification information of the model to be trained is the identification number of the model to be trained; the target identification information of the model to be trained is obtained by the server after the server parses the model training request; the model training request is generated by the client in response to the user's selection operation after the user selects the model to be trained in the model list displayed by the client; The step of constructing a target training container corresponding to the model to be trained according to the target identification information of the model to be trained includes: Obtaining fixed configuration parameters, and determining target dynamic configuration parameters associated with the target identification information according to the target identification information and the association relationship between the identification information and the dynamic configuration parameters; Constructing a target training container corresponding to the model to be trained according to the fixed configuration parameters and the target dynamic configuration parameters; The fixed configuration parameters are common configuration parameters when constructing a training container, including computing resource configuration parameters and network resource configuration parameters; the fixed configuration parameters are obtained by the server from a configuration parameter template; The association relationship between the identification information and the dynamic configuration parameters is pre-constructed by the server and stored in the configuration parameter template; The dynamic configuration parameters represent parameters related to the model to be trained, including version information, resource type, and image file content.

2. The method according to claim 1, wherein: The determining the training state of the target training container includes: Determine a container construction time corresponding to the target training container, and determine a monitoring interval time corresponding to the target training container according to the target identification information; Determine a status monitoring time corresponding to the target training container according to the container construction time and the monitoring interval time; The training state of the target training container is monitored according to the state monitoring time to determine the training state of the target training container.

3. The method according to claim 2, wherein: The monitoring the training status of the target training container according to the status monitoring time includes: A timer is generated according to the status monitoring time, and when the timer is triggered, the training status of the target training container is monitored.

4. The method according to claim 3, wherein: When the number of the target training containers is at least two, generating a timer according to the status monitoring time, and performing training status monitoring on the target training container when the timer is triggered, includes: Determine the time difference between the state monitoring time corresponding to each target training container and the current time, and sort the state monitoring times according to the time difference; A timer is generated according to the target state monitoring time, and when the timer is triggered, training state monitoring is performed on the target training container corresponding to the target state monitoring time; wherein the target state monitoring time is the state monitoring time that is currently ranked first.

5. The method according to claim 1, wherein: The training of the model to be trained in the target training container includes: Obtaining address information included in the model training request, and obtaining target training data according to the address information; The target training data is used to train the model to be trained in the target training container.

6. The method according to claim 1, wherein: The obtaining of the model training result according to the training state includes: When the training state is a training completion state, the model training result is obtained from a preset storage path.

7. A model training device, comprising: A training container construction module, used to construct a target training container corresponding to the model to be trained according to the target identification information of the model to be trained; A training state determination module, used to train the model to be trained in the target training container and determine the training state of the target training container; A training result acquisition module, used to acquire the model training result according to the training state; The training container construction module is specifically used for: Obtaining fixed configuration parameters, and determining target dynamic configuration parameters associated with the target identification information according to the target identification information and the association relationship between the identification information and the dynamic configuration parameters; Constructing a target training container corresponding to the model to be trained according to the fixed configuration parameters and the target dynamic configuration parameters; The target identification information of the model to be trained is the identification number of the model to be trained; the target identification information of the model to be trained is obtained by the server after the server parses the model training request; the model training request is generated by the client in response to the user's selection operation after the user selects the model to be trained in the model list displayed by the client; Among them, the fixed configuration parameters are common configuration parameters when building a training container, including computing resource configuration parameters and network resource configuration parameters; the fixed configuration parameters are obtained by the server from the configuration parameter template; the association relationship between the identification information and the dynamic configuration parameters is pre-constructed by the server and stored in the configuration parameter template; the dynamic configuration parameters represent parameters related to the model to be trained, including version information, resource type, and image file content.

8. The device according to claim 7, wherein: The training state determination module is specifically used for: Determine a container construction time corresponding to the target training container, and determine a monitoring interval time corresponding to the target training container according to the target identification information; Determine a status monitoring time corresponding to the target training container according to the container construction time and the monitoring interval time; The training state of the target training container is monitored according to the state monitoring time to determine the training state of the target training container.

9. The device according to claim 8, wherein: The training state determination module is further specifically used for: A timer is generated according to the status monitoring time, and when the timer is triggered, the training status of the target training container is monitored.

10. The device according to claim 9, wherein: When the number of the target training containers is at least two, the training state determination module is further configured to: Determine the time difference between the state monitoring time corresponding to each target training container and the current time, and sort the state monitoring times according to the time difference; A timer is generated according to the target state monitoring time, and when the timer is triggered, training state monitoring is performed on the target training container corresponding to the target state monitoring time; wherein the target state monitoring time is the state monitoring time that is currently ranked first.

11. The device according to claim 7, wherein: The training state determination module is further specifically used for: Obtaining address information included in the model training request, and obtaining target training data according to the address information; The target training data is used to train the model to be trained in the target training container.

12. The device according to claim 7, wherein: The training result acquisition module is specifically used for: When the training state is a training completion state, the model training result is obtained from a preset storage path.

13. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.

15. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Framework management method and device

    CN109857475A

  • Container state monitoring method, device and system and medium

    CN113485896A