StepInfo#
- class tango.step_info.StepInfo(unique_id, step_class_name, dependencies, cacheable, step_name=None, version=None, start_time=None, end_time=None, error=None, result_location=None, config=None, metadata=None, platform=<factory>, environment=<factory>)[source]#
Stores step information without being the
Step
itself.It’s not always possible to get a
Step
object, becauseStep
objects can’t be serialized. But you can always serialize aStepInfo
object.-
step_name:
Optional
[str
] = None# The name of the step, if it has one. Anonymous steps are identified only by their unique ID.
The same step can have different names in different runs. The last run wins, so don’t rely on this property in your code. It is just here to aid readability.
-
end_time:
Optional
[datetime
] = None# The time (in UTC) that this step stopped running. This will be set whether the step succeeded or failed.
See also
-
error:
Optional
[str
] = None# If the step failed, this is where the error goes.
Note
Some
Workspace
implementations need to serializeStepInfo
(using pickle or dill, for example), but some exceptions can’t be pickled. In those caseserror
will just be a string representation of the exception.
-
metadata:
Optional
[Dict
[str
,Any
]] = None# Metadata from the step. This comes from the
step_metadata
argument to theStep
class.
-
platform:
PlatformMetadata
# The
PlatformMetadata
.
-
environment:
EnvironmentMetadata
# The
EnvironmentMetadata
.
- property start_time_local: Optional[datetime]#
The time the step started running with respect to the local timezone, if the timezone can be determined.
- property end_time_local: Optional[datetime]#
The time the step stopped running with respect to the local timezone, if the timezone can be determined.
- to_json_dict()[source]#
Generates a JSON-safe, human-readable, dictionary representation of this dataclass.
- classmethod from_json_dict(json_dict)[source]#
The inverse of
to_json_dict()
.- Parameters:
json_dict (
Dict
[str
,Any
]) – A dictionary representation, such as the one produced byto_json_dict()
.- Return type:
-
step_name:
- class tango.step_info.StepState(value)[source]#
Describes the possible state a step can be in.
- INCOMPLETE = 'incomplete'#
The step has not run yet.
- RUNNING = 'running'#
The step is running right now.
- COMPLETED = 'completed'#
The step finished running successfully.
- FAILED = 'failed'#
The step ran, but failed.
- UNCACHEABLE = 'uncacheable'#
The step is uncacheable. It will be executed as many times as the results are needed, so we don’t keep track of the state.
- class tango.step_info.PlatformMetadata(operating_system=<factory>, cpu_count=<factory>, user=<factory>, host=<factory>)[source]#
- class tango.step_info.EnvironmentMetadata(python=<factory>, executable=<factory>, command=<factory>, root=<factory>, packages=<factory>, git=<factory>, tango=<factory>)[source]#
-
-
packages:
Optional
[List
[Tuple
[str
,str
]]]# The current set of Python packages in the Python environment. Each entry is a tuple of strings. The first element is the name of the package, the second element is the version.
-
git:
Optional
[GitMetadata
]# The
GitMetadata
.
-
tango:
Optional
[TangoMetadata
]# The
TangoMetadata
.
-
packages: