Traits
State traits are verified for all Runnable objects that inherit
from StateTraits or its subclasses. Verification includes:
- Minimal checks of workflow construction (composition of
Runnable classes)
- Runtime checks
All built-in Runnable classes declare state traits requirements that are
either independent (for simple ones) or derived from a child workflow. Traits of a new
Runnable must be expressed and modified at construction time by its parent.
When developing new Runnable classes, constructing composite traits can be
nontrivial for some advanced flow-control runnables.
State traits validation base class and related state validation mixins (i/o
validation toggle, i/o dimensionality, state structure).
When subclassing (combining with Runnable), list them in
the following order, left to right:
- structure mixins (e.g. SubsamplesIntaking and SubproblemSampler)
- dimensionality mixins (e.g. MultiInputStates and MISO)
- validation toggles (e.g. InputValidated and NotValidated)
- StateTraits base class (not required if any of the above is used)
- Runnable base class
For example:
- class MyRunnable(hybrid.traits.SubsamplesIntaking, hybrid.traits.MISO, hybid.Runnable):
- pass
-
class
EmbeddingIntaking[source]
-
class
EmbeddingProducing[source]
-
class
InputNotValidated[source]
-
class
InputValidated[source]
-
class
MIMO[source]
Multiple Inputs, Multiple Outputs.
-
class
MISO[source]
Multiple Inputs, Single Output.
-
class
MultiInputStates[source]
-
class
MultiOutputStates[source]
-
class
NotValidated[source]
Input state(s) and output state(s) are not validated.
-
class
OutputNotValidated[source]
-
class
OutputValidated[source]
-
class
ProblemDecomposer[source]
-
class
ProblemIntaking[source]
-
class
ProblemProducing[source]
-
class
ProblemSampler[source]
-
class
SIMO[source]
Single Input, Multiple Outputs.
-
class
SISO[source]
Single Input, Single Output.
-
class
SamplesIntaking[source]
-
class
SamplesProcessor[source]
-
class
SamplesProducing[source]
-
class
SingleInputState[source]
-
class
SingleOutputState[source]
-
class
StateTraits[source]
Set of traits imposed on State. By default, not validated.
-
validate_state_trait(state, trait, io)[source]
Validate single input/output (io) state trait.
-
class
SubproblemIntaking[source]
-
class
SubproblemProducing[source]
-
class
SubproblemSampler[source]
-
class
SubsamplesComposer[source]
-
class
SubsamplesIntaking[source]
-
class
SubsamplesProcessor[source]
-
class
SubsamplesProducing[source]
-
class
Validated[source]
Validated input state(s) and output state(s).