Configuration method and configuration system for machine learning task

The machine learning task template configuration method simplifies the creation and management of tasks in Kubernetes clusters, solves complexity and security issues, improves task scalability and operational security, and realizes automated management and status monitoring of resources.

CN118586512APending Publication Date: 2024-09-03NUCTECH JIANGSU CO LTD +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202310213216.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-03
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

In the existing technology, the creation and management of machine learning tasks in the Kubernetes cluster are complicated, require high technical level to write format files, are unsafe, and difficult to maintain. There is a lack of unified description of task running status, abnormal status location is time-consuming, and resources are not available in time. Recycling affects cluster efficiency.

Method used

Provides machine learning task template configuration methods, including resource definition template files, variable declaration files and basic information. It automatically manages and monitors events through the task template controller, generates task status, simplifies the task creation and management process, lowers the threshold, and improves scalability. and operational safety.

Benefits of technology

It reduces the difficulty of creating machine learning tasks, simplifies the creation process, improves task scalability and operational security, reduces developers' manual operations, and improves task status monitoring and resource recycling efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118586512A
    Figure CN118586512A
Patent Text Reader

Abstract

The invention relates to a configuration method and a configuration system for machine learning tasks. The configuration method of the machine learning task template comprises the following steps: a first configuration step: configuring a resource definition template file list in the machine learning task template; a second configuration step: configuring a variable declaration file in the machine learning task template; a third configuration step: configuring basic information of the machine learning task template; and a publishing step: submitting task template resources created according to the configured resource definition template file list, the variable declaration file and the basic information to the back end of the cluster server and publishing the task template resources so that a user can call the machine learning task template to create a machine learning task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to machine learning, and in particular to the technical field of configuring machine learning tasks in a cluster server. Background Art

[0002] In the past, there was a task management platform dedicated to machine learning task development. The task management platform managed and scheduled resources such as CPU, memory, and GPU used for machine learning task development in a clustered and unified manner, and ran tasks in various stages of the machine learning task development process, including code development, debugging, training, testing, and model services, through containers. The current mainstream cluster scheduling framework includes Kubernetes. Kubernetes uses different resource types to manage containers, configuration files, and services in machine learning task development. Kubernetes provides the Kubectl command-line tool for adding, deleting, modifying, and searching for built-in resources.

[0003] Defining the tasks of the machine learning scenario as resource types supported by Kubernetes and deploying them to the Kubernetes cluster mainly includes the following solutions. Write a format file for the machine learning task, which can be a YAML format file or a Helm package file. Define the containers, configurations, services and other resources included in the task as resource types supported by Kubernetes, install and delete each resource separately through the Kubernetes tool, and manage each type of sub-resource separately by the Kubernetes default controller. When you need to obtain the running status of the container, the address assigned to the service, etc., you need to use the Kubectl tool to query the resource details of the corresponding type and name.

[0004] In the above technologies, the writing of format files requires understanding the format and syntax of Kubernetes built-in resource types, which requires users to have high technical skills. In addition, installing format files through the Kubernetes tool requires cluster administrator privileges, and the content of the format files cannot be restricted, so it is not safe. Furthermore, if a task contains multiple containers, multiple resources, etc., it is necessary to query them separately through the Kube ctl tool, and filter out valid information from the query results, which is a complicated process. For YAML format files, there are also the following problems: when adjusting the definition of resources, such as modifying images, resources, commands, etc., it is necessary to rewrite them, and the process is cumbersome; if a task contains multiple containers, multiple resources, etc., it is necessary to install, query, delete, etc. separately through the Kubectl tool, which is difficult to maintain.

[0005] In addition, in previous technologies, there is a lack of a unified description of the running status of tasks, and developers need to query the status of all resources included in the task and manually summarize them. In addition, in previous technical solutions, when a task is in an abnormal state, when developers want to know the reason or related information why the task is in this state, users need to query all resources and combine other related information to manually summarize and locate the cause, which is very time-consuming and labor-intensive. In addition, in previous technologies, when a task fails, errors, or is completed, all resources remain on the Kubernetes cluster, and developers need to manually execute Kubectl or Helm tools to delete related resources. If they are not deleted, when such tasks continue to increase, the efficiency of cluster scheduling, querying, and other operations will be affected. Summary of the invention

[0006] In order to solve at least one of the above problems, the present invention provides a configuration method for a template of a machine learning task, a configuration method for a machine learning task, and a configuration system.

[0007] The first method of the present application provides a method for configuring a machine learning task template, including: a first configuration step, configuring a resource definition template file list in the machine learning task template; a second configuration step, configuring a variable declaration file in the machine learning task template; a third configuration step, configuring basic information of the machine learning task template; and a publishing step, submitting the task template resources created according to the configured resource definition template file list, variable declaration file and basic information to the cluster server backend and publishing them, so that users can call the machine learning task template to create machine learning tasks.

