-
Notifications
You must be signed in to change notification settings - Fork 36
Reproducible Python virtual environment using uv
and nix
#141
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
Conversation
215b718
to
d9a8977
Compare
uv
and nix
0204e2f
to
6f615c0
Compare
7aaa432
to
a53f40c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry, it's difficult for me to have a reasonably good take on this, since I don't use any of that.
My random thoughts:
- this isn't a python project, we're generating basic python bindings, for which in python we're testing only existence of the interfaces with minimal set of dependencies
- do we want to support this? if so, would be nice to know when it would be expected to be updated, considering that any lock files are usually require maintenance and it's always a certain compromise between debugging why CI is passing alright, but user brings you issues with dependencies
- do we want to have all this in the root of the rust repo? maybe there is a way to pack it somehow?
But I wouldn't want to insist on any particular resolution here, we might want to support this specific user group in this project? Or maybe it would make sense to have it consistent with outlines as well? Maybe there are other good angles to look at it.
I agree with @torymur, everything that's related to Python bindings (including tests) should go in the I'm usually not a huge fan of lock files, but it might make sense in this context where the library is imported by other libraries that require stability? But I'm not an expert. |
Lock files are essential to ensure that contributors and CI/CD share the same environment. Otherwise, many reproducibility issues can arise, and I’ve already been struggling with such problems too often since I started contributing to Outlines... I'm very open to discussing alternative technical solutions to For reference, I’m quoting below the argument I previously shared with @torymur:
I also looked a bit on the internet, and most of the top Rust repositories include these types of files:
An alternative approach could be maintaining the I'm happy to split this PR into separate changes for |
You have a much more informed opinion than I do, so your call. The remark on moving everything related to Python to |
Yes, will do! And indeed, I understand that there is always some pushback when introducing a new fancy thing into a repository’s technical stack, as it adds another brick to maintain... So, I want to really emphasize that this is entirely optional and would never be required to work with the library, just like how we also have a Conda |
I closed this newly created issue #170 since it was a duplicate of this #153
Exactly that was done in that branch mentioned in #153, where majority of the work was implemented, but as explained there as well, there are some things which we need to do first. Moving things are relatively easy (though still require code adaptations, but these I consider are for the best, since they separate tied logic), what is challenging, however, and requires a lot of fidgeting is making sure that everything which was moved still works in tests, benchmarks and all of the workflows. To the topic. Rust lock files when Python artifacts being generated has its merit (meaning properly separated code in non-existent yet As for Python lock files in a project that simply generates Python bindings, I'm not fully convinced of these, but what's certain is that #153 work has to be done first |
I'm in favor of this change if we move the python bindings in a |
a53f40c
to
b0a32de
Compare
b0a32de
to
7a3beb7
Compare
This PR tries to achieve the same goal as #1387, but here the system dependencies needed by Cargo are quite straightforward. I might want to improve it later with rust-overlay to make it aware of the
./rust-toolchain
config, or even try to package the whole thing with something like Crane!