-
Notifications
You must be signed in to change notification settings - Fork 788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question on Executing Metaflow Workflow from Python Script Without 'run' Argument #1838
Comments
May I ask for your use case specifically. Not exactly what you are asking for but we will soon have a runner (ie: able to run in python) but Metaflow will handle the running itself. It should be equivalent to what you are trying to do here (unless you want to do funky things between steps). See here: #1732. This should be out soon. |
Thank you for your response and the ongoing developments in Metaflow. My main objective is to simplify the execution of Metaflow workflows, transitioning from the traditional command python train.py run to simply python train.py. This adjustment would enhance the usability and integration of Metaflow within our automation scripts and larger application ecosystem. Here is how I am currently setting up the workflow to achieve this:
By including ExampleFlow().run() in the if name == 'main': block, the workflow initiates directly when the script is executed with python train.py. This setup works for our basic workflows, and I am curious to know if this method aligns with best practices within the Metaflow framework. |
@sungreong would you be able to use the functionality called out in this blog - https://outerbounds.com/blog/metaflow-in-notebooks-and-scripts |
@sungreong, please feel free to reopen this issue if you have further questions or comments |
Hello Metaflow Team,
I am exploring ways to automate Metaflow workflows and have a query regarding the initial execution of these workflows via a Python script. Specifically, I'm interested in whether it is possible to execute a Metaflow workflow directly from a script without explicitly using the run argument for the first time.
Could you provide guidance or confirm if there's a recommended approach for initializing and running workflows programmatically without the run command? Any insights on setting up the environment or script adjustments to handle this use case would be greatly appreciated.
Thank you for your assistance!
The text was updated successfully, but these errors were encountered: