A method for predicting resource configuration for deep learning training in a cloud environment

By using multi-dimensional order-preserving regression models and heuristic algorithms to optimize the resource allocation of deep learning models in a cloud computing environment, the problem of resource allocation uncertainty in deep learning model training is solved, training efficiency and accuracy are improved, and resource allocation is achieved. efficient utilization.

CN111444026BInactive Publication Date: 2024-10-15BEIJING UNIV OF TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202010313690.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-20
Publication Date
2024-10-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In a cloud computing environment, during the training process of deep learning models, static settings of resource configuration lead to uncertainty, making it difficult to find the optimal balance between computing efficiency and resource capacity, resulting in low training efficiency and waste of resources.

Method used

A performance prediction method for collaborative allocation of parameter configuration and resource supply is proposed. Through multi-dimensional order-preserving regression models and heuristic algorithms, it predicts the resource usage, batch size values ​​and iteration rounds required for training operations, and optimizes resource allocation to improve Training efficiency and accuracy.

Benefits of technology

It achieves efficient use of computing resources within a limited time, improves model training efficiency, improves model accuracy, and saves computing resource usage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111444026B_ABST
    Figure CN111444026B_ABST
Patent Text Reader

Abstract

The present invention designs a method for configuring resource parameters for deep learning training in a cloud environment, and the parameters include batch size parameters, resource supply, and number of iterations. The method includes: collecting performance indicators for each round in the model training process; using the rank-preserving regression method to establish a model for the mathematical relationship between batch size parameters, resource supply, number of iterations, and training data scale and training time and training accuracy; constructing a constraint relationship according to the training cost and accuracy requirements of the deep learning model in the cloud environment; using the optimal search algorithm to find a suitable parameter configuration; and finally training the model according to the parameter configuration. Experiments have shown that the method of the present invention can effectively reduce the time cost of deep learning model training and achieve the preset training accuracy, ultimately meeting the training requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of cloud platform data processing, and specifically relates to a method for collaboratively setting training parameter settings and resource supply of a deep learning model based on a cloud platform. Background Art

[0002] Deep learning is a branch of machine learning research. It draws on the structure of the human brain and uses nonlinear operations such as feature combination and feature discretization to continuously train data to obtain data features with higher abstraction levels and build multi-layer neural networks. Distributed deep learning is a combination of a series of algorithms and systems, which is designed to enhance model training performance and improve model prediction accuracy. Cloud computing environment is currently the main deployment environment for deep learning computing platforms. Distributed training in a cloud environment can not only offset the growing data volume by increasing the number of computing nodes, but also avoid the performance bottleneck caused by collecting data to a single node for centralized processing. The trained deep learning neural network contains the hierarchical structure characteristics of traditional neural networks. The difference is that deep learning neural networks have more network nodes and introduce more complex and efficient algorithms.

[0003] Generally speaking, training deep learning neural networks is a process that is extremely sensitive to computing resources. The impact of resource configuration on training efficiency is even more obvious, which is the training resource. At the same time, in a cloud computing environment, model training usually divides the training data into several small batch data subsets containing multiple samples. The model training job performs multiple rounds of iterative calculations in parallel through several working nodes until the model parameters meet the requirements. This is the batch size parameter. Experiments have shown that changes in batch size parameters and resource configuration have an impact on the time consumption of the model training process and the prediction accuracy of the model.

[0004] The deep learning computing platform provides resource usage and batch size parameter settings to improve the execution efficiency of model training. When training a model, users can use historical experience to intuitively set it manually, or find a suitable set of resource configurations through repeated attempts. However, the trial and error method is time-consuming and laborious. At the same time, determining the parameter configuration assigned to a given job requires knowing the characteristics of the corresponding job, and it is difficult to estimate accurately without sufficient experience. As the model training job continues to run, the disadvantages of static settings will become apparent, and its uncertainty will not only bring inconvenience to users, but also be detrimental to the efficient use of computing resources. Improper parameter settings will result in the calculation not being completed as expected. Therefore, in the process of deep learning model training, the correct setting of parameters is to find the best balance between computing efficiency and resource capacity. Summary of the invention

