Inherits IntEnum.
List of possible Experiment statuses during the Experiment lifetime
Definition at line 21 of file status.py.
◆ defaultMessage()
str coretex.coretex.experiment.status.ExperimentStatus.defaultMessage |
( |
|
self | ) |
|
List of supported statuses:
- preparingToStart : Experiment preparing to start
- completedWithSuccess : Experiment is completed without errors
- completedWithError : Experiment is completed with error
- stopped : Experiment is stopped manually
- stopping : Experiment is stopping
Returns
-------
str -> Appropriate message based on Experiment status
Raises
------
ValueError -> if unsupported status is provided
Definition at line 38 of file status.py.
38 def defaultMessage(self) -> str:
40 List of supported statuses:
41 - preparingToStart : Experiment preparing to start
42 - completedWithSuccess : Experiment is completed without errors
43 - completedWithError : Experiment is completed with error
44 - stopped : Experiment is stopped manually
45 - stopping : Experiment is stopping
49 str -> Appropriate message based on Experiment status
53 ValueError -> if unsupported status is provided
56 if self == ExperimentStatus.preparingToStart:
57 return "Preparing to start the experiment."
59 if self == ExperimentStatus.completedWithSuccess:
60 return "Experiment completed successfully."
62 if self == ExperimentStatus.completedWithError:
63 return "Experiment execution was interrupted due to an error. View experiment console for more details."
65 if self == ExperimentStatus.stopped:
66 return "Experiment execution was stopped by request from the user."
68 if self == ExperimentStatus.stopping:
69 return "Stopping the experiment."
71 raise ValueError(f
">> [Coretex] {self.name} has no default message")
◆ isFinal()
bool coretex.coretex.experiment.status.ExperimentStatus.isFinal |
( |
|
self | ) |
|
List of final statuses:
- ExperimentStatus.completedWithSuccess : Experiment finished without error
- ExperimentStatus.completedWithError : Experiment finished with an error
- ExperimentStatus.stopped : Experiment is manually stopped
Returns
-------
bool -> True if a status is a final status for a experiment
Definition at line 74 of file status.py.
74 def isFinal(self) -> bool:
76 List of final statuses:
77 - ExperimentStatus.completedWithSuccess : Experiment finished without error
78 - ExperimentStatus.completedWithError : Experiment finished with an error
79 - ExperimentStatus.stopped : Experiment is manually stopped
83 bool -> True if a status is a final status for a experiment
87 self == ExperimentStatus.completedWithSuccess
or
88 self == ExperimentStatus.completedWithError
or
89 self == ExperimentStatus.stopped
The documentation for this class was generated from the following file: