Summary
The user is seeking help with issues related to executing a pyflyte run
command in Python, specifically when using the os or subprocess modules. They suggest that using flyteremote could be an alternative to the API. The user shares a code snippet demonstrating their preferred setup for running pyflyte
, which allows for local and remote execution of a workflow by simply running the Python file.
eric901201
any place
eric901201
you can simply just python file.py
to do it
eric901201
this is my favorite setup for pyflyte run
eric901201
from flytekit.clis.sdk_in_container import pyflyte
from click.testing import CliRunner
import os
runner = CliRunner()
path = os.path.realpath(__file__)
result = runner.invoke(pyflyte.main,
["run", path, "combined_workflow", "--image", "<https://bit.ly/3KZ95q4>"])
print("Local Execution: ", result.output)
result = runner.invoke(pyflyte.main,
["run", "--remote", path, "combined_workflow", "--image", "<https://bit.ly/3KZ95q4>"])
print("Remote Execution: ", result.output)```
kumare
instead of using the api
kumare
what issues? you can also just use flyteremote directly
hassan.m.eng
anyone have issues running a pyflyte run
command from python? os or subprocess?