[0005] The present invention is aimed at the deep learning model training job running in the cloud computing environment. After analyzing the execution process and operation mechanism of the model training, a performance prediction method for the coordinated allocation of parameter configuration and resource supply is proposed. Under the constraints of prediction accuracy and running time, this method combines the computing resource environment where the job is located to predict the resource usage, batch size value and iteration rounds that need to be set for a specified training job. To improve the efficiency of model training and save the cost of using computing resources. This method first analyzes the relationship between batch size parameters, resource supply, iteration rounds and training data set size and training time and training accuracy, and then uses a multidimensional rank-preserving regression method to construct a performance model for the above factors, and then uses a heuristic algorithm to search for parameter combinations according to the constraints of minimizing time cost and maximizing training accuracy to obtain a parameter configuration scheme. Through the present invention, it is possible to ensure that the model training job effectively utilizes the computing resources in the cloud environment within a limited time, efficiently performs training and obtains the model accuracy that meets the requirements, and improves the execution efficiency of model training.

[0006] The method of the present invention is divided into four steps: initialization, performance model building, heuristic search, and setting model training.

[0007] The above method is implemented on a computer by following the steps below:

[0008] (1) Initialization

[0009] 1.1) Combined with the model training execution environment, build a cloud environment resource node set DataResources, DataResources = {dr i |1≤i≤M}, where for any resource node dr i ∈DataResources, dr i Use triples (center i , capacity i , memory i ) to indicate center i Represents the number of a resource node, capacity i Represents the resource node center i Storage capacity, memory i Represents the resource node center i The memory capacity of M represents the total number of data centers.

[0010] 1.2) Let the configuration information during the model training process be combined into a data set TrainDataSet, TrainDataSet = {td j |1≤j≤N}, where for any data td j∈TrainDataSet,td j Use six-tuple (batchsize j ,res j , time j , round j , dataset j ,acc j ) to indicate batchsize j Represents data td j The batch size parameter used, res j Represents data td j The number of resource nodes used, time j Represents data td j The training time per round is j Represents data td j The number of iterations used, datasize j Represents data td j The corresponding training data set size, acc j Represents data td j The training accuracy finally obtained by the training task, N represents the total number of data.

[0011] (2) Performance model building

[0012] 2.1) Construct the data matrix X based on the training data information of the model training that has been performed v , the form is as follows

[0013]

[0014] In the matrix X v In , each row represents a set of sample data. Each set of data contains the batch size parameter, number of resource nodes, size of training data set, total number of training rounds, execution time of each round of training, and model accuracy obtained during training. The batch size parameter is represented by x batchk Representation, the number of resource nodes is represented by x resourcek Represents, the size of the training data set is represented by x dsizek Representation, total training rounds are represented by x roundk Represents, the time taken for each round of training execution is y timek Represents, training accuracy with y acck Represents, k = 1, 2, ..., n, and n represents the total number of entries for constructing the training data information.

[0015] 2.2) Construct the relationship between the time spent in each round and the batch size parameter, resource supply and training data size. The mathematical function relationship is as follows:

[0016] f(batchsize,res,datasize)=t round

[0017] In the above formula, batchsize represents the batch size parameter variable, res represents the resource supply given for this model training, datasize represents the size of the training data, and t round Indicates the time taken for each round. For the training of this mathematical function relationship, select the data matrix X v The first, second, third, and fifth columns of the function are performed. Therefore, the corresponding relationship between the variables in the mathematical relationship and the parameters in the data matrix is: batchsize in the function corresponds to x in the data matrix batchk , the datasize in the function corresponds to the x in the data matrix dsizek , res in the function corresponds to x in the data matrix resourcek , t in the functional relationship round Corresponding to y in the data matrix timek .

[0018] After the data items are established, the rank-preserving regression can be calculated. Since this rank-preserving regression algorithm is a multidimensional rank-preserving regression, the dimensionality reduction method is adopted, that is, the rank-preserving regression between the independent variable and the dependent variable in one dimension is considered. Similarly, the rank-preserving regression of the independent variables in each dimension is completed. Finally, the rank-preserving regression of the independent variables in each dimension is merged to finally complete the solution of the multidimensional rank-preserving regression.

[0019] Let matrix ∧ v To select the data matrix X v The data matrix formed after the first, second, third and fifth columns in A. v Represents the matrix ∧ v The corresponding vector matrix, that is, A v =(x batchk ,x resourcek ,x dsizek ,y timek ). According to the mathematical function relationship, the matrix A is solved as follows v Medium (x batchk ,x resourcek ,x dsizek ) and y timek The order-preserving regression between .

