mml.core.data_preparation.registry

create_creator_func(create_func: Callable[[...], None], **kwargs: Any) Callable[[Path], None][source]

Convenience function if multiple task creation function shall be created dynamically.

Parameters:
  • create_func – the actual creation function that takes more kwargs than solely the dset_path

  • kwargs – the kwarg values

Returns:

a static function, independent of any globals for generation at runtime

get_dset_creator(dset_name: str) Callable[[], Path][source]

Appropriate way to receive the creator for a dataset

Parameters:

dset_name – dataset name

Returns:

dataset create function

get_dset_for_task(task_name: str) str[source]

Appropriate way to receive the dataset from a task.

Parameters:

task_name – name of the task

Returns:

name of the dataset

get_task_creator(task_name: str) Callable[[Path], None][source]

Appropriate way to receive the creator for a task.

Parameters:

task_name – name of the task

Returns:

task creator function

register_dsetcreator(dset_name: str) Callable[[Callable[[], Path]], Callable[[], Path]][source]

Registers a dataset creator.

Parameters:

dset_name – the dataset to be linked with

Returns:

identical creator, but has been linked

register_taskcreator(task_name: str, dset_name: str) Callable[[Callable[[Path], None]], Callable[[Path], None | Path]][source]

Registers a task creator.

Parameters:
  • task_name – the task name to be linked with

  • dset_name – the dataset to be linked with

Returns: