seunggs
06/04/2023, 8:33 PMEvan Sadler
06/05/2023, 12:08 AMseunggs
06/05/2023, 1:56 AMEvan Sadler
06/05/2023, 2:10 AM# preprocess task
return Flytefile(path=“./saved_model.pkl”)
@task
def get_path(ff: FlyteFile) -> str:
# pass to bento ml?
return ff.remote_source
seunggs
06/05/2023, 2:57 AMEvan Sadler
06/05/2023, 3:23 AMseunggs
06/05/2023, 3:26 AMEvan Sadler
06/05/2023, 6:20 PMFlyteRemote
to interact with the inputs and outputs of an execution. This shows how to grab an output of a workflow, but you can get task outputs and more.
from flytekit.remote.remote import FlyteRemote, Config
remote = FlyteRemote(config=Config.auto(config_file="/Users/esad/.uctl/config.yaml"))
execution = remote.fetch_execution(project="flytesnacks",
domain="development",
name="f310698c1752b49759b9")
outputs = execution.outputs # this is basically a dict
outputs.get("o0") # o0 is the name of the first positional output