Andrew
02/08/2024, 8:39 PMGlime
02/08/2024, 8:39 PMAndrew
02/08/2024, 10:48 PMGlime
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.David Espejo (he/him)
02/08/2024, 11:03 PMDavid Espejo (he/him)
02/08/2024, 11:04 PMDavid Espejo (he/him)
02/08/2024, 11:05 PMAndrew
02/08/2024, 11:08 PMDavid Espejo (he/him)
02/08/2024, 11:10 PMAndrew
02/08/2024, 11:27 PMDavid Espejo (he/him)
02/08/2024, 11:36 PMAndrew
02/08/2024, 11:55 PMDavid Espejo (he/him)
02/09/2024, 12:05 AMDavid Espejo (he/him)
02/09/2024, 12:12 AMAndrew
02/09/2024, 12:16 AMDavid Espejo (he/him)
02/09/2024, 12:17 AM