[0008] By configuring machine learning task templates, when users need to create machine learning tasks, they can select different task templates according to different types of machine learning tasks, so there is no need to rewrite code to define resource definition files and variables, thereby reducing the difficulty of creating machine learning tasks and saving time.

[0009] In the above-mentioned configuration method of the machine learning task template, the variable declaration file contains at least one of the name, type, attribute, default value, and verification rule of each variable, and the basic information includes the name, version, and public status of the task template.

[0010] The above-mentioned method for configuring a machine learning task template also includes a task template controller configuration step, in which a task template controller for managing the machine learning task template is configured on the back end of the cluster server.

[0011] The above-mentioned configuration method of the machine learning task template also includes: a monitoring step, in which the task template controller monitors the events of the task template resources in the machine learning task template; and a processing step, in which the task template controller processes the task template in response to the monitored events.

[0012] In the above-mentioned configuration method of the machine learning task template, the events include the addition, modification and deletion of the task template resources. The task template controller adds the monitored task template resource events to the event queue in sequence and processes the event queue serially.

[0013] By configuring the above task controller, users do not need to query the details of task template resources separately through Kubectl, and can automatically manage task templates in a unified manner.

[0014] The second mode of the present invention provides a configuration method for a machine learning task, including: a template calling step, calling the task template of the selected machine learning task from the back end of the cluster server via an interface at the front end of the cluster server, the task template including a resource definition template file list, a variable declaration file and basic information; a variable configuration form generating step, automatically generating a variable configuration form at the front end of the cluster server by calling the task template; a variable value obtaining step, obtaining the variable value set by the user for the variable configuration form generated for the front end page of the cluster server; a verification step, verifying the variable configuration form after obtaining the variable value; and a task submission step, submitting the machine learning task corresponding to the variable configuration form after the verification to the back end of the cluster server, the machine learning task including the task template name and the variable value.

[0015] According to the above-mentioned method for configuring machine learning tasks, in the configuration of machine learning tasks, the difficulty of creating machine learning tasks is reduced, the creation process of machine learning tasks is simplified, and the scalability of tasks is improved.

[0016] In the above-mentioned configuration method of machine learning tasks, the variable declaration file contains at least one of the name, type, attribute, default value, and verification rule of each variable, and the basic information includes the name, version, and public status of the task template.

[0017] The above-mentioned method for configuring machine learning tasks also includes a task resource deployment step, in which the cluster server backend automatically deploys the task resources for the machine learning task based on the task template and variable values ​​contained in the machine learning task.

[0018] The above-mentioned method for configuring machine learning tasks also includes a task controller configuration step, in which a task controller for managing the machine learning tasks is configured on the back end of the cluster server.

[0019] The above-mentioned method for configuring machine learning tasks also includes: an association step, in which the task controller is associated with the task resources of the machine learning task at the back end of the cluster server; a monitoring step, in which the task controller automatically monitors the events of the task resources in the task resource list of the machine learning task during the operation of the machine learning task; and a processing step, in which the task controller processes the machine learning task in response to the event.

[0020] In the above-mentioned method for configuring a machine learning task, in the processing step, the task controller aggregates the status of all task resources to generate the status of the machine learning task.

[0021] According to the configuration of the task controller described above, when a user needs to query the status of all resources included in a task, there is no need to use the Kubectl tool to query the task resources separately. The task controller can perform unified summarization to obtain the status of the task resources.

[0022] In addition, according to the configuration of the above-mentioned task controller, task resources can be managed automatically, and developers do not need to manually execute Kubectl or Helm tools to delete related resources. Therefore, when the task reaches the final state, it can be recycled immediately or periodically to reduce the management pressure on the server.

[0023] A third method of the present application relates to a configuration system for machine learning tasks, comprising: a template calling unit, which calls the task template of a selected machine learning task from the back end of a cluster server via an interface at the front end of a cluster server, wherein the task template includes a list of resource definition template files, a variable declaration file, and basic information; a variable configuration form generating unit, which automatically generates a variable configuration form at the front end of the cluster server by calling the task template; a variable value acquiring unit, which acquires the variable value set by the user for the variable configuration form generated for the front end page of the cluster server; a verification unit, which verifies the variable configuration form after obtaining the variable value; and a task submission unit, which submits the machine learning task corresponding to the variable configuration form after verification to the back end of the cluster server, wherein the machine learning task includes the task template name and the variable value.

