Server screening method, device, electronic device and storage medium
By calculating the energy consumption ratio of the server, the problem of difficulty in comprehensively considering server computing power and energy consumption in the existing technology is solved, and servers suitable for training artificial intelligence large models are screened out, achieving the effect of high computing power and low energy consumption.
Patent Information
- Application Number
- CN202411919635.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-01
AI Technical Summary
The prior art lacks a method that comprehensively considers server computing power and energy consumption, and it is difficult to select the servers that are most suitable for training artificial intelligence models from multiple servers.
By determining the first average energy consumption value of the multiple servers in the standby state during the set time period and the second average energy consumption value in the training target model, and calculating the energy consumption ratio of each server based on the number of floating-point operations, the most suitable server is selected.
It realizes that while ensuring high computing power, avoiding the increase in energy consumption and cost, thereby screening out the server that is most suitable for training artificial intelligence large models.
Smart Images

Figure CN119739528A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a server screening method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of computer technology, the training of large artificial intelligence models has become an important research and application direction in various fields. In the process of training large artificial intelligence models, it is necessary to select one from various servers for training the large artificial intelligence model.
[0003] Normally, servers with higher computing power can be selected as target servers for training large AI models. However, as the computing power of the server increases, energy consumption and costs will also increase. Currently, there is no method that comprehensively considers server computing power and energy consumption to select the most suitable server for training large AI models from multiple servers. Summary of the invention
[0004] In order to solve the above-mentioned problems in the prior art, the example of the present application provides a server screening method, device, electronic device and storage medium, which can comprehensively consider the server computing power and energy consumption, and screen out the most suitable server for training large artificial intelligence models from multiple servers.
[0005] In a first aspect, an embodiment of the present application provides a server screening method, comprising:
[0006] Determining a first average energy consumption value of a plurality of servers in a standby state within a set time period;
[0007] Initiate a training process of the target model on the server, and obtain a second average energy consumption value of each of the servers during the training process after the target model completes the training;
[0008] Determine the energy consumption ratio of each of the servers based on the first average energy consumption value, the second average energy consumption value, and the number of floating-point operations corresponding to the target model; the number of floating-point operations is used to characterize the complexity of the target model;
[0009] At least one of the servers used for model training is determined according to the energy consumption ratio.
[0010] By determining the first average energy consumption value of multiple servers in standby state and the second average energy consumption value of multiple servers in the process of training the target model, and based on the number of floating-point operations corresponding to the trained target model that can be obtained, the energy consumption ratio of each server is determined, and based on the energy consumption ratio of each server, at least one server for model training is determined. The energy consumption ratio can be used to screen out servers with stronger computing power per unit energy consumption, avoiding the increase of energy consumption cost while ensuring computing power, that is, high computing power and low energy consumption, which is the most suitable server for training large artificial intelligence models.
[0011] In a possible implementation manner, determining a first average energy consumption value of a plurality of servers in a standby state within a set time period includes:
[0012] Acquire the energy consumption value of the server at every first time interval within a set time period;
[0013] Sorting the acquired multiple energy consumption values by size, and deleting a first number of energy consumption values starting from the maximum value among the sorted multiple energy consumption values, and deleting a second number of energy consumption values starting from the minimum value among the sorted multiple energy consumption values;
[0014] A first average energy consumption value of the server within the set time period is determined based on the remaining energy consumption value.
[0015] By eliminating points close to the maximum value and the minimum value, the noise points contained in the energy consumption values of the server obtained within the set time period can be eliminated, the error can be converged, and the remaining energy consumption values can be more consistent with the actual energy consumption values.
[0016] In a possible implementation, before starting the training process of the target model on the server, the method further includes:
[0017] Select any model identifier from multiple model identifiers as a target model identifier;
[0018] Selecting any floating-point operation number from a plurality of floating-point operation numbers corresponding to the preset target model identifier, and determining a corresponding core parameter based on the any floating-point operation number; the core parameter is used to determine the performance of the target model;
[0019] The target model is configured based on the core parameters.
[0020] Through the above method, the target model identifier can be selected, and the corresponding number of floating-point operations can be determined from multiple floating-point operation numbers, thereby determining the corresponding core parameters, so that the target model can be configured based on the core parameters. Different core parameters can be selected to configure the target model according to user needs. For servers with good performance, core parameters with high floating-point operation numbers can be selected; for servers with poor performance, core parameters with low floating-point operation numbers can be selected, which helps to configure more reasonable core parameters, thereby increasing the accuracy of the determined energy consumption ratio.
[0021] In a possible implementation manner, obtaining the second average energy consumption value of each server during the training process after the target model completes training includes:
[0022] For any one server, the second average energy consumption value of the any one server is determined based on obtaining the energy consumption value of the any one server when each set time point is reached during the training process.
[0023] Through the above method, the second average energy consumption value of each server during the target model training process can be determined, so that the energy consumption ratio corresponding to the server can be determined.
[0024] In a possible implementation manner, determining at least one server for model training according to the energy consumption ratio includes:
[0025] If the number of servers whose energy consumption ratio is greater than or equal to the first threshold is less than the number of servers required for this model training, each of the servers is sorted according to the energy consumption ratio, and the number of servers required for this model training is selected from the maximum value of the energy consumption ratio as the servers required for this model training;
[0026] If the number of servers whose energy consumption ratio is greater than or equal to the first threshold is greater than the number of servers required for this model training, then the number of servers required for this model training is randomly selected from the servers whose energy consumption ratio is greater than or equal to the first threshold as the servers required for this model training; or the servers whose energy consumption ratio is greater than or equal to the first threshold are sorted according to the energy consumption ratio, and the number of servers required for this model training is selected from the maximum value of the energy consumption ratio as the servers required for this model training.
[0027] Through the above method, it can be determined that the first threshold can be used to screen servers. However, the number of servers required for this model training also plays a key role in the screening of servers. According to the relationship between the number of servers screened by the first threshold and the number of servers required for this model training, different methods can be used to screen out servers that can be used as the required servers for this model training. Using multiple methods to screen servers in different situations is more flexible and avoids the problem of being unable to screen out the corresponding number of servers.
[0028] In a possible implementation, the method further includes:
[0029] In response to the user's first viewing operation, after selecting the server required for the current model training, the server identifier and the corresponding energy consumption ratio corresponding to the server required for the current model training are displayed; and / or
[0030] In response to the user's second viewing operation, the server identifiers and corresponding energy consumption ratios of each server except the servers required for the current model training are displayed.
[0031] Through the above method, after screening the servers and determining the servers required for model training, the present application can receive different viewing operations from users, and can perform corresponding display operations for different viewing operations, so that users can judge the screening process while viewing the screening results.
[0032] In a possible implementation, the method further includes:
[0033] After selecting the server required for this model training, the model training is performed using the server required for this model training;
[0034] If the energy consumption value of any server obtained at any time during the model training process is greater than the second threshold, a corresponding alarm message is generated based on the any server;
[0035] If a replacement instruction is received, the current model training is paused and the training progress of the current model training is obtained;
[0036] The model corresponding to the current model training is saved to the server corresponding to the replacement instruction;
[0037] The training progress is sent to the server corresponding to the replacement instruction, and the model training is continued.
[0038] Through the above method, during the process of using the screened servers for model training, if the energy consumption value of the server is greater than the second threshold, an alarm information can be generated to avoid the increase in energy consumption and cost during the training process. In addition, according to the user's replacement instructions, other designated servers can be used to continue training in the current model training progress, thereby enhancing the disaster recovery capability of the server and better ensuring the stability of energy consumption during the model training process.
[0039] In a second aspect, an embodiment of the present application provides a server screening device, including:
[0040] An average energy consumption value determining unit, used to determine a first average energy consumption value of a plurality of servers in a standby state within a set time period;
[0041] Initiate a training process of the target model on the server, and obtain a second average energy consumption value of each of the servers during the training process after the target model completes the training;
[0042] A server determination unit, configured to determine an energy consumption ratio of each of the servers based on the first average energy consumption value, the second average energy consumption value, and the number of floating-point operations corresponding to the target model; the number of floating-point operations is used to characterize the complexity of the target model;
[0043] At least one of the servers used for model training is determined according to the energy consumption ratio.
[0044] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0045] A memory for storing program instructions;
[0046] The processor is used to call the program instructions stored in the memory and execute the steps included in the method described in the first aspect according to the obtained program instructions.
[0047] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0048] The example of the present application provides a server screening method, device, electronic device and storage medium, which can determine the first average energy consumption value of multiple servers in standby state within a set time period, and start the training process of the target model on the server, obtain the second average energy consumption value of each server in the training process after the target model is trained, and finally determine the energy consumption ratio of each server based on the first average energy consumption value, the second average energy consumption value, and the number of floating-point operations corresponding to the target model, so as to determine at least one of the servers used for model training according to the energy consumption ratio. Through the server screening method provided by the embodiment of the present application, servers with stronger computing power under unit energy consumption can be screened out by energy consumption ratio, avoiding the increase of energy consumption cost while ensuring computing power, that is, high computing power and low energy consumption, that is, the server that is most suitable for training large artificial intelligence models and other models. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0050] Figure 1 A schematic diagram of an application scenario of a server screening method provided in an embodiment of the present application;
[0051] Figure 2 A schematic diagram of a flow chart of a server screening method provided in an embodiment of the present application;
[0052] Figure 3 A schematic diagram of a specific process of a server screening method provided in an embodiment of the present application;
[0053] Figure 4 A structural block diagram of a server screening method provided in an embodiment of the present application;
[0054] Figure 5 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Among them, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0056] In the description of the embodiments of the present application, unless otherwise specified, "and" means or. For example, A / B can mean A or B. The "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0057] Specifically, in the description of the present application, it needs to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application, and, unless otherwise specified, the "connection" and "connection" mentioned in the present application include direct and indirect connections (connections).
[0058] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0059] The present application is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0060] In one possible embodiment, Figure 1 A schematic diagram of an application scenario of a server screening method provided in an embodiment of the present application is shown. Figure 1 As shown, Figure 1A server 100, a terminal device 200 and a power meter 300 are included. The server 100, the terminal device 200 and the power meter 300 are connected to each other, the data of the server 100 can be obtained by the power meter 300, the data in the power meter 300 can be obtained by the terminal device 200, and the terminal device 200 can also control the server to perform actions such as model training. It should be noted that the present application can screen multiple servers or server clusters or multiple server clusters, then the multiple servers or server clusters or multiple server clusters that need to be screened can be connected to the terminal device 200 at the same time, and each server is connected to the corresponding power meter, and each power meter is connected to the terminal device 200, so as to realize the application scenario diagram of a server screening method provided in an embodiment of the present application.
[0061] Figure 1 The application scenario is only an example of an application scenario for implementing the embodiment of the present application. The embodiment of the present application is not limited to the above Figure 1 The application scenarios described. The fault testing method provided by the exemplary embodiment of the present application is described below with reference to the accompanying drawings in combination with the application scenarios described above. It should be noted that the application scenarios described above are only shown to facilitate understanding of the spirit and principles of the present application, and the implementation of the present application is not limited in this respect.
[0062] Figure 2 A schematic diagram of a server screening method provided in an embodiment of the present application is shown. Figure 2 As shown, the method may include the following steps:
[0063] Step S201, determining a first average energy consumption value of a plurality of servers in a standby state within a set time period.
[0064] In one possible embodiment, press Figure 1 The application scenario shown connects multiple servers or server clusters to be screened, and then starts multiple servers or server clusters. During a set time period, the power meter's USB serial port can capture the energy consumption values of multiple servers or server clusters in standby mode at first time intervals. The set time period can be 180 seconds, 175 seconds, or other values. Similarly, the first time interval can be 0.5 seconds, 1 second, or other values, which are not limited in this application. In the following description, multiple servers will be screened for implementation.
[0065] In a possible embodiment, after obtaining multiple energy consumption values of multiple servers within a set time period, the obtained multiple energy consumption values can be sorted by size, and the first number of energy consumption values can be deleted starting from the maximum value of the sorted multiple energy consumption values, and the second number of energy consumption values can be deleted starting from the minimum value of the sorted multiple energy consumption values. For example, 1000 energy consumption values are obtained. If the first number is 20 and the second number is 30, then after sorting the 1000 energy consumption values, the first 20 data can be deleted, and then the last 30 data can be deleted. Normally, the first number of energy consumption values and the second number of energy consumption values may be noise data. When they are at extreme values, the energy consumption value of the server may not be stable, and the collected energy consumption values may fluctuate. Therefore, the noise data can be deleted and then the first average energy consumption value of the server within the set time period can be determined based on the remaining energy consumption values, so that the error of the first average energy consumption value can converge and the remaining energy consumption values can be more consistent with the actual energy consumption value. It should be noted that the first quantity and the second quantity can be different quantities or the same quantity, and the first quantity and the second quantity can be assigned values according to different needs, which is not limited in this application.
[0066] In a possible embodiment, the first average energy consumption value of the server can be determined by taking an average value. For example, after obtaining 1000 energy consumption values, 950 energy consumption values remain by removing noise points. Then, these 950 energy consumption values can be added up, and the summed data can be divided by 950 to obtain the average value of these energy consumption values, that is, the first average energy consumption value. It should be noted that the first average energy consumption value can also be determined by the median or other methods, which is not limited in this application.
[0067] Step S202: start the training process of the target model on the server, and obtain the second average energy consumption value of each server during the training process after the target model is trained.
[0068] In a possible embodiment, before executing step S202, the target model to be trained can be selected and configured. In the terminal device, multiple models can be stored, each model corresponds to a model identifier, and each model identifier corresponds to multiple floating-point operation times for characterizing the complexity of the model. At the same time, different floating-point operation times also correspond to different core parameters for determining the performance of the model. For example, in the terminal device, two model identifiers, LLaMA1 and LLaMA2, can be stored, wherein the floating-point operation times included in the LLaMA1 model corresponding to the identifier LLaMA1 can include three cases of 1.12E+16, 2.15E+16, and 5.34E+16, and the floating-point operation times included in the LLaMA2 model corresponding to the identifier LLaMA2 can include three cases of 2.42E+16, 4.57E+16, and 2.33E+17. The core parameters corresponding to each case are different. The target model identifier, the corresponding floating-point operation times and the core parameters can be selected by random selection or receiving user input. The present application does not limit the selection method. After the core parameters are determined, the target model corresponding to the target model identifier can be configured using the core parameters.
[0069] Among them, the core parameters may include: the model size measured by the number of parameters in the model Model size; the global batch size GBS used in each iteration during the training process; the batch size refers to the number of samples input each time the model is trained, and the maximum length of a single sequence SeqLen when the model processes the input; the number of layers Layers contained in the model; the number of hidden units in each layer of the neural network of the model HiddenSize; the hidden layer size of the feedforward neural network FFNHiddensize; the number of "heads" in the multi-head self-attention mechanism Numberhead; the number of query groups Numberquerygroup; the number of unique tokens that the model can process, that is, the vocabulary size Vocabsize. The number of floating-point operations FLOPs can be determined by the following formula:
[0070] In a possible embodiment, after completing the configuration of the target model, the target model can be loaded into multiple servers to be screened and training can be started. After the training of each server is completed, the second average energy consumption value can be obtained based on the log file, wherein the log file may include the energy consumption value of the server obtained when each set time point is reached during the training process, or the energy consumption value of the server at each time point can be directly obtained through a power meter during the training process. The present application does not limit the method for obtaining the server energy consumption value. Similar to the method for determining the first average energy consumption value, in the process of determining the second average energy consumption value, the multiple energy consumption values obtained can also be sorted by size, and starting from the maximum value of the sorted multiple energy consumption values, the first number of energy consumption values can be deleted, and starting from the minimum value of the sorted multiple energy consumption values, the second number of energy consumption values can be deleted, and then the second average energy consumption value of the server can be determined by taking the average value or the median or other methods.
[0071] Step S203, determining the energy consumption ratio of each server based on the first average energy consumption value, the second average energy consumption value, and the number of floating-point operations corresponding to the target model.
[0072] In a possible embodiment, the difference between the first average energy consumption value and the second average energy consumption value, i.e., the model training energy consumption value, can be first determined, and then the number of floating-point operations corresponding to the target model is divided by the product of the model training energy consumption value and the time used to train the target model, and the result is recorded as the energy consumption ratio. The time used to train the target model can be determined based on a log file generated after the training is completed. The log file includes the training start time and the training end time. The training end time can be used to subtract the training start time to obtain the time used to train the target model.
[0073] Step S204: determine at least one server for model training according to the energy consumption ratio.
[0074] In a possible embodiment, the at least one server used for this model training refers to the server that needs to be selected through this screening process. Therefore, the number of the at least one server used for model training can be set in advance by the user, and the user can also set the first threshold corresponding to the energy consumption ratio. Normally, when the energy consumption ratio of the determined server is greater than the first threshold, it can be considered that the server meets the screening conditions and can be put into use in subsequent model training.
[0075] Among them, if the number of servers whose energy consumption ratio is greater than or equal to the first threshold is less than the number of servers required for this model training, each server can be sorted according to the energy consumption ratio, and the number of servers required for this model training is selected from the maximum value of the energy consumption ratio as the servers required for this model training. For example, the number of servers whose energy consumption ratio is greater than or equal to the first threshold is 3, and the number of servers required for this model training is 5. The servers whose energy consumption ratio is greater than or equal to the first threshold are not enough to serve as the servers required for this model training. Therefore, the multiple servers to be screened can be sorted according to the energy consumption ratio, and the top 5 servers in terms of energy consumption ratio are selected as the servers required for this model training.
[0076] If the number of servers whose energy consumption ratio is greater than or equal to the first threshold is equal to the number of servers required for this model training, the servers whose energy consumption ratio is greater than or equal to the first threshold can be directly used as the servers required for this model training.
[0077] If the number of servers whose energy consumption ratio is greater than or equal to the first threshold is greater than the number of servers required for this model training, the number of servers required for this model training can be randomly selected from the servers whose energy consumption ratio is greater than or equal to the first threshold as the servers required for this model training, or the servers whose energy consumption ratio is greater than or equal to the first threshold are sorted according to the energy consumption ratio, and the number of servers required for this model training is selected from the maximum value of the energy consumption ratio as the servers required for this model training. For example, the number of servers whose energy consumption ratio is greater than or equal to the first threshold is 7, and the number of servers required for this model training is 5. The number of servers whose energy consumption ratio is greater than or equal to the first threshold is more than the number of servers required for this model training. Therefore, 5 servers can be randomly selected from the servers whose energy consumption ratio is greater than or equal to the first threshold as the servers required for this model training, or the top 5 servers in energy consumption ratio can be selected from the servers whose energy consumption ratio is greater than or equal to the first threshold as the servers required for this model training. This application is not limited here.
[0078] In a possible embodiment, after selecting the server required for this model training, if a first viewing operation input by the user is received, the server identifiers and corresponding energy consumption ratios corresponding to the servers required for this model training can be displayed. If a second viewing operation input by the user is received, the server identifiers and corresponding energy consumption ratios corresponding to the multiple servers to be screened except for the servers required for this model training can be displayed. For example, the server identifiers included in the multiple servers to be screened include server 1, server 2, server 3, and server 4, and the server identifiers corresponding to the servers required for this model training are server 2 and server 4. If a first viewing operation input by the user is received, the server identifiers of server 2 and server 4 and the energy consumption ratios of the servers corresponding to each server identifier can be displayed. If a second viewing operation input by the user is received, the server identifiers of server 1 and server 3 and the energy consumption ratios of the servers corresponding to each server identifier can be displayed.
[0079] In a possible embodiment, in the process of performing model training using the server required for this model training, the model training process can be monitored using a power meter. If the energy consumption value of any server obtained by the power meter at any time is greater than the second threshold, a corresponding alarm information is generated based on any server whose energy consumption value is greater than the second threshold. The alarm information may be a server identifier corresponding to the server that prompts the user that the energy consumption value is greater than the second threshold. The terminal device may display the alarm information to the user. After receiving the alarm information, the user may send a replacement instruction to the terminal device. After receiving the replacement instruction sent by the user, the terminal device may suspend the model training, obtain the training progress of this model training, save the model corresponding to this model training to the server corresponding to the replacement instruction, and send the training progress to the server corresponding to the replacement instruction, thereby continuing the model training. After receiving the alarm information, the user may also send an instruction to continue training to the terminal device. After receiving the instruction to continue training sent by the user, the terminal device may continue training and increase the monitoring frequency of the server whose energy consumption value is greater than the second threshold, so that the alarm information can be sent to the user again after the energy consumption value of the server is greater than the second threshold for a period of time.
[0080] The example of the present application provides a server screening method, device, electronic device and storage medium, which can determine the first average energy consumption value of multiple servers in standby state within a set time period, and start the training process of the target model on the server, obtain the second average energy consumption value of each server in the training process after the target model is trained, and finally determine the energy consumption ratio of each server based on the first average energy consumption value, the second average energy consumption value, and the number of floating-point operations corresponding to the target model, so as to determine at least one of the servers used for model training according to the energy consumption ratio. Through the server screening method provided by the embodiment of the present application, servers with stronger computing power under unit energy consumption can be screened out by energy consumption ratio, avoiding the increase of energy consumption cost while ensuring computing power, that is, high computing power and low energy consumption, that is, the server that is most suitable for training large artificial intelligence models and other models.
[0081] In a specific embodiment, Figure 3 A specific flow chart of a server screening method provided by an embodiment of the present application is shown, such as Figure 3 As shown, the method may include the following steps:
[0082] Step S301: acquiring the energy consumption value of the server at every first time interval within a set time period.
[0083] Step S302, sorting the acquired multiple energy consumption values, and deleting a first number of energy consumption values starting from the maximum value among the sorted multiple energy consumption values, and deleting a second number of energy consumption values starting from the minimum value among the sorted multiple energy consumption values.
[0084] Step S303: determining a first average energy consumption value of the server within a set time period based on the remaining energy consumption value.
[0085] Step S304: select any model identifier from multiple model identifiers as a target model identifier.
[0086] Step S305 , selecting any floating-point operation number from a plurality of floating-point operation numbers corresponding to a preset target model identifier, and determining a corresponding core parameter based on any floating-point operation number.
[0087] Step S306, configuring the target model based on the core parameters, and starting the training process of the target model on the server.
[0088] Step S307, for any server, based on obtaining the energy consumption value of any server when each set time point is reached during the training process, determine the second average energy consumption value of any server.
[0089] Step S308, determine whether the number of servers whose energy consumption ratio is greater than or equal to the first threshold is less than the number of servers required for this model training. If so, execute step S309; if not, execute step S310.
[0090] Step S309, sorting each server according to the energy consumption ratio, and selecting the servers required for the current model training starting from the maximum energy consumption ratio as the servers required for the current model training. Then, step S311 is executed.
[0091] Step S310, randomly select the number of servers required for this model training from the servers whose energy consumption ratio is greater than or equal to the first threshold as the servers required for this model training, or sort the servers whose energy consumption ratio is greater than or equal to the first threshold according to the energy consumption ratio, and select the number of servers required for this model training from the maximum energy consumption ratio as the servers required for this model training.
[0092] Step S311, in response to the user's first viewing operation, the server identifier corresponding to the server required for this model training and the corresponding energy consumption ratio are displayed.
[0093] Step S312, in response to the user's second viewing operation, the server identifiers and corresponding energy consumption ratios of each server except the servers required for this model training are displayed.
[0094] Step S313: Model training is performed using the servers required for this model training. If the energy consumption value of any server obtained at any time is greater than the second threshold, corresponding alarm information is generated based on any server.
[0095] Step S314, if a replacement instruction is received, the current model training is suspended, and the training progress of the current model training is obtained, the model corresponding to the current model training is saved to the server corresponding to the replacement instruction, the training progress is sent to the server corresponding to the replacement instruction, and the current model training is continued.
[0096] Based on the same inventive concept, Figure 4 A structural block diagram of a server screening device provided in an embodiment of the present application, such as Figure 4 As shown, the server screening device 400 may include:
[0097] The average energy consumption value determining unit 401 is used to determine a first average energy consumption value of a plurality of servers in a standby state within a set time period;
[0098] Initiate a training process of the target model on the server, and obtain a second average energy consumption value of each of the servers during the training process after the target model completes the training;
[0099] The server determination unit 402 is used to determine the energy consumption ratio of each of the servers based on the first average energy consumption value, the second average energy consumption value, and the number of floating-point operations corresponding to the target model; the number of floating-point operations is used to characterize the complexity of the target model;
[0100] At least one of the servers used for model training is determined according to the energy consumption ratio.
[0101] In a possible implementation, the average energy consumption value determining unit 401 is specifically configured to obtain the energy consumption value of the server at every first time interval within a set time period;
[0102] Sorting the acquired multiple energy consumption values by size, and deleting a first number of energy consumption values starting from the maximum value among the sorted multiple energy consumption values, and deleting a second number of energy consumption values starting from the minimum value among the sorted multiple energy consumption values;
[0103] A first average energy consumption value of the server within the set time period is determined based on the remaining energy consumption value.
[0104] In a possible implementation manner, the average energy consumption value determining unit 401 is further configured to select any model identifier from a plurality of model identifiers as a target model identifier;
[0105] Selecting any floating-point operation number from a plurality of floating-point operation numbers corresponding to the preset target model identifier, and determining a corresponding core parameter based on the any floating-point operation number; the core parameter is used to determine the performance of the target model;
[0106] The target model is configured based on the core parameters.
[0107] In a possible implementation, the average energy consumption value determination unit 401 is specifically used to determine the second average energy consumption value of any one server based on obtaining the energy consumption value of any one server when each set time point is reached during the training process.
[0108] In a possible implementation, the server determination unit 402 is specifically configured to sort each of the servers according to the energy consumption ratio, and select the number of servers required for the current model training from the maximum value of the energy consumption ratio as the servers required for the current model training if the number of servers whose energy consumption ratio is greater than or equal to the first threshold is less than the number of servers required for the current model training;
[0109] If the number of servers whose energy consumption ratio is greater than or equal to the first threshold is greater than the number of servers required for this model training, then the number of servers required for this model training is randomly selected from the servers whose energy consumption ratio is greater than or equal to the first threshold as the servers required for this model training; or the servers whose energy consumption ratio is greater than or equal to the first threshold are sorted according to the energy consumption ratio, and the number of servers required for this model training is selected from the maximum value of the energy consumption ratio as the servers required for this model training.
[0110] In a possible implementation, the server determination unit 402 is further configured to respond to the user's first viewing operation, and after selecting the server required for the current model training, display the server identifier and the corresponding energy consumption ratio corresponding to the server required for the current model training; and / or
[0111] In response to the user's second viewing operation, the server identifiers and corresponding energy consumption ratios of each server except the servers required for the current model training are displayed.
[0112] In a possible implementation manner, the server determination unit 402 is further configured to, after selecting the server required for the current model training, perform model training using the server required for the current model training;
[0113] If the energy consumption value of any server obtained at any time during the model training process is greater than the second threshold, a corresponding alarm message is generated based on the any server;
[0114] If a replacement instruction is received, the current model training is paused and the training progress of the current model training is obtained;
[0115] The model corresponding to the current model training is saved to the server corresponding to the replacement instruction;
[0116] The training progress is sent to the server corresponding to the replacement instruction, and the model training is continued.
[0117] Based on the same inventive concept, the embodiment of the present application provides an electronic device, which can implement the function of the server screening method discussed above, please refer to Figure 5 The electronic device 500 includes a memory 501, a processor 502 and a bus 503.
[0118] The memory 501 is used to store computer programs executed by the processor 502. The memory 501 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0119] The memory 501 may be a volatile memory (volatile MBeMBory), such as a random access memory (rando MBeMBory, RAMB); the memory 501 may also be a non-volatile memory (non-volatile MBeMBory), such as a read-only memory, a flash memory (flash MBeMBory), a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 501 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 501 may be a combination of the above memories.
[0120] The processor 502 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 502 is used to implement the server screening method in the above embodiment when calling the computer program stored in the memory 501 .
[0121] The specific connection medium between the memory 501 and the processor 502 is not limited in the embodiment of the present application. Figure 5 In the embodiment, the memory 501 and the processor 502 are connected via a bus 503. The bus 503 is connected to the processor 502 via a bus 503. Figure 5 The connections between other components are shown in bold lines, and are not intended to be limiting. Bus 503 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0122] Based on the same inventive concept, the embodiment of the present application provides a computer-readable storage medium, and the computer program product includes: computer program code, when the computer program code is executed on a computer, the computer executes any of the server screening methods discussed above. Since the principle of solving the problem by the above-mentioned computer-readable storage medium is similar to that of the server screening method, the implementation of the above-mentioned computer-readable storage medium can refer to the implementation of the method, and the repeated parts will not be repeated.
[0123] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0124] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0125] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0127] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A server screening method, characterized in that: include: Determining a first average energy consumption value of a plurality of servers in a standby state within a set time period; Initiate a training process of the target model on the server, and obtain a second average energy consumption value of each of the servers during the training process after the target model completes the training; Determine the energy consumption ratio of each of the servers based on the first average energy consumption value, the second average energy consumption value, and the number of floating-point operations corresponding to the target model; the number of floating-point operations is used to characterize the complexity of the target model; At least one of the servers used for model training is determined according to the energy consumption ratio.
2. The method according to claim 1, characterized in that The determining of a first average energy consumption value of a plurality of servers in a standby state within a set time period includes: Acquire the energy consumption value of the server at every first time interval within a set time period; Sorting the acquired multiple energy consumption values by size, and deleting a first number of energy consumption values starting from the maximum value among the sorted multiple energy consumption values, and deleting a second number of energy consumption values starting from the minimum value among the sorted multiple energy consumption values; A first average energy consumption value of the server within the set time period is determined based on the remaining energy consumption value.
3. The method according to claim 1, characterized in that Before starting the training process of the target model on the server, the method further includes: Select any model identifier from multiple model identifiers as a target model identifier; Selecting any floating-point operation number from a plurality of floating-point operation numbers corresponding to the preset target model identifier, and determining a corresponding core parameter based on the any floating-point operation number; the core parameter is used to determine the performance of the target model; The target model is configured based on the core parameters.
4. The method according to claim 1, characterized in that After the target model completes training, obtaining a second average energy consumption value of each of the servers during the training process includes: For any one server, the second average energy consumption value of the any one server is determined based on obtaining the energy consumption value of the any one server when each set time point is reached during the training process.
5. The method according to claim 1, characterized in that The step of determining at least one server for model training according to the energy consumption ratio includes: If the number of servers whose energy consumption ratio is greater than or equal to the first threshold is less than the number of servers required for this model training, each of the servers is sorted according to the energy consumption ratio, and the number of servers required for this model training is selected from the maximum value of the energy consumption ratio as the servers required for this model training; If the number of servers whose energy consumption ratio is greater than or equal to the first threshold is greater than the number of servers required for this model training, then the number of servers required for this model training is randomly selected from the servers whose energy consumption ratio is greater than or equal to the first threshold as the servers required for this model training; or the servers whose energy consumption ratio is greater than or equal to the first threshold are sorted according to the energy consumption ratio, and the number of servers required for this model training is selected from the maximum value of the energy consumption ratio as the servers required for this model training.
6. The method according to claim 5, characterized in that The method further comprises: In response to the user's first viewing operation, after selecting the server required for the current model training, the server identifier and the corresponding energy consumption ratio corresponding to the server required for the current model training are displayed; and / or In response to the user's second viewing operation, the server identifiers and corresponding energy consumption ratios of each server except the servers required for the current model training are displayed.
7. The method according to claim 6, characterized in that The method further comprises: After selecting the server required for this model training, the model training is performed using the server required for this model training; If the energy consumption value of any server obtained at any time during the model training process is greater than the second threshold, a corresponding alarm message is generated based on the any server; If a replacement instruction is received, the current model training is paused and the training progress of the current model training is obtained; The model corresponding to the current model training is saved to the server corresponding to the replacement instruction; The training progress is sent to the server corresponding to the replacement instruction, and the model training is continued.
8. A server screening device, characterized in that: include: An average energy consumption value determining unit, used to determine a first average energy consumption value of a plurality of servers in a standby state within a set time period; Initiate a training process of the target model on the server, and obtain a second average energy consumption value of each of the servers during the training process after the target model completes the training; A server determination unit, configured to determine an energy consumption ratio of each of the servers based on the first average energy consumption value, the second average energy consumption value, and the number of floating-point operations corresponding to the target model; the number of floating-point operations is used to characterize the complexity of the target model; At least one of the servers used for model training is determined according to the energy consumption ratio.
9. An electronic device, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the steps included in any one of claims 1-7 according to the obtained program instructions.
10. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.