Cross-domain cloud platform neural network training task scheduling method based on reinforcement learning

Through the cross-domain cloud platform neural network training task scheduling method based on reinforcement learning, the problems of low resource utilization rate of AI application on multi-cloud platform and long-term training time are solved, and efficient utilization of computing resources and optimization of task completion time are realized. , suitable for artificial intelligence applications.

CN118550667APending Publication Date: 2024-08-27ZHEJIANG UNIV
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202410697867.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

In a multi-cloud platform environment, the resource utilization rate of AI applications is low, resulting in high costs, long data transmission time, and deep neural network training tasks are time-consuming due to communication overhead, making it difficult for the existing technology to effectively schedule and optimize.

Method used

Using a cross-domain cloud platform neural network training task scheduling method based on reinforcement learning, the training task information submitted by users is obtained in real time, the calculation amount and hardware resource requirements are estimated, and the cloud platform status information is combined with reinforcement learning model to optimize task scheduling to achieve The goal of the shortest task completion time.

Benefits of technology

It improves the computing resource utilization rate and training efficiency in the field of deep learning, reduces the task completion time, optimizes resource allocation and scheduling, and is suitable for artificial intelligence application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550667A
    Figure CN118550667A
Patent Text Reader

Abstract

The invention discloses a cross-domain cloud platform neural network training task scheduling method based on reinforcement learning, and the method comprises the steps: firstly obtaining a neural network training task submitted by a user in real time, collecting training information, and then carrying out the estimation of a calculation amount and the prediction of the training time of a model. And then learning training is reinforced according to the predicted training time to obtain a scheduling scheme, and a neural network training task submitted by a user is scheduled and allocated to a corresponding cloud platform based on the scheduling scheme. According to the method, the average completion time of most tasks can be effectively reduced, and the cluster resource utilization rate is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of computer science, artificial intelligence and cloud computing, and in particular to a cross-domain cloud platform neural network training task scheduling method based on reinforcement learning. Background Art

[0002] With the continuous development of artificial intelligence cloud computing technology, more and more enterprises and organizations are beginning to migrate their AI applications to the cloud. However, due to the differences and limitations between different cloud platforms, cross-cloud platform AI application scheduling has become increasingly important.

[0003] In traditional on-premises deployment environments, enterprises can choose to use a single cloud platform (such as AWS, Azure, Google Cloud, etc.) to run and manage their AI applications. This approach can provide higher flexibility and scalability, but there are also some limitations, such as:

[0004] 1. The resource utilization of a single cloud platform may not be high enough, resulting in excessively high costs.

[0005] 2. Data transmission and synchronization between different cloud platforms may incur additional time and cost overhead.

[0006] 3. When the same application needs to be deployed on multiple cloud platforms, manual repetitive work is required.

[0007] To solve these problems, cross-cloud AI application scheduling came into being. Cross-cloud AI application scheduling refers to managing and scheduling AI applications on multiple cloud platforms on a unified management platform. Through cross-cloud AI application scheduling, enterprises can better utilize resources between different cloud platforms, improve resource utilization and efficiency, and reduce costs.

[0008] Scheduling AI applications across cloud platforms is an important issue that can help enterprises or universities better manage and schedule their AI applications and improve resource utilization, reduce costs, and increase scalability.

[0009] Meanwhile, deep neural networks have been used in a wide range of applications, such as computer vision, natural language processing, etc. However, training DNNs is a time-consuming task, mainly due to the large amount of data and the increasing size of DNN models. The most common way to scale and accelerate DNN training is data parallelism. Unfortunately, its performance is far from linear acceleration, mainly due to communication overhead. In many of our internal and publicly accessible training workloads, as a large online service provider, communication often consumes a large amount of training time. This is continuously affected by recent work.

[0010] Therefore, many different communication acceleration methods have been proposed and integrated into popular frameworks, including TensorFlow, PyTorch, and MXNet, and they have vastly different implementations. For example, one can use RDMA to replace TCP, but the implementation of RDMA is quite different between frameworks. One can use ring-based all-reduce, either from one of several different MPI implementations or through NVIDIA's NCCL to replace the parameter server. However, they all share the same goal - speeding up each individual message. As early as a few years ago, new directions for accelerating distributed DNN training (e.g., communication scheduling) have been proposed. Summary of the invention