[0024] In the above-mentioned configuration system for machine learning tasks, the variable declaration file contains at least one of the name, type, attribute, default value, and verification rule of each variable, and the basic information includes the name, version, and public status of the task template.

[0025] The above-mentioned machine learning task configuration system also includes a task resource deployment unit, and the cluster server backend automatically deploys the task resources for the machine learning task based on the task template and variable values ​​contained in the machine learning task.

[0026] The above-mentioned machine learning task configuration system also includes a task controller configuration unit, which configures a task controller for managing the machine learning task at the back end of the cluster server.

[0027] In the above-mentioned machine learning task configuration system, it also includes an association unit, which establishes an association between the task controller and the task resources of the machine learning task at the back end of the cluster server, and the task controller includes a monitoring unit, which automatically monitors the events of the task resources in the task resource list of the machine learning task during the operation of the machine learning task; and a processing unit, which processes the machine learning task in response to the event.

[0028] In the above-mentioned configuration system for machine learning tasks, the processing unit aggregates the status of all task resources to generate the status of the machine learning task.

[0029] According to the present application, the problems and defects existing in the prior art, such as the high difficulty in creating machine learning tasks and the complex actual operation steps, can be solved. In addition, according to the present application, the problems of complex machine learning task templates or machine learning task management existing in the prior art can be solved. Furthermore, according to the present application, a method and system for improving task scalability and operational safety are provided. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a flowchart of a method for configuring a machine learning task template according to the present invention.

[0031] Figure 2 It is a flow chart of the actions of the machine learning task controller involved in the present invention.

[0032] Figure 3 This is a flowchart of an example of processing executed by a task template controller according to the present invention.

[0033] Figure 4 It is a flowchart of a configuration method of a machine learning task involved in the present invention.

[0034] Figure 5 is a schematic diagram showing an automatically generated task configuration page.

[0035] Figure 6 is a schematic diagram showing an automatically generated task configuration form component.

[0036] Figure 7This is an example showing a failure after verification according to the verification rules.

[0037] Figure 8 This is another example showing failure of verification according to the verification rule.

[0038] Fig. 9 This is a flowchart of the task controller operation related to the present invention.

[0039] Fig.10 This is a flowchart of an example of processing executed by a task controller according to the present invention.

[0040] Fig.11 It is a block diagram of a configuration device system for machine learning tasks involved in the present invention. DETAILED DESCRIPTION

[0041] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.

[0042] The following uses the creation of a machine learning task template and a machine learning task in a Kubernetes cluster as an example.

[0043] Figure 1 It is a flow chart of the configuration method of the machine learning task template involved in the present invention. The configuration method of the machine learning task template includes: a first configuration step S11, configuring the resource definition template file list in the machine learning task template; a second configuration step S12, configuring the variable declaration file in the machine learning task template; a third configuration step S13, configuring the basic information of the machine learning task template; and a publishing step S14, submitting the task template resources created according to the configured resource definition template file list, variable declaration file and basic information to the cluster server backend and publishing them, so that users can call the machine learning task template to create machine learning tasks.

[0044] First, the task template is explained. Different task templates are set according to different types of machine learning tasks. For example, some tasks only need to run one container, some tasks may need to run multiple containers with the same configuration, some tasks need to run containers with different configurations, and some tasks may also need remote access during runtime, so service resources are created as needed. Different task templates can be created according to various task requirements. When the platform needs to add a new type of machine learning task, the administrator can write and create the corresponding task template. After the created task template is ready, it can be set to public on the server cluster, and ordinary users can view the public task templates and use the task templates to create corresponding tasks. The task template resource as a task template instance includes basic information such as name, version, whether it is public, and actual status. Each task template can have multiple versions, and the administrator manages the task template, including uploading, publishing, and deleting. The published task template can be queried and used by ordinary users.

[0045] In the first configuration step S11, a resource definition template file list in the machine learning task template is configured. The resource definition template file list includes all resource files required for a certain type of task, for example, when multiple different containers are included, it includes all files that need to be defined for each container; when the Internet connection is also required, it also includes a definition file of the URL service type.

[0046] In the second configuration step S12, a variable declaration file in the machine learning task template is configured. The variable declaration file in the task template defines the variables, including at least one of the name, type, attribute, default value, verification rule, etc. of each variable. When creating a machine learning task using the machine learning task template, the front end of the cluster server can automatically generate form items based on the variable declaration file according to the name, type, attribute, etc. of each variable.

[0047] Regarding the variable declaration file, the following example is used to illustrate. When the variable contains "Select Mirror", set the variable named "Select Mirror", the type is "array", the attribute is "required", and the message is set to "Please Select Mirror". In the verification rule set for the variable, the type of the variable is "array" and the attribute is set to "required". Through the above settings, the variable of "Select Mirror" can be displayed in the variable configuration form described later. In addition, for example, when setting "Set Time" in the variable, set the variable named "Set Time", set the maximum value to "60", the minimum value to "1", and the default value to "10". In the verification rule for the variable, a value of 1 to 60 needs to be set in the box of setting time. Through the above settings, it can be displayed in the variable configuration form displayed in the creation of the machine learning task described later: Set Time 10. In addition, for example, the variable declaration file can also set variables for task recycling, and the task can be automatically ended when the task running time reaches the running upper limit according to the variable setting; or after the task execution is completed, according to the recycling demand definition for this type of task, the task is automatically recycled and deleted.

[0048] The type of a variable can be a value, text, enumeration, list, structure, etc. In the validation rules, for example, it is defined whether the variable is required or optional, the type of the variable, the range of the variable, etc. In the validation after the user fills in the variable configuration form, the filled variable configuration form is automatically validated according to the validation rules to determine whether the variables set by the user meet the set validation rules.

[0049] In the third configuration step S13, basic information of the machine learning task template is configured. The basic information of the task template includes name, version, public status, etc.

[0050] In the publishing step S14, the task template resource created according to the configured resource definition template file list, variable declaration file and basic information is submitted to the cluster server backend and published, so that the user can call the machine learning task template to create a machine learning task. The task template resource is an instance of the task template. After the task template resource is uploaded, it is saved in the task template database set in the cluster server backend and published.

[0051] Through the above, when the user wants to create a machine learning task, the user queries the task templates published on the server cluster through the port at the front end of the cluster server, and obtains and displays all published task templates. The user selects any task template to obtain the variable declaration, verification file and variable initial value content of the variable template. By selecting different task templates according to different types of machine learning tasks, when the user needs to create a machine learning task, there is no need to write code to define resource files and variables, but can directly call the corresponding task template, thereby reducing the difficulty of creating machine learning tasks and saving time.

[0052] Optionally, in order to manage the machine learning task template, the configuration method of the machine learning task template may further include a task template controller configuration step, and a task template controller for managing the machine learning task template is configured at the back end of the cluster server. After the task template controller is started, it establishes a connection with the server cluster via an interface to manage the created task templates stored in the cluster server.

[0053] Figure 2 The flowchart of the machine learning task controller according to the present invention is as follows: The task template controller executes the monitoring step S21 and the processing step S22.

[0054] In the monitoring step 21, the task template controller monitors the events of the task template resources in the machine learning task template. Among them, the events of the task template resources include the addition, modification, and deletion of the task template resources. In addition, due to the monitoring method, when a task template resource changes, the event notification can be quickly received. The task template controller forms a queue for the received events in the order of the receiving time.

[0055] In processing step 22, the task template controller processes the task template in response to the monitored event. The task template controller automatically monitors the addition, modification, and deletion actions of the task template resources, and puts the corresponding task template resource index name into the processing queue. The task template controller performs serial processing on the task template resources in the processing queue, and each time takes out the task template resource index name at the head of the queue from the processing queue to perform management of the task template.

[0056] Figure 3It is a flowchart showing an example of the task template controller executing the processing. In step S31, the task template controller takes out the index name of the task template resource at the head of the queue from the processing queue, assuming that the task template resource is task template resource A, and proceeds to step 32. In step S32, the task template is read and the process proceeds to step S33. In step S33, it is determined whether the task template resource A is to be deleted. Whether the deletion is required is determined based on whether the parameter A.metadata.deletionTimestamp in the task template resource A is empty. When the parameter is empty, the task template A does not need to be deleted; when the parameter is not empty, the task template A needs to be deleted. If the judgment is "yes" in step S33, the process proceeds to step S331. In step S331, it is determined whether the task template no longer exists. If the judgment is "yes" in step S331, the process proceeds to step S37 and ends this process. If the judgment is "no" in step S331, the process proceeds to step S332. In step S332, it is determined whether the task template has been published. If the judgment in step S332 is "No", the process proceeds to step S334, deletes the task template, and then proceeds to step S37. If the judgment in step S332 is "Yes", the process proceeds to step S333, first cancels the release of the task template, then proceeds to step S334, clears A.metadata.finalizers in the task template resource to delete the task template, and then proceeds to step S37.

[0057] In step S33, when it is judged as "No", proceed to step S34. In step S34, determine whether the task template has completed initialization. In the case of judging "No" in step S34, proceed to step S341. In step S341, add initialization information for the task template resource, and then proceed to step S342. In step S342, determine whether the task template has been uploaded. When it is judged as "No" in step S342, proceed to step S37. When it is judged as "Yes" in step S342, proceed to step S343. In step S343, download the task template file for format check, and then proceed to step S344. In step S344, update the template status according to the detection results, and then proceed to step S37.

