Task
Represents a job within a batch job.
This class can be extended to define specific configurations for each job in the batch.
args
property
writable
Returns the arguments for the Task instance.
id
property
Returns the unique identifier of the Task instance.
__call__(*args, **kwds)
Allows the Task instance to be called like a function, returning itself. This is useful for chaining or functional-style programming.
alias(name)
Set an alias for the Task instance.
:param name: The alias name to set.
run()
Execute the job's entrypoint.
set_resources(resources=None, memory=None, cpu=None)
Set the resources for the Task instance.
:param resources: The Resources instance to set.
to_dict()
Convert the Task instance to a dictionary representation.
to_json()
Convert the Task instance to a JSON string representation.
translate_dependencies()
Translate the dependencies of the Task instance into a format suitable for the batch job.
update_env_vars(env_vars)
Update the environment variables for the Task instance.
:param env_vars: A dictionary of environment variables to update.