[0020] Select matrix A v The vector x in batchk With y timek , where x batchk The elements contained are the matrix X v (x batch1 ,x batch2 ,…,x batchn) T . Let the weight sequence of the desired order-preserving regression function relationship be w batch =(w u ) T , the value of u is the same as k.

[0021] Traverse x batchk , if there exists l∈k such that x batchl >x batchl+1 , let B={l,l+1}, then

[0022]

[0023] w B =w l +w l+1

[0024] This time

[0025]

[0026] They represent the value sequence and weight sequence calculated in a certain traversal during the order-preserving regression process. It is order-preserving, that is: x batch1 ≤…≤x batchl-1 ≤x B ≤x batchl+1 ≤…≤x batchn , then stop the calculation. If it is not order-preserving, continue traversing until the order-preserving regression sequence is obtained And the corresponding weights , and assign the weight sequence to w batch .

[0027] Select matrix A v The vector x in resourcek With y timek , where x resourcek The elements contained are the matrix X v (x resource1 ,x resource2 ,…,x resourcen ) T . Let the weight sequence of the desired order-preserving regression function relationship be w resource =(w s ) T , the value of s is the same as k.

[0028] Traverse x resourcek , if there exists l∈k such that x resourcel >x resourcel+1 , let B={l,l+1}, then

[0029]

[0030] w B =w l +w l+1

[0031] This time

[0032]

[0033] They represent the value sequence and weight sequence calculated in a certain traversal during the order-preserving regression process. It is order-preserving, that is: x resource1 ≤…≤x resourcel-1 ≤x B ≤x resourcel+1 ≤…≤x resourcen , then stop the calculation. If it is not order-preserving, continue traversing until the order-preserving regression sequence is obtained And the corresponding weights And assign the weight sequence to w resource .

[0034] Select matrix A v The vector x in dsizek With y timek , where x dsizek The elements contained are the matrix X v (x dsize1 ,x dsize2 ,…,x dsizen ) T . Let the weight sequence of the desired order-preserving regression function relationship be w dsize =(w h ) T , the value of h is the same as k.

[0035] Traverse x dsizek , if there exists l∈k such that x dsizel >x dsizel+1 , let B={l,l+1}, then

[0036]

[0037] w B =w l +w l+1

[0038] This time

[0039]

[0040] They represent the value sequence and weight sequence calculated in a certain traversal during the order-preserving regression process. It is order-preserving, that is: x dsize1 ≤…≤x dsizel-1 ≤x B ≤x dslzel+1 ≤…≤x dsizen , then stop the calculation. If it is not order-preserving, continue traversing until the order-preserving regression sequence is obtained And the corresponding weights And assign the weight sequence to w dsize .

[0041] For x batchk ,x resourcek ,x dsizek Calculate the weight w batch ,w resource ,w dsize The final functional relationship is:

[0042] x batchk *w batch +x resourcek *w resource +x dsizek *w dsize =t round

[0043] 2.3) Construct the relationship between batch size parameters, number of iterations and training accuracy. The mathematical function relationship is as follows:

[0044] f(batchsize,round)=acc

[0045] In the above formula, batchsize represents the batch size parameter variable, round represents the total number of model training rounds, and acc represents the model training accuracy. For the training of this mathematical relationship, select the data matrix X v The first, fourth, and sixth columns of the function are performed. Therefore, the variables in the mathematical relationship correspond to the parameters in the data matrix as follows: batchsize in the function corresponds to x in the data matrix batchk , the round in the function corresponds to the x in the data matrix roundk , the acc in the function corresponds to x in the data matrix acck .

[0046] The method for constructing this mathematical function relationship is the same as the method in step 2.2). Let x batchk ,s roundk The corresponding rank-preserving regression weights are w batch ,w round The final functional relationship is:

[0047] x batchk *w batch +x roundk *w round =acc

[0048] (3) Optimal parameter configuration search

[0049] 3.1) The problem of selecting the optimal parameter configuration and resource allocation scheme can be formalized as follows:

[0050] min(r vm )

[0051] min(T limit )

[0052] max(acc predict )

[0053]

[0054] In the above relationship: vm Indicates the number of resource nodes, T limit Indicates the total running time of the model training job, acc predict represents the final training accuracy, C batch is the number of groups into which the data is divided, t round It is the running time of a certain stage of the model training job. Among them, min(r vm ) means minimizing resource usage; min(T limit ) means minimizing the training time; max(acc predict ) represents maximizing the training accuracy of the model; C batch %r vm =0 means that after the data set is divided according to the batch size value, the number of groups of the data division should be an integer multiple of the number of working nodes; Indicates that for a model training job, the sum of the running time of each round should be guaranteed to be less than the total running time of the model training job.