[0058] In step S34, when it is judged as "yes", proceed to step S35. In step S35, determine whether the task template resource is set to be public based on the task template resource file A.spec.type. When it is determined to be set to be public, proceed to step S351. In step S351, based on the status of the read task template, determine whether the task template has been made public. When it is judged as "yes" in step S351, proceed to step S37. When it is judged as "no" in step S351, proceed to step S352, publish the task template, and then proceed to step S37.

[0059] In step S35, when it is judged as "No", the process proceeds to step S36. In step S36, it is judged whether the task template has been made public. When it is judged as "Yes" in step S36, the process proceeds to step S361, cancels the publication of the task template, and then proceeds to step S37. When it is judged as "No" in step S36, the process directly proceeds to step S37.

[0060] In step S37, this loop ends, the task resource index name is also removed from the queue, and the process returns to step S31, the next task template resource index name is taken out from the queue, and the next processing begins.

[0061] Through the above, the task template controller can automatically monitor the addition, modification, and deletion actions of task template resources, and can automatically monitor the status of task templates, thereby realizing the management of task templates.

[0062] The above describes the configuration method of the machine learning task template. The following describes the method and system for configuring a machine learning task using a machine learning task template.

[0063] Figure 4 It is a flow chart of the configuration method of the machine learning task involved in the present invention. The processing method of the machine learning task of the present invention includes: a template calling step 41, calling the task template of the selected machine learning task from the back end of the cluster server via an interface at the front end of the cluster server, the task template including a resource definition template file list, a variable declaration file and basic information; a variable configuration form generation step S42, automatically generating a variable configuration form at the front end of the cluster server by calling the task template; a variable value acquisition step S43, acquiring the variable value set by the user for the variable configuration form generated by the front end page of the cluster server; a verification step S44, verifying the variable configuration form after obtaining the variable value; and a task submission step S45, submitting the machine learning task corresponding to the variable configuration form after verification to the back end of the cluster server, the machine learning task including the task template name and the variable value.

[0064] In the template calling step S41, the task template of the selected machine learning task is called from the cluster server backend via the interface at the cluster server front end, and the task template includes a resource definition template file list, a variable declaration file, and basic information. The user queries the task templates published by the cluster server platform, calls the backend interface at the cluster server front end, and obtains and displays all published task templates. The user selects any task template, calls the backend interface at the cluster server front end, and obtains the variable declaration file and variable initial value content of the selected task template. The variable declaration file contains the name, type, attribute, default value, and verification rule of each variable. The basic information includes the name, version, and public status of the task template. Since the task template already contains a resource definition template file list and a variable declaration file, there is no need to write code to define it when creating a task, which saves time and simplifies the complexity of task creation.

[0065] In the variable configuration form generation step S42, the variable configuration form is automatically generated at the front end of the cluster server by calling the task template. At the front end of the cluster server, form items can be automatically generated based on the variable declaration file according to the name, type, attribute, etc. of each variable, and the initial value of the form item can be automatically set according to the default value of each variable and the initial value of the template. In the variable configuration form, the variables and default values ​​contained in the task template are displayed in a visual image at the front end of the cluster, and the user can fill in or modify the default value according to the variable configuration form. As a result, the user does not need to edit or create the machine learning template, and can simply create a machine learning task. Figure 5 A diagram showing an automatically generated task configuration page. Figure 6 A schematic diagram showing the automatic generation of a task configuration form component is shown. Since the variable declaration file has been included in the task template, the task configuration form is automatically generated with the variables that need to be set when it is called.

[0066] In the variable value acquisition step S43, the variable value set by the user for the variable configuration form generated by the front-end page of the cluster server is acquired. The user fills in the variable configuration form, and a variable configuration form is generated that includes the variable value filled in by the user and the variable value of the default value included in the task template or the variable value after the user modifies the default value.

[0067] In the verification step S44, the variable configuration form after obtaining the variable value is verified. Since the variable declaration file of the task template contains the variable verification rules, the filled variable configuration form is automatically verified according to the verification rules when submitted to determine whether each variable value meets the verification rules. For example, Figure 7This is an example of failure after verification according to the verification rules. "Setting time" is a required item, but it is blank in the variable configuration form. At this time, the variable configuration form verification fails and the user needs to modify it again. Figure 8 This is another example of failure after verification according to the verification rules. The "set time" is set to a minimum of "1" and a maximum of "60". If it is set to "99", it exceeds the range of 1 to 60 and does not meet the verification rules. It fails the verification and needs to be modified by the user.

