schrodinger.stepper.stepper module¶
Framework for writing computational workflows and running them in a highly
distributed manner. Each step of the workflow is either a “mapping” operation
(see MapStep
) or “reducing” operation (see ReduceStep). These steps can then
be chained together using the `Chain
class.
For a more complete introduction, see WordCount tutorial:
For documentation on specific stepper features, see the following feature list. You can ctrl+f the feature tag to jump to the relevant docstrings.
Feature |
Tag |
---|---|
MapStep |
_map_step_ |
ReduceStep |
_reduce_step_ |
Chain |
_chain_ |
Settings |
_settings_ |
Serialization |
_serialization_ |
File Handling |
_file_handling_ |
Generic Steps |
_generics_ |
Custom Workflow |
_custom_workflows_ |
Double Batching |
_dbl_batching_ |
#=============================================================================== # Running stepper with custom, undistributed workflows <_custom_workflows_> #=============================================================================== To run steps that aren’t defined in the core suite: The script should be executed inside the working directory and import steps from a local package in the working directory.
Working dir contents:
script.py
my_lib/
__init__.py
steps.py
Minimal code in script.py if it needs to run under job control:
from schrodinger.job import launchapi
from schrodinger.ui.qt.appframework2 import application
from my_lib.steps import MyStep
def get_job_spec_from_args(argv):
jsb = launchapi.JobSpecificationArgsBuilder(argv)
jsb.setInputFile(__file__)
jsb.setInputDirectory('my_lib')
return jsb.getJobSpec()
def main():
step = MyStep()
set.getOutputs()
if __name__ == '__main__':
application.run_application(main)
#===============================================================================
# Generic Steps <_generics_>
#===============================================================================
Steps that can be run on any data type can be created by using the GENERIC
sentinel type as the input or output type of a step. The step will then
receive all inputs as serialized strings and should return all string outputs.
Example:
>>> class DeduplicateStep(ReduceStep):
... Input = Output = GENERIC
...
... def reduceFunction(self, inps):
... yield from sorted(set(inps))
...
>>> class IdentityStep(MapStep):
... Input = Output = int
...
... def mapFunction(self, value):
... yield value
...
>>> class DeduplicatedIdentityChain(Chain):
... def buildChain(self):
... self.addStep(IdentityStep())
... self.addStep(DeduplicateStep())
... self.addStep(IdentityStep())
...
>>> chain = DeduplicatedIdentityChain()
>>> chain.setInputs([1, 2, 3, 1, 2, 3])
>>> chain.getOutputs()
[1, 2, 3]
These steps can be chained together with any steps, regardless of the input or output types of the other steps.
- NOTE::
No validation is done to guarantee that the input type of the step after a generic step is the same as the output type of the precedeing step. The behavior for this circumstance is undefined and will likely resulted in an error.
#=============================================================================== # Double Batching <_dbl_batching_> #=============================================================================== Job launch speeds at the time of writing is about one job per 3 or 4 seconds. This rate becomes insufficient once we need more than a few hundred workers. To get around this, stepper employs a pattern we coin “double batching”, where we create subjobs whose sole purpose is to themselves create the subjobs that actually run the steps.
NOTE:: We use double-batching for the PubSub implementation of stepper as well as the file-based implementation. The literal meaning of “double-batching” doesn’t apply as well to the PubSub implementation but the general pattern of launching subjobs to launch more subjobs still applies.
#=============================================================================== # Environment variables and global settings #===============================================================================
Settings:
- SCHRODINGER_STEPPER_DEBUG
Set to 1 to have most files brought back from a workflow run. Set to 2 to have _all_ files brought back.
- SCHRODINGER_STEPPER_LOG_LEVEL
Set to an integer or name representing the log level to use for the logger. Valid log names are in decreasing order of verbosity NOTSET, DEBUG, INFO, WARN, ERROR, FATAL, and CRITICAL. Set to DEBUG to see log messages from cloud clients.
- SCHRODINGER_GCP_KEY
Expected when running stepper with pubsub and bigquery. Should be a path to the gcp service key. See
for more information on generating gcp service keys.
- SCHRODINGER_CLOUD_VENV
A path to the python executable of a virtualenv that can be used for interfacing with GCP or AWS. This virtualenv should be accessible on all nodes that a stepper workflow will be run on in addition to having all necessary python client libraries.
- SCHRODINGER_GCP_ENABLED
Optional setting to signify that the current machine is a GCP compute engine. Setting this will make SCHRODINGER_GCP_KEY also optional as credentials will be inferred from the GCP compute engine. SCHRODINGER_GCP_KEY will have precedence over the compute engine’s default credentials if set.
- SCHRODINGER_CLOUD_WORKER_TIMEOUT
Optional debug setting. If set, pubsub workers will timeout after SCHRODINGER_CLOUD_WORKER_TIMEOUT minutes.
- SCHRODINGER_GCP_NUM_PUBSUB_WORKERS
Sets the default number of pubsub workers that will be used. If not set, one will be used. Note that this value can still be overridden by a workflow’s configuration.
- SCHRODINGER_STEPPER_ERROR_THRESHOLD
Sets the batching error threshold. If not set, 0.9 will be used. Note that this value can still be overridden by a workflow’s configuration.
- schrodinger.stepper.stepper.get_debug_level()¶
- class schrodinger.stepper.stepper.ElapsedFormatter¶
Bases:
object
A stepper logging formatter that includes how much time has elapsed since a start time in all messages.
FORMATTER.start()
is safe to call multiple times, the start time will be set to the time of the earliest call.Example usage:
logger.debug("Message before debug.") # Message before debug. FORMATTER.start() time.wait(1) logger.debug("My message") # <STEPPER> DEBUG +00:00:01: My message
- __init__()¶
- start()¶
- format(record)¶
- schrodinger.stepper.stepper.ichunked(iterable, n)¶
Reimplementation of more_itertools.ichunked that does not cache n items of iterable at a time.
Breaks
iterable
into sub-iterables withn
elements each.Note that unlike more_itertools.ichunked, an error will be raised if you try to iterate over a chunk before its previous chunk has been consumed.
- class schrodinger.stepper.stepper.StepperFile(value='', *args, **kwargs)¶
- class schrodinger.stepper.stepper.StepperFolder(value='', *args, **kwargs)¶
- class schrodinger.stepper.stepper.StepTaskInput(*args, _param_type=<object object>, **kwargs)¶
Bases:
schrodinger.models.parameters.CompoundParam
- dehydrated_step: schrodinger.stepper.stepper._DehydratedStep¶
See
_BaseStep._dehydrateStep
for documentation.
- debug_mode: bool¶
Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:
class Coord(CompoundParam): x: int y: int
An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:
coord = Coord() coord.x = 4
When a Param value is set, the
valueChanged
signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:class Atom(CompoundParam): coord: Coord element: str
- misc_input_filenames: List[schrodinger.tasks.tasks.TaskFile]¶
A Param to represent lists. Values of this param will have a
mutated
signal that will be emitted whenever any mutation method is called.The constructor optionally takes a
item_class
keyword argument to specify what type of class the items in the list will be. This information will be used for jsonifying the list if specified.
- misc_input_folders: List[schrodinger.tasks.tasks.TaskFolder]¶
A Param to represent lists. Values of this param will have a
mutated
signal that will be emitted whenever any mutation method is called.The constructor optionally takes a
item_class
keyword argument to specify what type of class the items in the list will be. This information will be used for jsonifying the list if specified.
- debug_modeChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- debug_modeReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- dehydrated_stepChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- dehydrated_stepReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- misc_input_filenamesChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- misc_input_filenamesReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- misc_input_foldersChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- misc_input_foldersReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class schrodinger.stepper.stepper.StepTaskOutput(*args, _param_type=<object object>, **kwargs)¶
Bases:
schrodinger.models.parameters.CompoundParam
- output_file: schrodinger.tasks.tasks.TaskFile¶
Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:
class Coord(CompoundParam): x: int y: int
An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:
coord = Coord() coord.x = 4
When a Param value is set, the
valueChanged
signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:class Atom(CompoundParam): coord: Coord element: str
- run_info: dict¶
A Param to represent dictionaries. Values of this param will have a
mutated
signal that will be emitted whenever any mutation method is called.The constructor optionally takes a
value_class
keyword argument to specify what type of class the values will be. This information will be used for jsonifying the dictionary if specified. (Note that non-string keys are not currently supported for jsonification. This may change in the future. See PANEL-13029).
- misc_output_filenames: List[schrodinger.tasks.tasks.TaskFile]¶
A Param to represent lists. Values of this param will have a
mutated
signal that will be emitted whenever any mutation method is called.The constructor optionally takes a
item_class
keyword argument to specify what type of class the items in the list will be. This information will be used for jsonifying the list if specified.
- misc_output_filenamesChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- misc_output_filenamesReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- output_fileChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- output_fileReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- run_infoChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- run_infoReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class schrodinger.stepper.stepper.StepTaskMixin(*args, step=None, **kwargs)¶
Bases:
schrodinger.models.parameters.CompoundParamMixin
This class must be mixed in with a subclass of AbstractComboTask. The resulting task class may be used to run any step as a task, provided the input, output, and settings classes are all JSONable.
- DEFAULT_TASKDIR_SETTING = 1¶
- __init__(*args, step=None, **kwargs)¶
- addLicenseReservation(license, num_tokens=1)¶
- setStep(step)¶
- getStepClass()¶
- mainFunction()¶
- class schrodinger.stepper.stepper.StepSubprocessTask(*args, _param_type=<object object>, **kwargs)¶
Bases:
schrodinger.stepper.stepper.StepTaskMixin
,schrodinger.tasks.tasks.ComboSubprocessTask
- calling_contextChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- calling_contextReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- failure_infoChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- failure_infoReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- input: StepTaskInput¶
- inputChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- inputReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- max_progressChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- max_progressReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- nameChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- nameReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- output: StepTaskOutput¶
- outputChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- outputReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- progressChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- progressReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- progress_stringChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- progress_stringReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- statusChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- statusReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class schrodinger.stepper.stepper.StepJobTask(*args, _param_type=<object object>, **kwargs)¶
Bases:
schrodinger.stepper.stepper.StepTaskMixin
,schrodinger.tasks.jobtasks.ComboJobTask
- isCanceled() bool ¶
Whether the job underlying the task is canceled.
If there is no job associated with the task, then this returns False.
- mainFunction()¶
- calling_contextChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- calling_contextReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- failure_infoChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- failure_infoReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- inputChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- inputReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- job_configChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- job_configReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- max_progressChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- max_progressReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- nameChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- nameReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- outputChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- outputReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- progressChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- progressReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- progress_stringChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- progress_stringReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- statusChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- statusReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class schrodinger.stepper.stepper.Topic(*args, _param_type=<object object>, **kwargs)¶
Bases:
schrodinger.models.parameters.CompoundParam
An abstraction over a container of messages in a Publish/Subscribe model
- Variables
name – the name of the topic
num_uploaded_msgs – the number of messages that were uploaded to this topic; it is not reflective of the number of messages currently in the topic.
- name: str¶
Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:
class Coord(CompoundParam): x: int y: int
An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:
coord = Coord() coord.x = 4
When a Param value is set, the
valueChanged
signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:class Atom(CompoundParam): coord: Coord element: str
- num_uploaded_msgs: int¶
Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:
class Coord(CompoundParam): x: int y: int
An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:
coord = Coord() coord.x = 4
When a Param value is set, the
valueChanged
signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:class Atom(CompoundParam): coord: Coord element: str
- nameChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- nameReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- num_uploaded_msgsChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- num_uploaded_msgsReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class schrodinger.stepper.stepper.BatchSettings(*args, _param_type=<object object>, **kwargs)¶
Bases:
schrodinger.models.parameters.CompoundParam
- size: int¶
Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:
class Coord(CompoundParam): x: int y: int
An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:
coord = Coord() coord.x = 4
When a Param value is set, the
valueChanged
signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:class Atom(CompoundParam): coord: Coord element: str
- task_class: type¶
Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:
class Coord(CompoundParam): x: int y: int
An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:
coord = Coord() coord.x = 4
When a Param value is set, the
valueChanged
signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:class Atom(CompoundParam): coord: Coord element: str
- hostname: str¶
Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:
class Coord(CompoundParam): x: int y: int
An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:
coord = Coord() coord.x = 4
When a Param value is set, the
valueChanged
signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:class Atom(CompoundParam): coord: Coord element: str
- use_pubsub: bool¶
Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:
class Coord(CompoundParam): x: int y: int
An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:
coord = Coord() coord.x = 4
When a Param value is set, the
valueChanged
signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:class Atom(CompoundParam): coord: Coord element: str
- num_pubsub_workers: int¶
Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:
class Coord(CompoundParam): x: int y: int
An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:
coord = Coord() coord.x = 4
When a Param value is set, the
valueChanged
signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:class Atom(CompoundParam): coord: Coord element: str
- error_threshold: float¶
Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:
class Coord(CompoundParam): x: int y: int
An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:
coord = Coord() coord.x = 4
When a Param value is set, the
valueChanged
signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:class Atom(CompoundParam): coord: Coord element: str
- initializeValue()¶
Override to dynamically set up the default value of the param. Useful for default values that are determined at runtime. This is called any time the param is reset.
- error_thresholdChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- error_thresholdReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- hostnameChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- hostnameReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- num_pubsub_workersChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- num_pubsub_workersReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- sizeChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- sizeReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- task_classChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- task_classReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- use_pubsubChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- use_pubsubReplaced¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- class schrodinger.stepper.stepper.Serializer¶
Bases:
object
<_serialization_> A class for defining special serialization for some datatype. Serialization by default uses the
json
protocol, but if a specialized protocol is wanted instead, users can subclass this class to do so.Subclasses should:
- Define
DataType
. This is the class that this serializer can encode/decode.
- Define
- Define
toString(self, output)
, which defines how to serialize an output.
- Define
- Define
fromString(self, input_str)
, which defines how to deserialize an input.
- Define
This can then be used as the
InputSerializer
orOutputSerializer
for any step.Here’s an example for defining an int that’s serialized in base-two as opposed to base-ten:
class IntBaseTwoSerializer(Serializer): DataType = int def toString(self, output): return bin(output) # 7 -> '0b111' def fromString(self, input_str): return int(input_str[2:], 2) # '0b111' -> 7
This can then be used anywhere you’d use an int as the output or input in a step. For example:
class SquaringStep(MapStep): Input = int InputSerializer = IntBaseTwoSerializer Output = int OutputSerializer = IntBaseTwoSerializer def mapFunction(self, inp): yield inp**2
Now, any time that a
SquaringStep
would read its inputs from a file or write its outputs to a file, it’ll do so using using a base-two representation.- DataType = NotImplemented¶
- serialize(items, fname)¶
Write
items
to a file namedfname
.
- deserialize(fname)¶
Read in items from
fname
. :type fname: str :rtype: iterable[self.DataType]
- fromString(input_str)¶
- toString(output)¶
- exception schrodinger.stepper.stepper.ValidationIssue(source_step, msg)¶
Bases:
RuntimeError
- __init__(source_step, msg)¶
- exception schrodinger.stepper.stepper.SettingsError(source_step, msg)¶
Bases:
schrodinger.stepper.stepper.ValidationIssue
Used in conjunction with
_BaseStep.validateSettings
to report an error with settings. Constructed with the step with the invalid settings and an error message, e.g.SettingsError(bad_step, "Step does not have required settings."
)
- exception schrodinger.stepper.stepper.SettingsWarning(source_step, msg)¶
Bases:
schrodinger.stepper.stepper.ValidationIssue
Used in conjunction with
_BaseStep.validateSettings
to report a warning with settings. Constructed with the step with the invalid settings and an error message, e.g.SettingsWarning(bad_step, "Step setting FOO should ideally be positive"
)
- exception schrodinger.stepper.stepper.ResourceError(source_step, msg)¶
Bases:
schrodinger.stepper.stepper.ValidationIssue
Used in conjunction with
_BaseStep.validateSettings
to report an error with a resource setting. Constructed with the step with the invalid setting and an error message, e.g.,ResourceError(bad_step, "Step setting 'file' has not been set."
)
- exception schrodinger.stepper.stepper.LocalResourceError(source_step, msg)¶
Bases:
schrodinger.stepper.stepper.ResourceError
A ResourceError specifically for local StepperFile and StepperFolder validations, i.e., resources that are on a job submission host and may have to be transferred to compute resources
- exception schrodinger.stepper.stepper.StaticResourceError(source_step, msg)¶
Bases:
schrodinger.stepper.stepper.ResourceError
A ResourceError specifically for static StepperFile and StepperFolder validations, i.e., resources that are not necessarily available on a job submission host
- class schrodinger.stepper.stepper.PubsubEnabledStepMixin(*args, **kwargs)¶
Bases:
object
A mixin that allows a step to be run using PubSub.
Steps with this mixin will have batch settings that have a
use_pubsub
flag and anum_pubsub_workers
integer. Flippinguse_pubsub
to on will have the step load up all its inputs into a pubsub topic before spinning upnum_pubsub_workers
subjobs that will all take from the input topic, run the step’s computation on it, and upload it to an output topic.Calling
my_pubsub_step.getOutputs()
will return all the outputs from the output topic, so to a user this will all be implementation detail.- __init__(*args, **kwargs)¶
- property topic_prefix¶
- property topic_suffix¶
- outputs(*args, **kwargs)¶
- usingPubsub()¶
- getInputTopic() Optional[schrodinger.stepper.stepper.Topic] ¶
- setInputTopic(inp_topic: Optional[schrodinger.stepper.stepper.Topic])¶
- getOutputTopic() Optional[schrodinger.stepper.stepper.Topic] ¶
- setOutputTopic(outp_topic: Optional[schrodinger.stepper.stepper.Topic])¶
- initializeTopics()¶
- class schrodinger.stepper.stepper.UnbatchedReduceStep(settings=None, config=None, step_id=None, metrics_logger_depth=None, _run_info=None, **kwargs)¶
Bases:
schrodinger.stepper.stepper._BaseStep
” An unbatchable ReduceStep. See ReduceStep for more information.
- reduceFunction(inputs)¶
- class schrodinger.stepper.stepper.ReduceStep(*args, **kwargs)¶
Bases:
schrodinger.stepper.stepper._BatchableStepMixin
,schrodinger.stepper.stepper.UnbatchedReduceStep
<_reduce_step_> A computational step that performs a function on a collection of inputs to produce output items.
To construct a ReduceStep:
Implement reduceFunction
Define Input (the type expected by the mapFunction)
Define Output (the type of item produced by the mapFunction)
Define Settings (data class for any settings needed by the mapFunction)
- reduceFunction(inputs)¶
The main computation for this step. This function should take in a iterable of inputs and return an iterable of outputs.
Example:
def reduceFunction(self, words): # Find all unique words seen_words = set() for word in words: if word not in seen_words: seen_words.add(word) yield word
- class schrodinger.stepper.stepper.UnbatchedMapStep(settings=None, config=None, step_id=None, metrics_logger_depth=None, _run_info=None, **kwargs)¶
Bases:
schrodinger.stepper.stepper.UnbatchedReduceStep
<_unbatchability_> An unbatchable MapStep. See MapStep for more information.
- reduceFunction(inputs)¶
- mapFunction(input)¶
- class schrodinger.stepper.stepper.MapStep(*args, **kwargs)¶
Bases:
schrodinger.stepper.stepper._BatchableStepMixin
,schrodinger.stepper.stepper.UnbatchedMapStep
<_map_step_> A computational step that performs a function on input items from an input source to produce output items.
To construct a MapStep:
Implement mapFunction
Define Input (the type expected by the mapFunction)
Optionally define a InputSerializer (see
Serializer
for more info.)Define Output (the type of item produced by the mapFunction)
Optionally define a OutputSerializer (see
Serializer
for more info.)Define Settings (data class for any settings needed by the mapFunction)
- mapFunction(input)¶
The main computation for this step. This function should take in a single input item and return an iterable of outputs. This allows a single output to produce multiple ouputs (e.g. enumeration).
The output may be yielded as a generator, in order to reduce memory usage.
If only a single output is produced for each input, return it as a single-element list.
- Parameters
input –
this will be a single input item from the input source. Implementer is encouraged to use a more descriptive, context- specific variable name. Example:
- def mapFunction(self, starting_smiles):
…
- class schrodinger.stepper.stepper.UnbatchedChain(*args, **kwargs)¶
Bases:
schrodinger.stepper.stepper.UnbatchedReduceStep
- property Input¶
- property Output¶
- property InputSerializer¶
The default serializer that simply uses
json.loads
andjson.dumps
- property OutputSerializer¶
The default serializer that simply uses
json.loads
andjson.dumps
- setInputs(inputs: Iterable[Any], starting_step_id: str = None)¶
Set the inputs for the chain. If
starting_step_id
is specified, then all steps before the specified starting step will be skipped. This is useful for resuming a chain’s computation.
- setInputFile(input_file: str, starting_step_id: str = None)¶
Set the input file for the chain. If
starting_step_id
is specified, then all steps before the specified starting step will be skipped. This is useful for resuming a chain’s computation.
- setStartingStep(starting_step: str)¶
- validateSettings()¶
Check whether the chain settings are valid and return a list of
SettingsError
andSettingsWarning
to report any invalid settings. Default implementation simply returns problems from all child steps.- Return type
list[TaskError or TaskWarning]
- getResources(param_type, resource_type)¶
Get the stepper resources in the settings for the chain as well as for every step in the chain that are instances of
param_type
and have a resource_type attribute that isresource_type
.Note does not work for list/set/tuple subparams in the settings.
- Parameters
param_type (tasks._TaskResource) – the resource parameter type
resource_type (ResourceType) – the type of resource to get
- Returns
the set of stepper resources of
resource_type
- Return type
set of tasks._TaskResource
- __init__(*args, **kwargs)¶
See class docstring for info on the different constructor arguments.
- __len__()¶
- addStep(step)¶
- report(prefix='')¶
Report the workflow steps and their settings (recursively).
- Parameters
prefix (str) – the text to start each line with
- validateChain()¶
Checks that the declaration of the chain is internally consistent - i.e. that each step is valid and each step’s Input class matches the preceding step’s Output class.
- reduceFunction(inputs)¶
- buildChain()¶
This method must be implemented by subclasses to build the chain. The chain is built by modifying self.steps. The chain’s composition may be dependent on self.settings.
- class schrodinger.stepper.stepper.Chain(*args, **kwargs)¶
Bases:
schrodinger.stepper.stepper._BatchableStepMixin
,schrodinger.stepper.stepper.UnbatchedChain
<_chain_> Run a series of steps. The steps must be created by overriding buildChain.
- getLicenseRequirements()¶
- schrodinger.stepper.stepper.get_all_steps_and_chains(step: schrodinger.stepper.stepper._BaseStep) Set[schrodinger.stepper.stepper._BaseStep] ¶
Given a step, return a set of all steps it contains and itself. For example, given a chain A with the following topology:
A |-------| B C |-------| D E
this method will return:
A -> set([A, B, C, D, E]) B -> set[B]) C -> set([C, D, E])