https://www.boundaryml.com logo
🟡 Using BAML in a Python packaging scenario with ...
# questions
n
I'm trying to figure out what's the right way to use BAML in this python packaging situation. Say there's repo A that contains a bunch of NLP features where we're building using BAML, and repo B that contains data pipelines which use some features from repo A, so repo B imports repo A. Does this mean I need to commit
baml_client
to repo A or is there a way to generate the BAML in the build process...?
b
You can generate the client in the build process!
If you run
uv run baml-cli generate --from [path/to/baml_src]
during your build process this will work
v
That should work in 99% of cases, but in the off chance you are doing something odd with your release pipeline or something doesn't just work, could you share how are you releasing repo A so its useable by repo B? Is it that every user has a local clone of repo A the point to? do you have a private python package you publish to an internal package registry?
n
Yes we're doing a private python package on internal registry, for now I've been committing baml_client but I want to be able to remove that. I think what sam sent will work
v
That is the way!