- 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>)#
Stores step information without being the
- 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.
- start_time: Optional[datetime] = None#
The time (in UTC) that this step started running.
- end_time: Optional[datetime] = None#
The time (in UTC) that this step stopped running. This will be set whether the step succeeded or failed.
- error: Optional[str] = None#
If the step failed, this is where the error goes.
Workspaceimplementations need to serialize
StepInfo(using pickle or dill, for example), but some exceptions can’t be pickled. In those cases
errorwill just be a string representation of the exception.
- metadata: Optional[Dict[str, Any]] = None#
Metadata from the step. This comes from the
step_metadataargument to the
- 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.
- property duration: Optional[timedelta]#
The time it took to run this step.
Generates a JSON-safe, human-readable, dictionary representation of this dataclass.
- classmethod from_json_dict(json_dict)#
The inverse of
Refresh environment and platform metadata.
- class tango.step_info.StepState(value)#
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>)#
- class tango.step_info.EnvironmentMetadata(python=<factory>, executable=<factory>, command=<factory>, root=<factory>, packages=<factory>, git=<factory>, tango=<factory>)#
- 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.
- class tango.step_info.GitMetadata(commit=None, remote=None)#