schrodinger.tasks.drivers module¶
Drivers often run multiple batches of subjobs in parallel. BaseDriverTask offers functionality to automatically process the results of those parallel subjob runs.
To take advantage of these features all we have to do is define our driver’s
Output
with at least one queue.QueueReport
subparam and set its value to
queue.QueueResults.makeReport
in mainFunction
:
from schrodinger.tasks import queue
class FooDriver(BaseDriverTask):
class Input(CompoundParam):
...
class Output(CompoundParam):
bar_subjobs_report: queue.QueueReport
def mainFunction(self):
bar_tasks = self._makeBarTasks()
results = queue.run_tasks_in_parallel(bar_tasks)
self.output.bar_subjobs_report = results.makeReport()
...
BaseDriverTask will use the QueueReport instances to print summaries of each QueueReport and write each one to JSON.
- class schrodinger.tasks.drivers.BaseDriverTask(*args, _param_type=<object object>, **kwargs)¶
Bases:
schrodinger.tasks.jobtasks.ComboJobTask
Base class for jobtask drivers.
- runBackend()¶
@overrides: AbstractComboTask
- calling_contextChanged¶
A
pyqtSignal
emitted by instances of the class.
- calling_contextReplaced¶
A
pyqtSignal
emitted by instances of the class.
- failure_infoChanged¶
A
pyqtSignal
emitted by instances of the class.
- failure_infoReplaced¶
A
pyqtSignal
emitted by instances of the class.
- inputChanged¶
A
pyqtSignal
emitted by instances of the class.
- inputReplaced¶
A
pyqtSignal
emitted by instances of the class.
- job_configChanged¶
A
pyqtSignal
emitted by instances of the class.
- job_configReplaced¶
A
pyqtSignal
emitted by instances of the class.
- max_progressChanged¶
A
pyqtSignal
emitted by instances of the class.
- max_progressReplaced¶
A
pyqtSignal
emitted by instances of the class.
- nameChanged¶
A
pyqtSignal
emitted by instances of the class.
- nameReplaced¶
A
pyqtSignal
emitted by instances of the class.
- outputChanged¶
A
pyqtSignal
emitted by instances of the class.
- outputReplaced¶
A
pyqtSignal
emitted by instances of the class.
- progressChanged¶
A
pyqtSignal
emitted by instances of the class.
- progressReplaced¶
A
pyqtSignal
emitted by instances of the class.
- progress_stringChanged¶
A
pyqtSignal
emitted by instances of the class.
- progress_stringReplaced¶
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.