[0055] 3.2) Through the calculation in step 2), a list of the training time for each round under different batch sizes and resource configuration combinations and a list of training accuracy that can be achieved under different batch sizes and numbers of iterations are formed, which are recorded as table 1 and table 2 respectively.

[0056] 3.3) Combine the two result tables to search based on the minimum running time and the optimal model training accuracy goals, where the minimum running time is the number of iterations multiplied by the training time per round.

[0057] 3.4) According to the search method, it is divided into two steps.

[0058] 3.4.1) Search the batch size and number of iterations corresponding to the best achievable model accuracy in table2;

[0059] 3.4.2) According to the batch size value, find the corresponding iteration time per round and the number of working node resource configurations in table1;

[0060] 3.4.3) For the multiple records found, multiply the time taken for each iteration by the number of iterations searched in the previous step to obtain the total training time. For the record with the smallest total training time, record it to form a pending confirmation list for subsequent use. If it does not meet the requirements, discard it directly.

[0061] 3.5) Finally, determine the final parameter configuration combination in the list to be confirmed. At this time, there are multiple records or no records in the list:

[0062] 3.5.1) If there is no record, you need to search for the next best value in table2 again to continue searching;

[0063] 3.5.2) If there are multiple records, you need to find a set of configurations with the least working node resources in the total training time based on the constraint of the minimum total training time, and perform model training according to this configuration result.

[0064] (4) Execute model training

[0065] 4.1) Based on the solution space search results of step 3), a parameter configuration list is formed;

[0066] 4.2) Set the model training configuration according to the parameter configuration table

[0067] (5) End: Wait for the model training job to complete. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 It is the overall flow chart of the method of the present invention.

[0069] Figure 2(a) is a comparison of the achievable accuracy under coordinated adjustment of batch size parameters and resource configuration and manual configuration.

[0070] Figure 2(b) compares the number of iterations under batch size parameters, collaborative adjustment of resource configuration and manual configuration. DETAILED DESCRIPTION

[0071] The present invention is described below in conjunction with the accompanying drawings and specific embodiments.

[0072] The specific implementation method can be divided into the following steps:

[0073] (1) Initialization

[0074] 1.1) Construct a cloud environment resource node set DataResources, DataResources = {dc1 = (center1, 204800MB, 2048MB), dc2 = (center2, 204800MB, 2048MB), dc3 = (center3, 204800MB, 2048MB)}, and the total number of resource nodes M = 3;

[0075] 1.2) Construct the configuration information set TrainDataSet during the model training execution process, TrainDataSet = {td1 = (16, 1, 0, 0, 0, 0), td2 = (16, 2, 0, 0, 0, 0), td3 = (16, 3, 0, 0, 0, 0), td4 = (32, 1, 0, 0, 0, 0), td5 = (32, 2, 0, 0, 0, 0), td6 = (32, 3, 0, 0, 0, 0), td7 = (128, 1, 0, 0, 0, 0), td8 = (128, 2, 0, 0, 0, 0), td9 = (128, 3, 0, 0, 0, 0), td 10 =(256,1,0,0,0,0),td 11 =(256,2,0,0,0,0),td 12 =(256,3,0,0,0,0),td 13 =(512,1,0,0,0,0),td 14 =(512,2,0,0,0,0),td 15 =(512,3,0,0,0,0)}, the total number of data N = 15;

[0076] (2) Performance model building

[0077] 2.1) Perform observation experiments, collect data, fill the TrainDataSet collection and Tasks collection data items and construct a data matrix in the following form:

[0078]

[0079] 2.2) Construct f(batchsize, datasize, res) = t round Mathematical relationship. Let the matrix ∧ v To select the data matrix X v The data matrix formed after the first, second, third and fifth columns in A. v Represents the matrix ∧ v The corresponding vector matrix, that is, A v =(x batchk ,x resourcek ,x dsizek,y timek ). Solve the matrix A according to the mathematical function relationship v Medium (x batchk ,x resourcek ,x dsizek ) and y timek The order-preserving regression between .