[0011] The purpose of the present invention is to provide a cross-domain cloud platform neural network training task scheduling method based on reinforcement learning in view of the deficiencies in the prior art.

[0012] The technical solution adopted by the present invention is as follows:

[0013] A method for scheduling neural network training tasks on a cross-domain cloud platform based on reinforcement learning includes the following steps:

[0014] Step 1: Obtain the neural network training tasks submitted by users in real time;

[0015] Step 2: Based on each neural network training task submitted by the user, extract training information, including: the size of the neural network model to be trained, the data set, and the training cycle;

[0016] Step 3: Estimate the amount of computation based on the training information extracted in step 2, where the amount of computation is estimated using the total number of floating-point calculations;

[0017] Step 4: Predict the required hardware resources, including the number of GPUs, based on the estimated computational workload in step 3;

[0018] Step 5: Estimate the training time based on the hardware resources predicted in step 4;

[0019] Step 6: Based on the hardware resources and training time required for each current neural network training task obtained from Steps 4 to 5 and the cloud platform status information table obtained in real time, a reinforcement learning model trained using a reinforcement learning method with the goal of minimizing the task completion time is used to make a decision and obtain a final scheduling solution. The cloud platform status information table includes the hardware models and available resources of different cloud platforms and the bandwidth data between different cloud platforms and local servers.

[0020] Step 7: Based on the scheduling plan, the neural network training tasks submitted by the user are scheduled and allocated to the corresponding cloud platform.

[0021] Furthermore, the step 1 also includes: constructing a task queue from the neural network training tasks submitted by users acquired in real time.

[0022] Furthermore, in step 3, the total number of floating point calculations FLOAPS is calculated by the following formula:

[0023] FLOAPS=op_fd*(1+bp_to_fd_ratio)*batch_num*batch_size*epoch_num

[0024] Where op_fd is the number of calculations during the forward transmission of the neural network, bp_to_fd_ratio is the ratio of the number of backward transmission calculations to the forward transmission, epoch_num is the number of training cycles, batch_num is the number of training data batches included in each epoch, and batch_size is the batch size of the training data.

[0025] Furthermore, in step 4, a heuristic or empirical method is used to predict the required number of GPUs.

[0026] Furthermore, in step 5, the training time estimation method is specifically as follows:

[0027] Use the model and parameters in the neural network training task submitted by the user to perform pre-training for several training cycles, collect the time required for other training cycles except the first training cycle, calculate the average value, and then multiply the average value by the number of training cycles in the extracted training information to obtain the estimated training time.

[0028] Furthermore, the structure of the neural network is CNN, MLP, LSTM or Transformer.

[0029] Furthermore, the reinforcement learning model includes: an intelligent scheduling agent and a cross-domain scheduling environment, wherein the cross-domain scheduling environment is used to provide the number of available resources, the number of resources required for the task and the estimated completion time of the task, and is responsible for executing the actions selected by the intelligent scheduling agent, and giving new states and rewards; the intelligent scheduling agent receives state information and rewards from the cross-domain scheduling environment and makes action decisions.

[0030] Furthermore, the reward is expressed as the negative value of the task completion time; the state includes each cloud platform cluster c i The number of available resources, the hardware resources required by the current task j, and the estimated training time; the Q-Learning algorithm training rules are used to perform training, and the Q-Learning update rules are:

[0031] Q new (st ,a t )←Q(s t ,a t )+α[R t+1 +γmax a′Q(s t+1 ,a′)-Q(s t ,a t )]Q(s t ,a t )←Q(s t ,a t )+α[Rt+1+γmaxa′Q(st+1,a′)-Q(st,at)]

[0032] Among them, s t ,a t Respectively represent the state and action at time step t, R t+1 represents the reward corresponding to the t+1 time step, α is the learning rate, γ is the discount factor, Q(*) is the Q value, Q new (*) is the updated Q value, and a′ represents the action that is expected to bring the maximum Q value (i.e., the maximum expected cumulative reward) among possible actions.

[0033] A cross-domain cloud platform neural network training task scheduling system based on reinforcement learning, comprising:

[0034] A data acquisition module is used to acquire in real time the neural network training tasks submitted by the user and a cloud platform status information table acquired in real time; the cloud platform status information table includes the hardware models and available resources of different current cloud platforms and the bandwidth data between different cloud platforms and local servers;