[0068] In the task submission step S45, the machine learning task corresponding to the variable configuration form after verification is submitted to the backend of the cluster server, and the machine learning task includes the task template name and variable values.

[0069] Through the above-mentioned configuration method of machine learning tasks, the configuration difficulty of machine learning tasks can be reduced and the operation is simple. In addition, by using machine learning task templates, the scalability of machine learning tasks is also improved.

[0070] The configuration method of a machine learning task may also include a task resource deployment step. After the task is submitted to the backend of the cluster server, the cluster server backend automatically deploys the task resources for the machine learning task based on the task template and variable values ​​contained in the machine learning task.

[0071] In addition, the configuration method of the machine learning task may also include a controller configuration step, in which a task controller for managing the machine learning task is configured on the back end of the cluster server.

[0072] Fig. 9 This is a flowchart of the task controller operation related to the present invention.

[0073] The task controller's method for managing machine learning tasks includes: an association step S91, establishing an association between the task controller and the task resources of the machine learning task in the server cluster; a monitoring step S92, wherein the task controller automatically monitors events of task resources in the task resource list of the machine learning task during the running of the machine learning task; and a processing step S93, wherein the task controller processes the machine learning task in response to the event.

[0074] In the association step S91, the task controller establishes an association with the task resources of the machine learning task of the server cluster. After the task controller is started, it establishes a connection with the Kubernetes cluster. When processing task creation, the task controller obtains a list of template files of the template used by the task, combines the variable value rendering to obtain a list of resource definition files supported by Kubernetes, and sets associations for all included resources. Setting associations for Kubernetes resources indicates that the resource belongs to a specific task.

[0075] In the monitoring step S92, the task controller automatically monitors the events of the task resources in the task resource list of the machine learning task during the operation of the machine learning task. After the task controller establishes a connection with the Kubernetes cluster, it monitors the events of the task resources and puts the monitored events into the processing queue in chronological order. The events include the addition, modification, and deletion of events.

[0076] In processing step S93, the task controller processes the machine learning task in response to the event. The task controller summarizes the actual running status of the task by monitoring the status changes of these associated resources and triggers status updates, which is highly real-time. In this way, the response speed is faster than that of summarizing by timed polling. When the task status changes, events can also be sent through the broadcast mechanism so that other services can immediately perceive the task status changes.

[0077] In the processing step, the task controller summarizes the status of all task resources to generate the status of the machine learning task. The execution status of the machine learning task includes: waiting for execution, which means that the task has been submitted, but has not actually run, which may be due to insufficient resources and no matching resources; executing, which means that the task resources (container) are running; execution error, which means that the task cannot run correctly, which may be due to incorrect definition or parameters; execution failure, which means that some errors occurred during the task and it cannot continue to run; execution completed, which means that all resources (containers) of the task have been completed and are in an ideal state. The status information is set by the task controller according to the actual operation of the task, and may include the current state, the list of resources included, the network service address, event information, start time, end time, etc.

[0078] Fig.10This is a flowchart of an example of task controller execution management involved in the present invention. On the one hand, the task controller monitors the addition, modification, deletion and other actions of the task type resource itself to perform corresponding operations. On the other hand, it also monitors the associated Kubernetes resources to instantly update the status information of the task (including multi-container summary status, obtain the assigned service address, event information), and put the corresponding task index name into the processing queue. After the task controller is turned on, the task index name of the monitored event is put into the queue in sequence, and the task controller performs serial processing for the event in sequence.

[0079] In step S101, the task controller takes out the task resource index name at the head of the queue each time from the processing queue, and proceeds to step S102. In step S102, the task controller reads the task, and then proceeds to step S103. As an example, the read task includes the definition of the task structure and the definition of the task state. The definition of the task structure includes, for example, the definition of the referenced task template, the name of the referenced task template, the version number of the referenced task template, and the variable values ​​used. The definition of the task state includes, for example, the current state, the previous state, which resources are included, the incremental description information of the state, the time when the task starts executing, the time when the task execution ends, the time when the task state was last updated, and the service addresses (if any) provided by multiple external parties.

[0080] In step S103, it is determined whether the task is to be deleted. After reading the task, it is determined whether the task template needs to be deleted based on whether the parameter A.metadata.deletionTimestamp is empty. If the parameter is empty, it does not need to be deleted, and if the parameter is not empty, it needs to be deleted.

[0081] When the judgment is "yes" in step S103, proceed to step S104 to determine whether the task resources have been installed. In step S104, when the judgment is "yes", proceed to step S105, delete the task resources, and proceed to step S106; when the judgment is "no", go directly to step S106.

