schrodinger.tasks.taskmanager module¶
A TaskManager
manages multiple instances of a given task class.
One main responsibility of TaskManager
is to assign unique names to its task
instances, which it does using a task namer. The namer uses a base name to
generate unique names for subsequent task instances. There are two kinds of
base names: standard base names and custom base names. Both can be used as the
current base name, but they behave quite differently.
- Current base name: The base name that is applied to each subsequently loaded
task. It is either the standard base name or a custom base name, and thus must be set using either
setStandardBaseName
orsetCustomBaseName
.- Standard base name: A base name that gets set as the current base name
whenever
resetBaseName
is called. It may be set usingsetStandardBaseName
, which also updates the current base name. The default standard base name is the task class name.- Custom base name: A base name to use as the current base name that will be lost
when any other type of base name is specified or when
resetBaseName
is called. It may be set usingsetCustomBaseName
.
- class schrodinger.tasks.taskmanager.TaskManager(*args, _param_type=<object object>, **kwargs)¶
Bases:
schrodinger.models.mappers.TargetMixin
,schrodinger.models.parameters.CompoundParam
- status¶
A parameter of the class.
- namer¶
A parameter of the class.
- taskStarted¶
A
pyqtSignal
emitted by instances of the class.
- taskEnded¶
A
pyqtSignal
emitted by instances of the class.
- newTaskLoaded¶
A
pyqtSignal
emitted by instances of the class.
- task_list¶
A parameter of the class.
- taskStatusChanged¶
A
pyqtSignal
emitted by instances of the class.
- NAME_NOT_UNIQUE_MSG = 'Task name is not unique.'¶
- TaskClass¶
A parameter of the class.
- __init__(directory_management=False, **kwargs)¶
- Parameters
TaskClass – The task class to manage.
directory_management – If true, override preexisting taskdir settings with standard ones. Otherwise, respect existing settings.
- resetBaseName()¶
Set the standard base name as the current base name and apply it to the next task.
- setStandardBaseName(new_base_name)¶
Set a new standard base name and apply it to the next task. This base name will be used whenever
resetBaseName
is called.
- setCustomBaseName(new_base_name)¶
Set a new current base name. This name does not immediately apply to the next task, and will be lost if
resetBaseName
is called.
- uniquifiyTaskName()¶
Update the next tasks name to a unique name. A unique name is defined as a name that hasn’t been previously used by this taskmanager and one that doesn’t already have a directory with the same name in the current directory.
- wait(timeout=None)¶
- removeTask(task)¶
- loadNewTask()¶
- nextTask()¶
- isStartable()¶
- targetGetValue()¶
- targetSetValue(value)¶
- setNextTask(task)¶
- __len__()¶
- DONE = 3¶
- FAILED = 2¶
- RUNNING = 1¶
- TaskClassChanged¶
A
pyqtSignal
emitted by instances of the class.
- TaskClassReplaced¶
A
pyqtSignal
emitted by instances of the class.
- WAITING = 0¶
- namerChanged¶
A
pyqtSignal
emitted by instances of the class.
- namerReplaced¶
A
pyqtSignal
emitted by instances of the class.
- statusChanged¶
A
pyqtSignal
emitted by instances of the class.
- statusReplaced¶
A
pyqtSignal
emitted by instances of the class.
- task_listChanged¶
A
pyqtSignal
emitted by instances of the class.
- task_listReplaced¶
A
pyqtSignal
emitted by instances of the class.