[0035] The data processing module is used to extract training information based on each neural network training task submitted by the user, including: the size of the neural network model to be trained, the data set, and the training cycle; estimate the amount of calculation based on the extracted training information, where the amount of calculation is estimated using the total number of floating-point calculations; predict the required hardware resources based on the estimated amount of calculation, including the number of GPUs; and estimate the training time based on the predicted hardware resources;

[0036] The scheduling plan generation module is used to make decisions based on the hardware resources and training time required for each current neural network training task and the cloud platform status information table obtained in real time, using the reinforcement learning method to obtain a reinforcement learning model trained with the goal of minimizing the task completion time, and obtain the final scheduling plan;

[0037] The scheduling module is used to schedule and allocate the neural network training tasks submitted by users to the corresponding cloud platform based on the scheduling plan.

[0038] The beneficial effect of the present invention is that the present invention can optimize computing resources in the field of deep learning, improve training efficiency and reasoning speed, and thus better serve the application scenarios of artificial intelligence by estimating the amount of calculation, predicting the hardware resource situation, and estimating the model training time. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a schematic diagram of the training resource demand analysis and prediction process;

[0040] Figure 2 This is a schematic diagram of the intelligent scheduling process based on reinforcement learning;

[0041] Figure 3 This is a diagram showing the memory usage changes for a neural network training task. DETAILED DESCRIPTION

[0042] The present invention provides a cross-domain cloud platform neural network training task scheduling method based on reinforcement learning, which includes two main points:

[0043] 1. Neural network training time prediction: First, estimate the required hardware resources through the neural network model parameters, then iterate the neural network model multiple times through pre-training, and then predict the training time.

[0044] Aiming at efficient and intelligent scheduling of large-scale cluster resources, the first major research content is how to efficiently and accurately analyze the computing resource requirements of users for neural network model training requests, and how to accurately estimate the resource scheduling response time, training cycle, training results, etc. of model training requests. Predicting the computing resource consumption and model training time of each neural network training task submitted by each user is a prerequisite for effectively realizing cluster resource allocation.

[0045] For the analysis and prediction of training resource requirements, the overall technical route is as follows: Figure 1As shown in the figure, it mainly includes users submitting neural network training tasks, neural network model parameter extraction, computing resource estimation and training time estimation. After multiple users submit neural network training tasks, the model size, data set, training cycle and other information are extracted according to the script of the submitted task. Resource estimation and training time estimation are the core of this part. They mainly predict the amount of calculation in the model training process, which is generally measured by the total number of floating point operations (FLOPs), and further evaluate the required GPU, CPU, video memory, memory and other hardware resources based on this amount of calculation. Different neural network model training tasks have different requirements for hardware resources. Some complex models require higher-level computing resources to meet training requirements, while some simple models only require lower-level resources. Accurately estimating the demand for computing resources can help avoid waste and shortage of resources and achieve optimal use of resources.

[0046] For common models such as CNN, MLP, LSTM, and Transformer, the model computational effort can be calculated, and the required hardware resources can be predicted based on experience or specific formulas, and predefined GPU, CPU, and storage resources can be allocated according to FLOPS. Finally, the training time of the neural network model is predicted based on the predicted hardware resources. Through reasonable predictions, users can understand the duration of model training and make corresponding plans and schedules. This is very important for improving overall training efficiency and resource utilization. At the same time, predicting training time can also help users better arrange resource allocation and task scheduling to better utilize computing resources.

[0047] In short, by estimating the amount of computing, predicting the hardware resource situation, and estimating the model training time, we can optimize computing resources in the field of deep learning, improve training efficiency and reasoning speed, and better serve the application scenarios of artificial intelligence.

[0048] 2. Intelligent scheduling: Based on the prediction of the required hardware resources and the predicted training time in the previous step, combined with the status information table of all available cloud platforms, reinforcement learning is used for scheduling.

[0049] Intelligent scheduling first extracts features based on the required hardware resources calculated in point 1 and the predicted training time, and uses the reinforcement learning model to schedule tasks by comprehensively considering the computing, storage, and network conditions of cross-domain devices. Specifically, according to the execution process of reinforcement learning, the reinforcement learning model includes a cross-domain scheduling environment (Environment) and an intelligent scheduling agent (Agent). Figure 2 As shown, it can also include task allocation and monitoring parts.

