New RunLLM response generated: >>>*# Question* Hi...
# runllm-flyte-trial
j
New RunLLM response generated: >>>*# Question* Hi All, Is there a way to get this code using FlyteRemote API? We would like to get the same information produced by the following snippet (flytectl) instead using FlyteRemote.
Copy code
flytectl get execution -p flytesnacks -d development oeh94k9r2r --details
Thank you! # Answer Yes, you can use the FlyteRemote API to fetch execution details similar to the
flytectl
command. Here's a basic example:
Copy code
from flytekit.remote import FlyteRemote
from flytekit.configuration import Config

# Initialize FlyteRemote
remote = FlyteRemote(
    config=Config.for_endpoint(endpoint="flyte.example.net"),
    default_project="flytesnacks",
    default_domain="development",
)

# Fetch execution
execution = remote.fetch_execution(name="oeh94k9r2r", project="flytesnacks", domain="development")

# Sync execution to get node details
synced_execution = remote.sync(execution, sync_nodes=True)

# Access node execution details
node_keys = synced_execution.node_executions.keys()
node_execution_output = synced_execution.node_executions["<node_key>"].outputs
This code snippet uses
FlyteRemote
to fetch and sync execution details, including node executions, similar to the
flytectl
command with the
--details
flag. Would you like more detail on any specific part of this process? Sources: - Inspecting executions - FlyteRemote API discussion Slack Link https://flyte.slack.com/archives/CP2HDHKE1/p1732639382.946299 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.