:py:mod:`rhino_health.lib.endpoints.code_run.code_run_dataclass` ================================================================ .. py:module:: rhino_health.lib.endpoints.code_run.code_run_dataclass Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: rhino_health.lib.endpoints.code_run.code_run_dataclass.CodeRunStatus rhino_health.lib.endpoints.code_run.code_run_dataclass.CodeRun .. py:class:: CodeRunStatus Bases: :py:obj:`str`, :py:obj:`enum.Enum` .. py:attribute:: INITIALIZING :value: 'Initializing' .. py:attribute:: STARTED :value: 'Started' .. py:attribute:: COMPLETED :value: 'Completed' .. py:attribute:: FAILED :value: 'Failed' .. py:attribute:: HALTING :value: 'Halting' .. py:attribute:: HALTED_SUCCESS :value: 'Halted: Success' .. py:attribute:: HALTED_FAILURE :value: 'Halted: Failure' .. py:class:: CodeRun(**data) Result of a code run .. !! processed by numpydoc !! .. py: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 .. !! processed by numpydoc !! .. py: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 .. !! processed by numpydoc !! .. py:property:: warnings Returns any warnings that occurred during this run .. !! processed by numpydoc !! .. py:property:: errors Returns any errors that occurred during this run .. !! processed by numpydoc !! .. py:property:: code_object :type: 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 .. py:property:: creator :type: 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 .. py:attribute:: uid :type: str The unique ID of the CodeRun .. !! processed by numpydoc !! .. py:attribute:: action_type :type: str The type of code run performed .. !! processed by numpydoc !! .. py:attribute:: status :type: CodeRunStatus The code run status .. !! processed by numpydoc !! .. py:attribute:: start_time :type: str The code run start time .. !! processed by numpydoc !! .. py:attribute:: end_time :type: Any The code run end time .. !! processed by numpydoc !! .. py:attribute:: input_dataset_uids :type: Optional[List[List[str]]] 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 ...], ...] .. !! processed by numpydoc !! .. py:attribute:: output_dataset_uids :type: Optional[List[List[str]]] 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 ...], ...] .. !! processed by numpydoc !! .. py:attribute:: code_object_uid :type: str The relevant code_object object .. !! processed by numpydoc !! .. py:attribute:: results_info :type: Optional[Dict[str, Any]] The run result info .. !! processed by numpydoc !! .. py:attribute:: results_report :type: Optional[str] The run result report .. !! processed by numpydoc !! .. py:attribute:: report_images :type: List[Any] The run result images .. !! processed by numpydoc !! .. py:attribute:: paths_to_model_params :type: typing_extensions.Annotated[Optional[List[str]], Field(alias='model_params_external_storage_paths')] The external paths where model param results are stored, if any .. !! processed by numpydoc !! .. py:attribute:: created_at :type: typing_extensions.Annotated[str, Field(alias='start_time')] .. py:attribute:: creator_uid :type: str The UID of the creator of this dataclass on the system .. !! processed by numpydoc !! .. py:attribute:: code_object_name :type: str The code_object name .. py:attribute:: creator_name :type: str The creator name .. py:method:: 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 .. !! processed by numpydoc !! .. py:method:: 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 .. seealso:: :obj:`rhino_health.lib.endpoints.code_run.code_run_dataclass.CodeRun` Response object .. !! processed by numpydoc !!