[0050] The cross-domain scheduling environment contains a limited set of scheduling states, scheduling actions, and scheduling reward signals. The scheduling state is the resource status and current task requirements of different cloud platforms collected in the cloud platform information table, the scheduling action is to assign tasks to corresponding resources, and the scheduling reward signal is the effect and efficiency of task execution. The purpose of this section is to define a Markov decision process (MDP) to describe the essential characteristics of the cross-domain scheduling problem, providing a clear and complete interaction environment and interaction framework for the subsequent reinforcement learning model.

[0051] Furthermore, the scheduling status may include various indicators:

[0052] 1) Queue metrics: number of pending jobs, job type (training vs. inference), priority, and expected computing requirements (memory, CPU / GPU time);

[0053] 2) System indicators: CPU / GPU utilization, memory usage, network bandwidth usage, disk I / O rate, and available storage space of each platform;

[0054] 3) Historical indicators: average waiting time of jobs, recent job completion rate, past scheduling failures or successes;

[0055] 4) Task metrics: predicted training time, required hardware resources, and deadline (if any) for each task to be scheduled;

[0056] 5) Time of day: The time of day (nighttime vs. peak hours) can impact costs and platform availability, especially in a cloud environment.

[0057] The scheduling action is to assign tasks to the corresponding cloud platform and the amount of computing and storage resources that need to be allocated for the job. Scheduling reward signals: The reward function can be based on maximizing the cloud platform hardware utilization or minimizing the job completion time, or ensuring that all jobs are completed before the deadline. Active rewards for maximizing the use of available resources (such as GPU, CPU) to ensure efficient use. In addition, rewards can be given for completing work, with higher rewards for high priority or time-sensitive work. Negative rewards are given for work that exceeds the expected running time or misses the deadline. Positive rewards are given for work that is completed earlier than expected, etc.

[0058] The purpose of the intelligent scheduling agent is to design a solution for learning and optimizing cross-domain scheduling problems, providing an efficient and adaptive decision-making basis for subsequent task allocation and monitoring. This part uses a specific reinforcement learning algorithm to dynamically select a suitable scheduling strategy based on the current resource status and task requirements, and obtain a reward value based on the scheduling results. Considering the complexity of the task, it is preferred to use deep Q learning and proximal policy optimization (PPO) to implement two intelligent scheduling agent algorithms respectively.

[0059] Task allocation and monitoring: Use the scheduling strategy output by the reinforcement learning algorithm to assign tasks to the corresponding cloud platform, and monitor and provide timely feedback on their execution. For the feedback part, the machine learning model can be used to schedule tasks by comprehensively considering the computing, storage and network conditions of cross-domain devices. This module uses a multi-objective optimization algorithm to determine the optimal cloud resource combination and allocation plan based on indicators such as task performance, cost, and availability; at the same time, by using a collaborative filtering algorithm, the execution order and priority of tasks on different cloud platforms are dynamically adjusted according to historical data and user feedback, thereby achieving efficient collaborative scheduling of cross-domain cloud resource tasks. In addition, for monitoring and timely feedback on its execution, it also includes task execution time and memory usage during execution, such as observing that there is a regularity in the use of hardware resources by neural network training tasks. Training for deep neural networks usually shows the characteristics of hierarchical training. The overall memory usage shows a trend of first rising and then falling. Specifically, the forward propagation calculation first rises and then falls during the backward propagation calculation. The change in memory usage for each iteration is the same, such as Figure 3 The purpose of this part is to implement and evaluate the final results of the cross-domain scheduling problem, providing an effective and timely feedback information for the subsequent reinforcement learning model.

[0060] The present invention will be further described below in conjunction with specific embodiments and accompanying drawings.

[0061] A cross-domain cloud platform neural network training task scheduling method based on reinforcement learning of the present invention comprises the following steps:

[0062] Step 1: Obtain the neural network training tasks submitted by users in real time;

[0063] As a preferred solution, the neural network training tasks submitted by users in real time can be constructed into a task queue data structure for easy management;

[0064] Step 2: After the user submits the task information, based on each neural network training task submitted by the user, the script extracts the training information, including: the size of the required training model, data set, training cycle, etc.