[0082] When the judgment is "No" in step S103, proceed to step S107. In step S107, determine whether the task initialization is completed. In step S107, when the judgment is "No", proceed to step S108. In step S108, add initialization information and then proceed to step S106; when the judgment is "Yes" in step S107, proceed to step S109.

[0083] In step S109, determine whether the task resource has been installed. When it is judged as "No" in step S109, proceed to step S110, install the task resource, and then proceed to step S111. In step S111, determine whether the installation has been successful. When it is judged as "No" in step S111, proceed to step S106; when it is judged as "Yes", proceed to step S112. In step S112, the task controller establishes an association with the sub-resources of the task via the interface to implement monitoring of the task resources. When it is judged as "Yes" in step S109, proceed to step S113.

[0084] In step S113, it is determined whether the task has been completed. In step S113, when it is determined as "No", the process proceeds to step S114, where the task is queried and then the process proceeds to step S115. In step S115, it is determined whether the task exists. When it is determined as "No" in step S115, the process proceeds to step S118. In step S118, the task status is updated and the process proceeds to step S106. When it is determined as "Yes" in step S115, the process proceeds to step S116, where the sub-resources of the task are queried and then the process proceeds to step S117. In step S117, the task controller summarizes the status of the sub-resources, generates status description information, and then the process proceeds to step S118. In step S118, the task status is updated and then the process proceeds to step S106. In step S113, when it is determined as "Yes", the process proceeds to step S119.

[0085] In step S119, it is determined whether the task needs to be recovered and deleted. If it is determined in step S119 that the task needs to be recovered and deleted, the process proceeds to step S120 to determine whether the task should be deleted immediately. If it is determined to be "yes" in step S120, the process proceeds to step S121 to delete the task, and then proceeds to step S106. If it is determined to be "no" in step S120, the process proceeds to step S122 to calculate the waiting time, and then proceeds to step S123. In step S123, the event delay is put back into the processing queue, and then proceeds to step S106.

[0086] After the current process ends in step S106, the task controller deletes the task resource index name from the head of the queue and returns to the process of step S101 to take out the next head task resource from the queue and execute the process for subsequent events.

[0087] The task controller monitors the tasks on the backend of the cluster server through the interface, and realizes the addition, deletion, modification, query, status summary, recycling and message notification of tasks, and also realizes the collection and query of task operation monitoring data and operation output logs. Through the task controller, developers can obtain the task status without querying resources.

[0088] In addition, through the management of the task controller, for different states of tasks, especially abnormal states, the tasks contain multiple resources. Through the management of the task controller, developers can avoid querying all resources and combining other relevant information to manually summarize and locate the causes, which is time-consuming and labor-intensive.

[0089] Furthermore, through the management of the task controller, when a task fails, fails, or is completed, that is, the final state, the resources can be immediately or periodically recovered through the task controller to reduce the management pressure on the server.

[0090] Through the above-mentioned machine learning task templates and the creation and management methods of machine learning tasks, the effect of simplifying the steps of task creation, management and viewing task information is achieved. In addition, the development investment for adding task types in the future is saved, and the threshold for task submission, operation and management difficulty are reduced. Furthermore, the scalability of the platform and the security of cluster operation are improved.

[0091] The present invention also relates to a configuration system for machine learning tasks, Fig.11 It is a block diagram of the configuration system of the machine learning task of the present invention. The configuration system 100 of the machine learning task includes: a template calling unit 11, which calls the task template of the selected machine learning task from the back end of the cluster server via an interface at the front end of the cluster server, and the task template includes a resource definition template file list, a variable declaration file and basic information; a variable configuration form generating unit 12, which automatically generates a variable configuration form at the front end of the cluster server by calling the task template; a variable value obtaining unit 13, which obtains the variable value set by the user for the variable configuration form generated by the front end page of the cluster server; a verification unit 14, which verifies the variable configuration form after obtaining the variable value; and a task submission unit 15, which submits the machine learning task corresponding to the variable configuration form after verification to the back end of the cluster server, and the machine learning task includes the task template name and the variable value.

[0092] The specific details and functions of the configuration system of the machine learning task of the present invention are basically the same as those described in the configuration method of the machine learning task, and the description is omitted here.

[0093] Although the implementation modes and specific examples of the present invention are described above in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the claims.

Claims

1. A configuration method for a machine learning task template, include: The first configuration step is to configure the resource definition template file list in the machine learning task template; The second configuration step is to configure the variable declaration file in the machine learning task template; The third configuration step is to configure the basic information of the machine learning task template; as well as The publishing step submits the task template resources created according to the configured resource definition template file list, variable declaration file and basic information to the cluster server backend and publishes them so that users can call the machine learning task template to create machine learning tasks.

