Hey All, I am Lay Patel(<linkedin>), a software en...
# ask-metaflow
b
Hey All, I am Lay Patel(linkedin), a software engineer. I am interested in contributing to Metaflow. I am interested in AI/ML infrastructure, and Metaflow would be a perfect place for it. I already started woking on running Metaflow locally on my laptop. I have an Macbook with M4 chip, I believe it should be compatible to run and test Metaflow. My background is in networking, security and system level development. Although it varies a bit, I am excited to learn and contribute 😄.
v
welcome Lay! meow wave there are many ways how you can contribute for sure happydance are there any particular topics that interest you? E.g infra, AI models, other ML, some new features etc
b
Hey Ville, I am interested in infrastructure, and distributed systems side. I was reading the document, and one thing that came to my mind is AI Agents. Metaflow can become a platform for AI Agents. Each step can act as an independent LLM/agent, working on a particular task, passing on information to the next LLM(step).
c
This is an interesting avenue… could Metaflow make Agentic AI programs easy to author just as it has for traditional ML?
v
yep! One key piece that will be handy in building agentic workflows is support for conditionals, coming soon with this PR For instance, you can build a workflow where an agent decides which branch to execute @bland-garden-80695 if you like, you can test the above PR and give feedback how it works for agentic cases
b
@victorious-lawyer-58417 sure will give it a try. Looking at the PR, I have a very basic question. In the tutorial,
Copy code
self.next()
is used to create flow and jump from a function to other. In the PR core/tests folder
Copy code
@steps(index, ['some-function'], required=true)
is used to create flows and
Copy code
self.next()
is missing. Can you explain whats the difference between the two? I couldn't find a document on the later.
v
right, that's special syntax only to auto-generate tests. The syntax for conditionals is
Copy code
self.next({'a': self.hello, 'b': self.end}, condition='my_artifact')
in this case, execution will proceed to a step
hello
if
my_artifact == 'a'
or if
my_artifact == 'b'
, it'll go to
end
b
Got it, thanks!
@victorious-lawyer-58417, are you planning to merge the PR soon, or shall I take the fork of your repo and test it? Will be working on it tomorrow.
1. I was able to test the PR(condition support) with AI Agent. Given a prompts, its choose different next step, as per Agent's response. 2. One issue I faced while testing was, when I tried
Copy code
from metaflow import FlowSpec
it pointed to the path to python package, rather than the local version. This was my first time working on a local clone of a python package. I had to uninstall and re-install the editable version. It might be good to add this to the contribution guideline for first timers like me. 3. I believe the example I created to test AI agent with condition, can be added to tutorial folder, showcasing metaflow's use-case for AI Agent workflow. I am using local ollama 3.2 for testing, so no API key required. It mitigates the risk of keys being leaked.
v
great! Regarding (2) - I just have different versions of Metaflow with various PRs checked out in separate directories and then I point
PYTHONPATH
at the version I want to use. No need to
pip install -e .
or use virtual environment event. Either approach should work
@brainy-truck-72938 has been working on supporting looping in addition to conditionals. Take a look at his PR here. With looping and conditionals you could test a reasoning agent that keeps "thinking" until it has reached a solution and then choose which step to execute next
b
sure, will give it a try.
🙌 1