[0065] Step 3: Estimate the amount of computation based on the training information extracted in step 2:

[0066] The computational effort is estimated using the total number of floating point operations (FLOPs). The specific formula is as follows:

[0067] FLOAPS=op_fd*(1+bp_to_fd_ratio)*batch_num*batch_size*epoch_num

[0068] Among them, op_fd is the number of calculations during the forward transmission of the neural network, bp_to_fd_ratio is the ratio of the reverse transmission calculation number to the forward transmission, that is, bp_to_fd_ratio=op_bp / op_fd. For most network structures, this ratio is basically 2:1. This is because the reverse transmission needs to calculate the gradient relative to the model parameters, and the gradient of the error back-propagation gradient relative to the neuron input, and each such operation calculation number is equivalent to the number of forward transmission calculations. epoch_num is the number of iterations of the model training data set, batch_num is the number of training data batches included in each epoch, and batch_size is the model training data batch size.

[0069] Step 4: Predict the required hardware resources based on the estimated computational workload in step 3:

[0070] The number of GPUs required is determined based on the amount of computing estimated in step 2. The decision-making method can be heuristic or empirical (for example, allocating 1 V100 GPU for 1 million FLOPS, etc.).

[0071] Step 5: Estimate the training time based on the hardware resources predicted in step 4:

[0072] After obtaining the required hardware resources in step 3, use the model and parameters submitted by the user to perform several epoch pre-training (usually less than 10), collect the time T required for each epoch training, remove the first epoch training result, take the average value U, and then multiply the average value U by the number of model training data set iteration cycles epoch_num, which is the required training time T.

[0073] Step 6: Based on the hardware resources and training time required for each current neural network training task obtained in Steps 4 and 5 and the cloud platform status information table obtained in real time, the reinforcement learning model obtained by training with the goal of minimizing the task completion time is used to make decisions and obtain the final scheduling plan:

[0074] The cloud platform status information table contains the hardware models and available resources of different cloud platforms and the bandwidth data between different cloud platforms and local servers. The method for constructing the cloud platform status information table is as follows: first, collect the bandwidth data between different cloud platforms and local servers (which can be obtained by sending data packets), then collect the hardware models and available resources of different cloud platforms, number the information of all different cloud platforms, draw them into a status information table and store them on the local server, and periodically update the available resources in the status information table.

[0075] The present invention adopts a reinforcement learning model that uses reinforcement learning to schedule deep learning training tasks. The reinforcement learning model includes: an intelligent scheduling agent (Agent) and a cross-domain scheduling environment (Environment), wherein:

[0076] 1) Cross-domain scheduling environment

[0077] The environment represents the external world that the agent can interact with. In this example, the environment is a cloud platform cluster management system that provides the following information:

[0078] The number of available resources

[0079] The number of resources required for the task

[0080] Estimated completion time of the task

[0081] The environment is also responsible for executing the actions chosen by the agent and giving new states and rewards.

[0082] Reward is the feedback received by the agent from the environment after performing an action, which is used to evaluate the quality of the action. In this embodiment, the reward can be designed as the negative value of the task completion time, that is:

[0083] Rt=-tactual

[0084] Among them, tactual is the actual completion time of the task.

[0085] 2) Intelligent Scheduling Agent:

[0086] The intelligent scheduling agent receives state information and rewards from the cross-domain scheduling environment and makes action decisions. In this embodiment, the state st at the t-th time step received from the cross-domain scheduling environment can be expressed as:

[0087] st={rc1,rc2,...,rcn,dj,tj}

[0088] Among them, rci is the number of available resources of the ith cloud platform cluster ci, d j is the hardware resource requirements of task j, t jis the estimated training time for task j.

[0089] In this embodiment, the action decision made is the decision made by the agent based on the current state. In this scenario, the action is to choose which cluster to perform the training task on. The action space can be expressed as:

[0090] at∈{c1,c2,...,cn}

[0091] Among them, ci represents the action of the i-th cloud platform cluster, that is, whether training is performed on the cloud platform cluster.

[0092] In this example, the agent's objective is to maximize the cumulative reward. This can be achieved by solving a Markov decision process (MDP), usually using a reinforcement learning algorithm such as Q-learning or Deep Q-Network (DQN). Taking Q-learning as an example, the update rule is:

[0093] Q new (s t ,a t )←Q(s t ,a t )+α[R t+1 +γmax a′Q(s t+1 ,a′)-Q(s t ,a t )]Q(s t ,a t )←Q(s t ,a t )+α[Rt+1+γmaxa′Q(st+1,a′)-Q(st,at)]

[0094] Among them, α is the learning rate, γ is the discount factor, Q(*) is the Q value, Q new (*) is the updated Q value, and a′ represents the action that is expected to bring the maximum Q value (i.e., the maximum expected cumulative reward) among possible actions. In Q-learning, a greedy strategy is usually used to obtain:

[0095] a'=π(st)=argmaxaQ(st,a)

[0096] When the scheduled tasks in the collected data set are completed, or a certain time step or number of iterations is reached, the training is terminated. In this way, a trained reinforcement learning model can be obtained, and the reinforcement learning model can be used to dynamically schedule deep learning training tasks, thereby optimizing resource utilization and task completion time.

[0097] Step 7: Based on the scheduling plan, the neural network training tasks submitted by the user are scheduled and allocated to the corresponding cloud platform to optimize computing resources in the field of deep learning, improve training efficiency and reasoning speed, and better serve the application scenarios of artificial intelligence.

[0098] Figure 3 The figure shows the change of memory usage of InceptionV3 for neural network training tasks. The present invention can effectively reduce the average completion time of most tasks and improve the utilization rate of cluster resources.

[0099] Corresponding to the aforementioned method for scheduling cross-domain cloud platform neural network training tasks based on reinforcement learning, the present invention also provides a cross-domain cloud platform neural network training task scheduling system based on reinforcement learning, including:

[0100] A data acquisition module is used to acquire in real time the neural network training tasks submitted by the user and a cloud platform status information table acquired in real time; the cloud platform status information table includes the hardware models and available resources of different current cloud platforms and the bandwidth data between different cloud platforms and local servers;

[0101] The data processing module is used to extract training information based on each neural network training task submitted by the user, including: the size of the neural network model to be trained, the data set, and the training cycle; estimate the amount of calculation based on the extracted training information, where the amount of calculation is estimated using the total number of floating-point calculations; predict the required hardware resources based on the estimated amount of calculation, including the number of GPUs; and estimate the training time based on the predicted hardware resources;

[0102] The scheduling plan generation module is used to make decisions based on the current training time of each neural network training task and the cloud platform status information table obtained in real time, using the reinforcement learning method to obtain a reinforcement learning model trained with the goal of minimizing the task completion time, and obtain the final scheduling plan;

[0103] The scheduling module is used to schedule and allocate the neural network training tasks submitted by users to the corresponding cloud platform based on the scheduling plan.

[0104] The system utilizes cross-cloud resource collaboration to achieve functions such as resource discovery, access, management, integration, coordination, conversion, combination, configuration, deployment, monitoring, evaluation and adjustment between different cloud platforms; integrates the resource status of cloud-to-cloud integration, abstractly expresses the attribute values, interconnection relationships and task requirements of cross-domain cloud resources, and provides a unified modeling expression for subsequent task scheduling; based on the resource modeling of task requirements and cloud resources, using machine learning models, tasks are scheduled with comprehensive consideration of the computing, storage and network conditions of cross-domain devices.

Claims

1. A cross-domain cloud platform neural network training task scheduling method based on reinforcement learning, characterized in that: The following steps are involved: Step 1: Obtain the neural network training tasks submitted by users in real time; Step 2: Based on each neural network training task submitted by the user, extract training information, including: the size of the neural network model to be trained, the data set, and the training cycle; Step 3: Estimate the amount of computation based on the training information extracted in step 2, where the amount of computation is estimated using the total number of floating-point calculations; Step 4: Predict the required hardware resources, including the number of GPUs, based on the estimated computational workload in step 3; Step 5: Estimate the training time based on the hardware resources predicted in step 4; Step 6: Based on the hardware resources and training time required for each current neural network training task obtained from Steps 4 to 5 and the cloud platform status information table obtained in real time, a reinforcement learning model trained using a reinforcement learning method with the goal of minimizing the task completion time is used to make a decision and obtain a final scheduling solution. The cloud platform status information table includes the hardware models and available resources of different cloud platforms and the bandwidth data between different cloud platforms and local servers. Step 7: Based on the scheduling plan, the neural network training tasks submitted by the user are scheduled and allocated to the corresponding cloud platform.

