aiaccel.job.utils.split_tasks¶
- aiaccel.job.utils.split_tasks(task_list: list[Any]) list[Any][source]¶
Return the task shard assigned to the current array job.
This function uses
TASK_INDEXandTASK_STEPSIZEfrom the environment to slicetask_list. The start position is computed asTASK_INDEX - 1. IfTASK_INDEXis not defined, the input is returned as is.- Parameters:
task_list (list[Any]) – Full list of tasks to be split across array jobs.
- Returns:
Tasks assigned to the current array job.
- Return type:
list[Any]