2. The method for configuring a machine learning task template according to claim 1, in, The variable declaration file contains at least one of the name, type, attribute, default value, and verification rule of each variable. The basic information includes the name, version, and public status of the task template.

3. The method for configuring a machine learning task template according to claim 1, in, It also includes a task template controller configuration step, in which a task template controller for managing the machine learning task template is configured on the back end of the cluster server.

4. The method for configuring a machine learning task template according to claim 3, in, Also includes: A monitoring step, wherein the task template controller monitors events of task template resources in the machine learning task template; and In the processing step, the task template controller processes the task template in response to the monitored event.

5. The method for configuring a machine learning task template according to claim 4, in, The events include addition, modification and deletion of the task template resources. The task template controller adds the monitored task template resource events to the event queue in sequence, and performs serial processing on the event queue.

6. A configuration method for machine learning tasks, include: A template calling step, in which the task template of the selected machine learning task is called from the cluster server backend via an interface at the cluster server frontend, wherein the task template includes a resource definition template file list, a variable declaration file, and basic information; A variable configuration form generation step, which automatically generates a variable configuration form on the front end of the cluster server by calling the task template; A variable value acquisition step, acquiring the variable value set by the user for the variable configuration form generated by the front-end page of the cluster server; A verification step, verifying the variable configuration form after obtaining the variable value; as well as The task submission step submits the machine learning task corresponding to the verified variable configuration form to the backend of the cluster server, wherein the machine learning task includes the task template name and variable values.

7. The method for configuring a machine learning task according to claim 6, in, The variable declaration file contains at least one of the name, type, attribute, default value, and verification rule of each variable. The basic information includes the name, version, and public status of the task template.

8. The method for configuring a machine learning task according to claim 6, in, It also includes a task resource deployment step, in which the cluster server backend automatically deploys the task resources for the machine learning task based on the task template and variable values ​​contained in the machine learning task.

9. The method for configuring a machine learning task as claimed in claim 8, in, It also includes a task controller configuration step, in which a task controller for managing the machine learning task is configured on the back end of the cluster server.

10. The method for configuring a machine learning task according to claim 9, in, Also includes: An association step of establishing an association between the task controller and the task resources of the machine learning task at the back end of the cluster server; A monitoring step, wherein the task controller automatically monitors events of task resources in a task resource list of the machine learning task during the running of the machine learning task; and Processing step: the task controller processes the machine learning task in response to the event.

11. The method for configuring a machine learning task as claimed in claim 10, in, In the processing step, the task controller aggregates the status of all task resources to generate the status of the machine learning task.

12. A configuration system for machine learning tasks, include: A template calling unit, which calls the task template of the selected machine learning task from the cluster server backend via an interface at the cluster server frontend, wherein the task template includes a resource definition template file list, a variable declaration file, and basic information; A variable configuration form generating unit, which automatically generates a variable configuration form at the front end of the cluster server by calling the task template; A variable value acquisition unit, which acquires the variable value set by the user for the variable configuration form generated by the front-end page of the cluster server; A verification unit, verifying the variable configuration form after obtaining the variable value; as well as The task submission unit submits the machine learning task corresponding to the variable configuration form after verification to the back end of the cluster server, and the machine learning task includes the task template name and variable values.

13. The configuration system for machine learning tasks according to claim 12, in, The variable declaration file contains at least one of the name, type, attribute, default value, and verification rule of each variable. The basic information includes the name, version, and public status of the task template.

14. The system for configuring a machine learning task according to claim 12, in, It also includes a task resource deployment unit, and the cluster server backend automatically deploys the task resources for the machine learning task based on the task template and variable values ​​contained in the machine learning task.

15. The system for configuring a machine learning task according to claim 14, in, It also includes a task controller configuration unit, which configures a task controller for managing the machine learning task at the back end of the cluster server.

16. The configuration system for machine learning tasks according to claim 15, in, It also includes an association unit, which establishes an association between the task controller and the task resources of the machine learning task at the back end of the cluster server, The task controller includes A monitoring unit, which automatically monitors events of task resources in a task resource list of the machine learning task during the running of the machine learning task; as well as A processing unit processes the machine learning task in response to the event.

17. The system for configuring a machine learning task according to claim 16, in, The processing unit aggregates the status of all task resources to generate the status of the machine learning task.

Citation Information

Patent Citations

  • Method and system for building machine learning modeling template

    CN108710949A

  • Machine learning scheme template creating method, using method and device

    CN110990053A

  • Model publishing method and device, model deployment method, equipment and storage medium

    CN111580926A

  • Methods and systems for performing machine learning process based on template

    CN111832735A

  • Container-based machine learning process training task execution method and system

    CN112418438A