2. The method according to claim 1, characterized in that The step 1 also includes: constructing a task queue from the neural network training tasks submitted by users acquired in real time.

3. The method according to claim 1, characterized in that In step 3, the total number of floating point calculations FLOAPS is calculated using the following formula: FLOAPS=op_fd*(1+bp_to_fd_ratio)*batch_num*batch_size*epoch_num Where op_fd is the number of calculations during the forward transmission of the neural network, bp_to_fd_ratio is the ratio of the number of backward transmission calculations to the forward transmission, epoch_num is the number of training cycles, batch_num is the number of training data batches included in each epoch, and batch_size is the batch size of the training data.

4. The method according to claim 1, characterized in that: In step 4, a heuristic or empirical method is used to predict the required number of GPUs.

5. The method according to claim 1, characterized in that In step five, the training time estimation method is as follows: use the model and parameters in the neural network training task submitted by the user to perform pre-training for several training cycles, collect the time required for other training cycles except the first training cycle to calculate the average value, and then multiply the average value by the number of training cycles in the extracted training information to obtain the estimated training time.

6. The method according to claim 1, characterized in that The structure of the neural network is CNN, MLP, LSTM or Transformer.

7. The method according to claim 1, characterized in that The reinforcement learning model includes: an intelligent scheduling agent and a cross-domain scheduling environment, wherein the cross-domain scheduling environment is used to provide the number of available resources, the number of resources required by the task and the estimated completion time of the task, and is responsible for executing the action selected by the intelligent scheduling agent, and giving a new state and reward; the intelligent scheduling agent receives state information and rewards from the cross-domain scheduling environment and makes action decisions.

8. The method according to claim 7, characterized in that The reward is expressed as the negative value of the task completion time; the state includes each cloud platform cluster c i The number of available resources and the hardware resources required by the current task j and the estimated training time; The training is performed using the Q-Learning algorithm training rule. The Q-Learning update rule is: Q new (s t ,a t )←Q(s t ,a t )+α[R t+1 +γmax a′Q(s t+1 ,a′)-Q(s t ,a t )]Q(s t ,a t )←Q(s t ,a t )+α[Rt+1+γmaxa′Q(st+1,a′)-Q(st,at)] Among them, s t ,a t Respectively represent the state and action at time step t, R t+1 represents the reward corresponding to the t+1 time step, α is the learning rate, γ is the discount factor, Q(*) is the Q value, Q new (*) is the updated Q value, and a′ represents the action that is expected to bring the maximum Q value (i.e., the maximum expected cumulative reward) among possible actions.

9. A cross-domain cloud platform neural network training task scheduling system based on reinforcement learning, characterized in that: include: The data acquisition module is used to obtain the neural network training tasks submitted by users and the cloud platform status information table in real time; The cloud platform status information table includes the hardware models and available resources of different current cloud platforms and the bandwidth data between different cloud platforms and local servers; The data processing module is used to extract training information based on each neural network training task submitted by the user, including: the size of the neural network model to be trained, the data set, and the training cycle; estimate the amount of calculation based on the extracted training information, where the amount of calculation is estimated using the total number of floating-point calculations; predict the required hardware resources based on the estimated amount of calculation, including the number of GPUs; and estimate the training time based on the predicted hardware resources; The scheduling plan generation module is used to make decisions based on the hardware resources and training time required for each current neural network training task and the cloud platform status information table obtained in real time, using the reinforcement learning method to obtain a reinforcement learning model trained with the goal of minimizing the task completion time, and obtain the final scheduling plan; The scheduling module is used to schedule and allocate the neural network training tasks submitted by users to the corresponding cloud platform based on the scheduling plan.

Citation Information

Cited By

  • Training method and device, electronic equipment, computer program and storage medium

    CN119292785A

  • Resource scheduling method based on spiking neural network

    CN119294447A

  • Depth neural network-based billing device fault prediction method

    CN119294594A

  • Heterogeneous resource intelligent allocation scheduling method and system based on deep learning

    CN119883648A

  • An intelligent allocation and scheduling method and system for heterogeneous resources based on deep learning

    CN119883648B