capreolus.task

Package Contents

Classes

Task(config=None, provide=None, share_dependency_objects=False, build=True) Base class for Task modules. The purpose of a Task is to describe a Capreolus pipeline and serve as the pipeline’s entry point. Tasks provide one or more commands that provide entry points while sharing the Task’s configuration options and dependencies.
ModulesTask(config=None, provide=None, share_dependency_objects=False, build=True) Base class for Task modules. The purpose of a Task is to describe a Capreolus pipeline and serve as the pipeline’s entry point. Tasks provide one or more commands that provide entry points while sharing the Task’s configuration options and dependencies.
class capreolus.task.Task(config=None, provide=None, share_dependency_objects=False, build=True)[source]

Bases: capreolus.ModuleBase

Base class for Task modules. The purpose of a Task is to describe a Capreolus pipeline and serve as the pipeline’s entry point. Tasks provide one or more commands that provide entry points while sharing the Task’s configuration options and dependencies.

Modules should provide:
  • a commands attribute containing the names of methods that can serve as pipeline entry points (Task commands). Each command will be accessible via the CLI using the syntax capreolus <task name>.<command name> ...
  • a default_command attribute containing the name of a command to run if none is given
  • methods (taking only the self argument) that correspond to each command defined
module_type = task[source]
commands = [][source]
help_commands = ['describe', 'print_config', 'print_paths', 'print_pipeline'][source]
default_command = describe[source]
requires_random_seed = True[source]
print_config(self)[source]
print_paths(self)[source]
print_pipeline(self)[source]
describe(self)[source]
get_results_path(self)[source]

Return an absolute path that can be used for storing results. The path is a function of the module’s config and the configs of its dependencies.

class capreolus.task.ModulesTask(config=None, provide=None, share_dependency_objects=False, build=True)[source]

Bases: capreolus.task.Task

Base class for Task modules. The purpose of a Task is to describe a Capreolus pipeline and serve as the pipeline’s entry point. Tasks provide one or more commands that provide entry points while sharing the Task’s configuration options and dependencies.

Modules should provide:
  • a commands attribute containing the names of methods that can serve as pipeline entry points (Task commands). Each command will be accessible via the CLI using the syntax capreolus <task name>.<command name> ...
  • a default_command attribute containing the name of a command to run if none is given
  • methods (taking only the self argument) that correspond to each command defined
module_name = modules[source]
commands = ['list_modules'][source]
default_command = list_modules[source]
list_modules(self)[source]