astra.tasks.utils¶
Module Contents¶
Functions¶
hashify(params, max_length=8) |
Create a short hashed string of the given parameters. |
task_id_str(task_family, params) |
Returns a canonical string used to identify a particular task |
batch_tasks_together(tasks, skip_complete=False) |
Return a list of tasks that can be batched together. |
_batch_tasks_from_same_family(tasks) |
-
astra.tasks.utils.hashify(params, max_length=8)¶ Create a short hashed string of the given parameters.
Parameters: - params – A dictionary of key, value pairs for parameters.
- max_length – [optional] The maximum length of the hashed string.
-
astra.tasks.utils.task_id_str(task_family, params)¶ Returns a canonical string used to identify a particular task :param task_family: The task family (class name) of the task :param params: a dict mapping parameter names to their serialized values :return: A unique, shortened identifier corresponding to the family and params
-
astra.tasks.utils.batch_tasks_together(tasks, skip_complete=False)¶ Return a list of tasks that can be batched together.
Parameters: tasks – A list of tasks, where some might be able to be batched together.
-
astra.tasks.utils._batch_tasks_from_same_family(tasks)¶