Task scheduling based on ratio of tasks for automated machine learning
A method for scheduling a task for AutoML (Automated Machine Learning) by a terminal, includes: setting a ratio of 1) a first task requiring a plurality of arithmetic devices and 2) a second task requiring one arithmetic device, in a cluster connected with the terminal; allocating a third task for the AutoML on the basis of the set ratio; receiving a request for allocation of a session from a user; inspecting whether the session is allocable on the basis of the ratio of the second task; and allocating the session to the arithmetic device associated with the second task on the basis of the ratio of the second task when the session is allocable.
1 . A method for scheduling a task for AutoML (Automated Machine Learning) by a terminal configured to be connected to a cluster including a plurality of arithmetic devices, the method comprising:
a step of setting a ratio of multi-tasks among entire allocable tasks in the cluster connected to the terminal and a ratio of single-tasks among the entire allocable tasks in the cluster, wherein the plurality of arithmetic devices include Graphics Processing Units (GPUs), each of the multi-tasks is a task requiring two or more arithmetic devices among the plurality of arithmetic devices included in the cluster and each of the single-tasks is a task requiring one arithmetic device among the plurality of arithmetic devices included in the cluster;
a step of allocating tasks including the task for the AutoML on the basis of the set ratio of the multi-tasks and the set ratio of the single-tasks;
a step of receiving a request for allocation of a session from a user, wherein the request for the allocation of the session includes information of a resource required for the session;
a step of inspecting whether the session is allocable on the basis of the set ratio of the single-tasks, wherein the step of inspecting includes determining whether the resource is allocable to the session in the set ratio of the single-tasks; and
a step of allocating the session to an arithmetic device used to perform a single-task of the single-tasks among the plurality of arithmetic devices on the basis of the set ratio of the single-tasks when the session is allocable as a result of the inspection, wherein the step of allocating the session to the arithmetic device comprises (i) terminating the single task that is in process using the arithmetic device, and (ii) allocating the session to the arithmetic device, and
a step of executing the allocated session by using the arithmetic device,
wherein the step of setting the ratio of the single-tasks among the entire allocable tasks in the cluster includes setting the ratio of the single-tasks to be equal to or higher than a predetermined value based on a size of the cluster, and
wherein the ratio of the single-tasks among the entire allocable tasks in the cluster is set to be inversely proportional to the size of the cluster and to keep an absolute number of arithmetic devices for the single-tasks in the cluster to be equal to or greater than a specific threshold value.
2 . The method for scheduling according to claim 1 , wherein in the step of setting the ratio of the multi-tasks and the ratio of the single-tasks, the ratio of the multi-tasks is set to be greater than or equal to the ratio of the single-tasks on the basis of the size of the cluster.
3 . The method for scheduling according to claim 2 , further comprising a step of allocating the session to arithmetic devices among a number of arithmetic devices included in the plurality of arithmetic devices and used to perform a multi-task of the multi-tasks when the session is not allocable as the result of the inspection.
4 . The method for scheduling according to claim 3 , wherein the step of allocating the session to the arithmetic devices comprises (i) terminating the multi-task that is in process using the number of arithmetic devices, and (ii) allocating the session to the arithmetic devices among the number of arithmetic devices,
wherein the terminated multi-task requires a resource equal to or greater than the resource required for the session.
5 . The method for scheduling according to claim 1 , further comprising:
a step of monitoring a utilization rate of the cluster based on resources of sessions running in arithmetic devices among the plurality of arithmetic devices in the cluster; and
a step of terminating a session of the cluster with the utilization rate of 0 on the basis of the monitoring result.
6 . The method for scheduling according to claim 5 , further comprising a step of allocating the task for the AutoML to a resource used by the terminated session on the basis of the set ratio of the multi-tasks and the set ratio of the single-tasks.
7 . A terminal which schedules a task for AutoML (Automated Machine Learning) and is configured to be connected to a cluster including a plurality of arithmetic devices, the terminal comprising:
a memory storing instructions;
a communication module; and
a processor which functionally controls the memory and the communication module,
wherein the processor is configured to execute the instructions to:
set a ratio of multi-tasks among entire allocable tasks in the cluster connected to the terminal and a ratio of single-tasks among the entire allocable tasks in the cluster, wherein the plurality of arithmetic devices include Graphics Processing Units (GPUs), each of the multi-tasks is a task requiring two or more arithmetic devices among the arithmetic devices included in the cluster and each of the single-tasks is a task requiring one arithmetic device among the plurality of arithmetic devices included in the cluster;
allocate tasks including the task for the AutoML on the basis of the set ratio of the multi-tasks and the set ratio of the single-tasks;
receive a request for allocation of a session from a user, wherein the request for the allocation of the session includes information of a resource required for the session;
inspect whether the session is allocable on the basis of the set ratio of the single-tasks, wherein the inspecting includes determining whether the resource is allocable to the session in the set ratio of the single-tasks;
allocate the session to an arithmetic device used to perform a single-task of the single-tasks among the plurality of arithmetic devices on the basis of the set ratio of the single-tasks when the session is allocable as a result of the inspection, wherein the allocating of the session to the arithmetic device comprises (i) terminating the single-task that is in process using the arithmetic device, and (ii) allocating the session to the arithmetic device; and
execute the allocated session by using the arithmetic device,
wherein the setting of the ratio of the single-tasks among the entire allocable tasks in the cluster includes setting the ratio of the single-tasks to be equal to or higher than a predetermined value based on a size of the cluster, and
wherein the ratio of the single-tasks among the entire allocable tasks in the cluster is set to be inversely proportional to the size of the cluster and to keep an absolute number of arithmetic devices for the single-tasks in the cluster to be equal to or greater than a specific threshold value.
8 . The terminal according to claim 7 , wherein the processor is further configured to execute the instructions to monitor a utilization rate of the cluster based on resources of sessions running in arithmetic devices among the plurality of arithmetic devices in the cluster, and terminate a session of the cluster with the utilization rate of 0 on the basis of the monitoring result.
9 . The terminal according to claim 8 , wherein the processor is further configured to execute the instructions to allocate the task for the AutoML to a resource used by the terminated session on the basis of the set ratio of the multi-tasks and the set ratio of the single-tasks.
10 . The terminal according to claim 7 , wherein in the setting of the ratio of the multi-tasks and the ratio of the single-tasks, the ratio of the multi-tasks is set to be greater than or equal to the ratio of the single-tasks on the basis of the size of the cluster.
11 . The terminal according to claim 10 , the processor is further configured to execute the instructions to allocate the session to arithmetic devices among a number of arithmetic devices included in the plurality of arithmetic devices and used to perform a multi-task of the multi-tasks when the session is not allocable as the result of the inspection.
12 . The terminal according to claim 11 , the processor is further configured to execute the instructions to terminate the multi-task that is in process using the arithmetic devices and allocate the session to the arithmetic devices,
wherein the terminated multi-task requires a resource equal to or greater than the resource required for the session.