[0080] Get for x batchk ,x resourcek ,x dsizek Calculate the corresponding weight w batch ,w resource ,w dsize .

[0081] The final functional relationship is:

[0082] x batchk *w batch +x resourcek *w resource +x dsizek *w dsize =t round

[0083] 2.3) Construct the mathematical relationship f(batchsize, round) = acc. For the training of this mathematical relationship, select the data matrix X v The first, fourth, and sixth columns of the function are performed. Therefore, the variables in the mathematical relationship correspond to the parameters in the data matrix as follows: batchsize in the function corresponds to x in the data matrix batchk , the round in the function corresponds to the x in the data matrix roundk , the acc in the function corresponds to x in the data matrix acck The method of constructing the mathematical function relationship is the same as step 2.2). Calculate x batchk ,x roundk The corresponding rank-preserving regression weights are w batch ,w round The final functional relationship is:

[0084] x batchk *w batch +x roundk *w round =acc

[0085] (3) Optimal resource allocation search

[0086] 3.1) For a training data set, different batch size parameters, resource supply, and number of iterations are respectively introduced into the performance model established in step 2) to form lists, as shown in Table 1 and Table 2

[0087] Table 1 Batch size parameters, resource supply, training data set and training time per round

[0088] Batch size value Resource supply Training dataset size Training time per round 16 1 1GB 17727s 16 2 1GB 5668s 16 3 1GB 3521s … … … … 512 3 1GB 338s

[0089] Table 2 Batch size parameters, number of iterations and training accuracy

[0090] Batch size value Iteration round Training Accuracy 16 4 0.9583 32 15 0.967 64 38 0.9726 512 80 0.9588

[0091] 3.2) Combine the two result tables to search based on the minimum running time and the optimal model training accuracy target, where the minimum running time is the number of iterations multiplied by the training time per round. The search method is divided into two steps

[0092] 3.2.1) Search the batch size and number of iterations corresponding to the best achievable model accuracy in table2;

[0093] 3.2.2) According to the batch size value, find the corresponding iteration time per round and the number of working node resource configurations in table1;

[0094] 3.2.3) For the multiple records found, multiply the time taken for each iteration by the number of iterations searched in the previous step to obtain the total training time. If the total time meets the time limit, record this record to form a pending confirmation list for subsequent use; if it does not meet the requirements, discard it directly.

[0095] 3.2.4) Finally, the final parameter configuration combination is determined in the list to be confirmed, that is, the batch size is selected as 64, the resource supply is selected as 2 nodes, and the iteration rounds are set to 38 rounds.

[0096] (4) Execute model training

[0097] 4.1) Based on the solution space search results of step 3), a parameter configuration list is formed;

[0098] 4.2) Set the model training configuration according to the parameter configuration table

[0099] (5) End: Wait for the model training job to complete.

[0100] According to the method proposed in this invention, the inventor has conducted relevant tests on the effectiveness of the method. There are two main evaluation indicators for the test:

[0101] (1) Average number of completed training jobs: represents the ratio of the number of completed model training jobs to the total number of model training jobs within a set period of time. The calculation method is as follows:

[0102]

[0103] Where n is the number of model training jobs completed within the specified time, and N is the total number of preset model training jobs within this period of time.

[0104] (2) Average resource usage: represents the ratio of the total resource usage of each model training job to the number of completed model training jobs within a set period of time. The calculation method is as follows:

[0105]

[0106] where r i is the resource usage of a completed model training job, and n is the number of completed model training jobs within a set period of time.

[0107] The platform used in this test consists of 4 physical machines forming 4 working nodes for the experiment. The experimental environment configuration is shown in Table 3. One node is used as a parameter server and three nodes are used as computing nodes.

[0108] Table 3 Test environment configuration

[0109]

[0110] The test data set is the SVHN data set, which is collected and collated from the house number image set in Google Street View. It is a real-world image data set used to develop object detection algorithms. It contains more than 600,000 digital images with labels. The test mainly compares the model training operation performed under the parameter configuration calculated by the performance model of the present invention with the model training operation results performed when the parameter configuration is manually set without using the performance model. The results are shown in Figure 2 (a) and Figure 2 (b).

