bumpy-match-83743
07/24/2024, 9:11 PMancient-wolf-19325
07/24/2024, 9:11 PMFlyteRemote
class from the flytekit
library. Here's a concise example:
1. Initialize FlyteRemote: Create a FlyteRemote
object with the appropriate configuration.
2. Fetch Execution: Use the fetch_execution
method to retrieve the execution details.
3. Access Outputs: Access the outputs of the execution.
from flytekit.remote import FlyteRemote, Config
# Initialize FlyteRemote
remote = FlyteRemote(
config=Config.for_endpoint(endpoint="flyte.example.net"),
default_project="flytesnacks",
default_domain="development",
)
# Fetch the execution
execution = remote.fetch_execution(
name="fb22e306a0d91e1c6000", project="flytesnacks", domain="development"
)
# Access the outputs
output_keys = execution.outputs.keys()
model_file = execution.outputs["model_file"]
with open(model_file) as f:
result = f.read()
print(result)
For more details, refer to the Flyte documentation on inspecting executions.
Would you like more detail on any specific part?
Sources:
- Inspecting Executions
- FlyteRemote API 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.