https://flyte.org logo
#flytekit
Title
# flytekit
e

Evan Sadler

08/22/2022, 6:16 PM
Does anyone know how to search through runs and outputs in python? I for some reason cannot figure out how to do that. I am trying to see how much metadata I can parse through in python. Thanks for your help!
n

Niels Bantilan

08/22/2022, 6:27 PM
e

Evan Sadler

08/22/2022, 6:27 PM
@Niels Bantilan that looks exactly like what I am looking for! Thank you
On the off chance is there a local version of this? Perhaps to look at a projects local runs?
n

Niels Bantilan

08/22/2022, 6:33 PM
yep, the cluster you get access to in
FlyteRemote
depends on the
config
argument.
Config.auto()
will do this to try and automatically find the config file, but you can use
Config.for_sandbox()
for a
flytectl sandbox
cluster and
Config.for_endpoint()
for a specific endpoint identified via dns
🙏 1
now that I think of it, not sure if
for_sandbox
will work for a
flytectl demo
-started cluster
@Yee @Eduardo Apolinario (eapolinario) do you know ^^ ?
e

Eduardo Apolinario (eapolinario)

08/22/2022, 6:35 PM
Yes, it should work.
e

Evan Sadler

08/22/2022, 6:38 PM
Awesome and thank you all for the information! I will give it a shot. For context some people are talking about ML Metadata (MLMD) and like tracking metadata. Flyte inherently does this, the question is what surfacing the information looks like and will be pretty straight forward to investigate.
n

Niels Bantilan

08/22/2022, 6:46 PM
Flyte inherently does this, the question is what surfacing the information looks like and will be pretty straight forward to investigate
yes! we’ve been trying to figure out what kinds of utility functions to provide… for example, if we had:
Copy code
remote = FlyteRemote(...)
remote.fetch_executions_with_output_type(sklearn.base.BaseEstimator)
would get all executions with sklearn models as outputs. If you could articulate your different use cases, we’d love to figure out what those utility functions would be!
🤯 1
Flyte is already a versioned data artifact store and model registry, we just don’t have a seamless interface for that… so please do let us know here (or even on a feature request what that interface might look like
👍 1
e

Evan Sadler

08/22/2022, 6:48 PM
That blew my mind. I will talk to @Kenneth Sylvain @Cyrus and see if there are requirements anywhere.
🙏 2
@Niels Bantilan Thanks to your help I can look at executions using python. I was wondering if there was a way to look at the values of inputs and outputs within a workflow? They show up with
remote.fetch_execution
with a task, but I can’t figure out how to look at individual tasks within a workflow.
n

Niels Bantilan

08/22/2022, 9:30 PM
So assuming the execution is a workflow:
Copy code
execution = remote.fetch_execution(...)

# make sure all the nodes are synced
synced_execution = remote.sync(execution, sync_nodes=True)

# get the node execution inputs/outputs
synced_execution.node_executions["n1"].inputs
synced_execution.node_executions["n1"].outputs["model_file"]
https://docs.flyte.org/projects/flytekit/en/latest/design/control_plane.html#retrieving-inspecting-executions The you can get all the node keys with
Copy code
synced_execution.node_executions.keys()
I forget now how the node execution keys are named… but that should allow you to get input/output data from tasks / subworkflow executions
🙌 1
e

Evan Sadler

08/22/2022, 9:36 PM
Exactly what I needed 🙂
26 Views