sparse-window-1536
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?glamorous-carpet-83516
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)
high-accountant-32689
07/20/2022, 10:06 PMflytectl
as well.high-accountant-32689
07/20/2022, 10:07 PMthankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
freezing-airport-6809
freezing-airport-6809
freezing-airport-6809
thankful-minister-83577
thankful-minister-83577
freezing-airport-6809
thankful-minister-83577
thankful-minister-83577
sparse-window-1536
07/21/2022, 1:29 PMregister
command @thankful-minister-83577 mentioned. I didn't know about it!sparse-window-1536
07/21/2022, 1:30 PMfreezing-airport-6809