Questions for those using Metaflow with `uv` and V...
# ask-metaflow
l
Questions for those using Metaflow with
uv
and VS Code (or cursor) 1. I want autocompletion in my editor. Do I maintain a separate
pyproject.toml
as well as specify dependencies in
@pypi_base
and
@pypi
? How do you keep those in sync conveniently? a. (also see the screenshot, you get this
uv
warning when you use uv and already have a venv active... which is what happens when you select a Python interpreter) 2. I like doing
uv add <pkg>
, it figures out a version to install, and installs it (then locks it). What if I want to add a package to
@pypi[_base]
but don't know the version I want yet. Is there a convenient way to update it, like
uv add <pkg>
? 3. Doing
pip install --upgrade <pkg>
(or running
uv add <pkg>
for the 2nd time) will update a version of a package--either to the latest or to the version specified. Is there a convenient way to do that to bump package versions in a flow? In general, updating package versions every now and then is a good thing (security patches, performance enhancements, etc.). Those apply in ML/DS/AI pipelines, too. You just want to be in control of when the updates happen. Besides these, any other tips for using
uv
and Metaflow together?
1
s
we are working on a native
uv
integration that will use the lock file managed by
uv
instead of manually configuring
@pypi
etc. - that would help with 1, 2 and 3
🙌 2
🔥 1
l
WHAAAAAT
That's kind of what I was asking for without asking
You guys rock
cc: @bored-vr-66208
a
haha 🙂
uv
has improved significantly over the past few weeks where many guarantees that we look to provide now seem to be available
b
this is exciting @square-wire-39606! 🙂
f
👍
f
👍