aiaccel.job.utils.get_task_index#

aiaccel.job.utils.get_task_index() → int[source]#

Return the task index for the current array job.

Returns:

The integer value of the TASK_INDEX environment variable.

Raises:
  • RuntimeError – If TASK_INDEX is not set.

  • ValueError – If TASK_INDEX cannot be converted to an integer.