[0111] As can be seen from the diagram, for different convolutional neural networks, the results of model training using the parameters obtained by the performance model are improved compared to those when they are manually set. For example, when the performance model is not used and only the training parameters are manually set for model training, the optimal prediction accuracy that can be achieved is 0.967; and after the corresponding parameter configuration is calculated using the performance model, the model training is performed, and the model prediction accuracy of 0.973 is obtained, which is higher than the result obtained by manually setting the parameters for training. For the performance model construction goals of minimizing the running time and the optimal model training accuracy, after the model training is performed using the parameters selected by the performance model, the number of iterations increases and the prediction accuracy increases by 0.4%.

[0112] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technology described in the present invention is not limited to this. All technical solutions and improvements that do not deviate from the spirit and scope of the invention should be included in the scope of the claims of the present invention.

Claims

1. A method for predicting deep learning training resource configuration in a cloud environment, characterized in that: This method is divided into four steps: initialization, performance model construction, heuristic search, and execution model training; The above method is implemented on a computer by following the steps below: (1) Initialization 1.1) Combined with the model training execution environment, build a cloud environment resource node set DataResources, DataResources = {dr i |1≤i≤M}, where for any resource node dr i ∈DataResources, dr i Use triples (center i , capacity i , memory i ) to indicate center i Represents the number of a resource node, capacity i Represents the resource node center i Storage capacity, memory i Represents the resource node center i The memory capacity of M represents the total number of data centers. 1.2) Let the configuration information during the model training process be combined into a data set TrainDataSet, TrainDataSet = {td j |1≤j≤N}, where for any data td j ∈TrainDataSet,td j Use six-tuple (batchsize j ,res j , time j , round j , dataset j ,acc j ) to indicate batchsize j Represents data td j The batch size parameter used, res j Represents data td j The number of resource nodes used, time j Represents data td j The training time per round is j Represents data td j The number of iterations used, datasize j Represents data td j The corresponding training data set size, acc j Represents data td j The training accuracy finally obtained by the training task, N represents the total number of data; (2) Performance model building 2.1) Construct the data matrix X based on the training data information of the model training that has been performed v , the form is as follows In the matrix X v In , each row represents a set of sample data. Each set of data contains the batch size parameter, number of resource nodes, size of training data set, total number of training rounds, execution time of each round of training, and model accuracy obtained during training. The batch size parameter is x batchk Representation, the number of resource nodes is represented by x resourcek Represents, the size of the training data set is represented by x dsizek Representation, total training rounds are represented by x roundk Represents, the time taken for each round of training execution is y timek Represents, training accuracy with y acck represents, k = 1, 2, ..., n, n represents the total number of items that construct the training data information; 2.2) Construct the relationship between the time spent in each round and the batch size parameter, resource supply and training data size. The mathematical function relationship is as follows: f(batchsize,res,datasize)=t round In the above formula, batchsize represents the batch size parameter variable, res represents the resource supply given for this model training, datasize represents the size of the training data, and t round Indicates the time taken for each round; for the training of this mathematical function relationship, select the data matrix X v The first, second, third, and fifth columns of the function are performed; therefore, the corresponding relationship between the variables in the mathematical relationship and the parameters in the data matrix is: batchsize in the function corresponds to x in the data matrix batchk , the datasize in the function corresponds to the x in the data matrix dsizek , res in the function corresponds to x in the data matrix resourcek , t in the functional relationship round Corresponding to y in the data matrix timek ; After the data items are established, the rank-preserving regression can be calculated. Since this rank-preserving regression algorithm is a multi-dimensional rank-preserving regression, a dimensionality reduction method is adopted, that is, the rank-preserving regression between one of the independent variables and the dependent variable is considered. In this way, the rank-preserving regression of independent variables in each dimension is completed; finally, the rank-preserving regression of independent variables in each dimension is merged to finally complete the solution of multi-dimensional rank-preserving regression; Let matrix ∧ v To select the data matrix X v The data matrix formed after the first, second, third and fifth columns in A v Represents the matrix ∧ v The corresponding vector matrix, that is, A v =(x batchk , x resourcek , x dsizek ,y timek ); According to the mathematical function relationship, the following solves the matrix A v Medium (x batchk , x resourcek , x dsizek ) and y timek The order-preserving regression between Select matrix A v The vector x in batchk With y timek , where x batchk The elements contained are the matrix X v (x batch1 , x batch2 , ..., x batchn ) T ; Assume that the weight sequence of the desired order-preserving regression function relationship is w = (W u ) T , the value of u is the same as k; Traverse x batchk , if there exists l∈k such that x batchl >x batchl+1 , let B = {l, l+1}, then In B =in l +in l+1 This time They represent the value sequence and weight sequence calculated in a certain traversal during the order-preserving regression process; if a certain traversal is calculated, It is order-preserving, that is: x batch1 ≤…≤x batchl-1 ≤x B ≤x batchl+1 ≤…≤x batchn , then stop the calculation; if it is not order-preserving, continue traversing until the order-preserving regression sequence is obtained And the corresponding weights For x resourcek and x dsizek Perform rank-preserving regression calculations respectively to form corresponding weight sequences; let x batchk , x resourcek , x dsizek The corresponding weights are w batch , w resource , w dsize ; The final functional relationship constructed is x batchk *w batch +x resourcek *w resource +x dsizek *w dsize =t round 2.3) Construct the relationship between batch size parameters, number of iterations and training accuracy. The mathematical function relationship is as follows: f(batchsize, round) = acc In the above formula, batchsize represents the batch size parameter variable, round represents the total number of model training rounds, and acc represents the model training accuracy. For the training of this mathematical relationship, select the data matrix X v The first, fourth, and sixth columns of the function are performed; therefore, the corresponding relationship between the variables in the mathematical relationship and the parameters in the data matrix is: batchsize in the function corresponds to x in the data matrix batchk , the round in the function corresponds to the x in the data matrix roundk , the acc in the function corresponds to x in the data matrix acck ; The method of constructing this mathematical function relationship is the same as the method in step 2.2); let x batchk , x roundk The corresponding rank-preserving regression weights are w batch , w round ; The final functional relationship constructed is x batchk *w batch +x roundk *w round =acc (3) Optimal parameter configuration search 3.1) The problem of selecting the optimal parameter configuration and resource allocation scheme can be formalized as follows: my(r vm ) min(T limit ) max(acc predict ) subject to: In the above relationship: vm Indicates the number of resource nodes, T limit Indicates the total running time of the model training job, acc predict represents the final training accuracy, C batch is the number of groups into which the data is divided, t round It is the running time of a certain stage of the model training job; among them, min(r vm ) means minimizing resource usage; min(T limit ) means minimizing the training time; max(acc predict ) represents maximizing the training accuracy of the model; C batch %r vm =0 means that after the data set is divided according to the batch size value, the number of groups of the data division should be an integer multiple of the number of working nodes; Indicates that for a model training job, the sum of the running time of each round should be guaranteed to be less than the total running time of the model training job; 3.2) Through the calculation in step 2), a list of the training time for each round under different batch sizes and resource configuration combinations and a list of the training accuracy that can be achieved under different batch sizes and iteration rounds are formed, which are recorded as table 1 and table 2 respectively; 3.3) Combine the two result tables to search based on the minimum running time and the optimal model training accuracy target, where the minimum running time is the number of iterations multiplied by the training time per round; 3.4) According to the search method, it is divided into two steps. 3.4.1) Search the batch size and number of iterations corresponding to the best achievable model accuracy in table2; 3.4.2) According to the batch size value, find the corresponding iteration time per round and the number of working node resource configurations in table1; 3.4.3) For the multiple records found, multiply the time taken for each iteration by the number of iterations searched in the previous step to obtain the total training time taken. For the record with the smallest total training time taken, record it in a list to be confirmed for subsequent use. If it does not meet the requirements, discard it directly. 3.5) Finally, determine the final parameter configuration combination in the list to be confirmed. At this time, there are multiple records or no records in the list: 3.5.1) If there is no record, you need to search for the next best value in table2 again to continue searching; 3.5.2) If there are multiple records, you need to find a set of configurations with the least working node resources in the total training time according to the constraint of the minimum total training time, and perform model training according to this configuration result; (4) Execute model training 4.1) Based on the solution space search results of step (3), a parameter configuration list is formed; 4.2) Set the model training configuration according to the parameter configuration table (5) End: Wait for the model training job to complete.

Citation Information

Patent Citations

  • Method and system for deep learning automation parameter adjustment based on Keras

    CN107203809A

  • Power quality prediction method for power distribution network containing distributed power supplies based on deep learning model

    CN109659933A

  • Adaptive batch dataset partitioning using distributed deep learning of accelerator hybrid sets

    CN110795228A

  • Column division-based distributed machine learning optimization classification method and device

    CN110929884A

  • No-reference quality evaluation system and method for industrial two-dimensional code

    CN110930356A