Matheus Moreno
07/20/2022, 8:24 PMFlyteRemote
and not flytectl
, that is. My use case is that I want to develop a Python script that executes the entire deployment process, but I do not want to call subprocesses, since that would require the user to install flytectl
(and some members of our team use Windows!).
I know that FlyteRemote
can register individual tasks and workflows, but is there a way to register an entire package with it?Kevin Su
07/20/2022, 9:57 PMfrom flytekit.clis.sdk_in_container.run import get_entities_in_file, load_naive_entity
import os
dev_dir = "development/workflow/"
for file in os.listdir(dev_dir):
file_name = dev_dir + file
rel_path = os.path.relpath(file_name)
entities = get_entities_in_file(file_name)
for wf in entities.workflows:
module = os.path.splitext(rel_path)[0].replace(os.path.sep, ".")
exe_entity = load_naive_entity(module, wf)
remote.register_workflow(exe_entity)
Eduardo Apolinario (eapolinario)
07/20/2022, 10:06 PMflytectl
as well.Yee
Ketan (kumare3)
Yee
Ketan (kumare3)
Yee
Matheus Moreno
07/21/2022, 1:29 PMregister
command @Yee mentioned. I didn't know about it!Ketan (kumare3)