sad.task package

Subpackages

Submodules

sad.task.base module

class TaskBase(config: Dict, input_dir: Optional[str] = None, output_dir: Optional[str] = None)[source]

Bases: abc.ABC

A task base class that all task subclasses will inherit from.

A task is the main component in our workflow. For example, when training a model, an instance of sad.tasks.training.TrainingTask will be responsible to launch the training job.

property artifact_dir: str

A path points to an artifact directory. Will be the artifact directory from Bolt when running as a Bolt job. Otherwise, will be the same as self.output_dir.

property input_dir: str

An absolute path that points to input directory of a running task.

property is_hc: bool

A boolean flag to indicate if the task is running in HC.

property is_local: bool

A boolean flag to indicate whether the task is running in local mode.

property logger: logging.Logger

A logger instance to manage logging during the life-cycle of a task.

property output_dir: str

An absolute path that points to output directory of a running task.

abstract run()[source]
show_config()[source]

A function to print the configuration of a running task.

property task_id: str

A unique string to identify a running task.

sad.task.dummy module

class DummyTask(config: Dict, input_dir: Optional[str] = None, output_dir: Optional[str] = None)[source]

Bases: sad.task.base.TaskBase

A concrete dummy task class that will be used to create a default task instance. This class inherits all existing properties in sed.task.base.TaskBase.

run()[source]

Module contents