rhino_health.lib.endpoints.code_run.code_run_dataclass
#
Module Contents#
Classes#
Result of a code run |
- class rhino_health.lib.endpoints.code_run.code_run_dataclass.CodeRunStatus#
Bases:
str
,enum.Enum
- INITIALIZING = 'Initializing'#
- STARTED = 'Started'#
- COMPLETED = 'Completed'#
- FAILED = 'Failed'#
- HALTING = 'Halting'#
- HALTED_SUCCESS = 'Halted: Success'#
- HALTED_FAILURE = 'Halted: Failure'#
- class rhino_health.lib.endpoints.code_run.code_run_dataclass.CodeRun(**data)#
Result of a code run
- property input_datasets#
Return the Input Datasets that were used for this CodeRun
Warning
The result of this function is cached. Be careful calling this function after making changes
- Returns:
- datasets: List[Dataset]
Dataclasses representing the Datasets
- property output_datasets#
Return the Output Datasets that were used for this CodeRun
Warning
The result of this function is cached. Be careful calling this function after making changes
- Returns:
- datasets: List[Dataset]
Dataclasses representing the Datasets
- property warnings#
Returns any warnings that occurred during this run
- property errors#
Returns any errors that occurred during this run
- property code_object: CodeObject#
Return the CodeObject Dataclass associated with code_object_uid
Warning
The result of this function is cached. Be careful calling this function after making changes. All dataclasses must already exist on the platform before making this call.
- Returns:
- code_object: CodeObject
Dataclass representing the CodeObject
- property creator: User#
Return the User Dataclass associated with creator_uid
Warning
The result of this function is cached. Be careful calling this function after making changes. All dataclasses must already exist on the platform before making this call.
- Returns:
- creator: User
Dataclass representing the User
- uid: str#
The unique ID of the CodeRun
- action_type: str#
The type of code run performed
- status: CodeRunStatus#
The code run status
- start_time: str#
The code run start time
- end_time: Any#
The code run end time
- input_dataset_uids: List[List[str]] | None#
A list of dataset uids. Each entry is a list of datasets corresponding to a data_schema on the CodeObject [[first_dataset_for_first_run, second_dataset_for_first_run …], [first_dataset_for_second_run, second_dataset_for_second_run …], …]
- output_dataset_uids: List[List[str]] | None#
A list of dataset uids. Each entry is a list of of datasets corresponding to a data_schema on the CodeObject [[first_dataset_for_first_run, second_dataset_for_first_run …], [first_dataset_for_second_run, second_dataset_for_second_run …], …]
- code_object_uid: str#
The relevant code_object object
- results_info: Dict[str, Any] | None#
The run result info
- results_report: str | None#
The run result report
- report_images: List[Any]#
The run result images
- paths_to_model_params: typing_extensions.Annotated[Optional[List[str]], Field(alias='model_params_external_storage_paths')]#
The external paths where model param results are stored, if any
- created_at: typing_extensions.Annotated[str, Field(alias='start_time')]#
- creator_uid: str#
The UID of the creator of this dataclass on the system
- code_object_name: str#
The code_object name
- creator_name: str#
The creator name
- save_model_params(file_name)#
Saves the model params to a file.
Warning
This feature is under development and the interface may change
- Parameters:
- file_name: str
Name of the file to save to
- wait_for_completion(timeout_seconds: int = 500, poll_frequency: int = 10, print_progress: bool = True)#
Wait for the asynchronous CodeRun to complete
- Parameters:
- timeout_seconds: int = 500
How many seconds to wait before timing out
- poll_frequency: int = 10
How frequent to check the status, in seconds
- print_progress: bool = True
Whether to print how long has elapsed since the start of the wait
- Returns:
- code_run: CodeRun
Dataclass representing the CodeRun of the run
See also