def get_run(self, project_id: str, experiment_id: str, run_id: str): """ Details a run in Kubeflow Pipelines. Parameters ---------- project_id : str experiment_id : str run_id : str Returns ------- dict The run attributes. Raises ------ NotFound When any of project_id, experiment_id, or run_id does not exist. """ try: run = kfp_runs.get_run(experiment_id=experiment_id, run_id=run_id) except (ApiException, ValueError): raise NOT_FOUND return schemas.Run.from_orm(run)
def raise_if_run_does_not_exist(self, run_id: str, deployment_id: str): """ Raises an exception if the specified run does not exist. Parameters ---------- run_id : str deployment_id : str Raises ------ NotFound """ try: kfp_runs.get_run(experiment_id=deployment_id, run_id=run_id) except (ApiException, ValueError): raise NOT_FOUND