big-notebook-82371
02/08/2024, 8:39 PMfaint-rocket-14513
02/08/2024, 8:39 PMbig-notebook-82371
02/08/2024, 10:48 PMfaint-rocket-14513
02/08/2024, 10:48 PMremote.execute
function. Additionally, you can obtain a link to the execution in the Flyte console. To check if the execution failed and to get the error message, you can inspect the execution object returned by the remote.execute
function. If an execution fails, attempting to access its outputs will raise an exception indicating that the execution ended in failure. For example: try: print(execution.outputs) except Exception as e: print(f"Execution failed with error: {e}")
This approach is based on the behavior described in the GitHub issue where it's mentioned that accessing outputs of a failed execution will raise an error indicating the failure (source). To get a link to the execution in the Flyte console, you can construct the URL using the execution's project, domain, and name. The URL format typically looks like this: https://<flyte-console-host>/console/projects/<project>/domains/<domain>/executions/<execution-name>
You can obtain the project, domain, and execution name from the execution object. Here's how you might do it: execution_project = execution.id.project execution_domain = execution.id.domain execution_name = execution.id.name console_link = f"https://<flyte-console-host>/console/projects/{execution_project}/domains/{execution_domain}/executions/{execution_name}" print(f"View execution in Flyte console: {console_link}")
Replace <flyte-console-host>
with the actual host of your Flyte console. This information can usually be found in your Flyte deployment documentation or from your Flyte administrator.average-finland-92144
02/08/2024, 11:03 PMaverage-finland-92144
02/08/2024, 11:04 PMaverage-finland-92144
02/08/2024, 11:05 PMbig-notebook-82371
02/08/2024, 11:08 PMaverage-finland-92144
02/08/2024, 11:10 PMbig-notebook-82371
02/08/2024, 11:27 PMaverage-finland-92144
02/08/2024, 11:36 PMbig-notebook-82371
02/08/2024, 11:55 PMaverage-finland-92144
02/09/2024, 12:05 AMaverage-finland-92144
02/09/2024, 12:12 AMbig-notebook-82371
02/09/2024, 12:16 AMaverage-finland-92144
02/09/2024, 12:17 AM