-
Notifications
You must be signed in to change notification settings - Fork 50
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
Simplified pip env setup #27
Conversation
Better solution proposed here by @leifdenby : https://docs.google.com/document/d/1csgMjyuE1Up2m262e-N7qMPmNJ-zHLguGyrgvnjTuBE/edit |
@leifdenby I added you as a reviewer here, so that you can take what is useful from this PR but then please implement the more robust variant without requirements.txt file mentioned above. You can either use this branch or supercede this PR after your work is complete. I will give you access to the MeteoSwiss fork, since that is where this PR-branch lives. |
I agree that moving dependencies from I agree that requirements handling can be somewhat tedious, but I don't think the project is at a stage that this is a problem yet. |
pyproj>=3.4.1 | ||
tueplots>=0.0.8 | ||
plotly>=5.15.0 | ||
torch>=2.0.1 | ||
--find-links https://data.pyg.org/whl/torch-${TORCH}.html |
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.
@sadamov I don't quite understand how this is supposed to work if CUDA isn't installed. Doesn't this method require that the TORCH
environment variable is set? Or is it just that if TORCH
isn't set that pip fill try to fetch a page that doesn't exist and then will default to the cpu version available on pypi?
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 think you are right Leif, this doesn't work on CPU only on GPU. I must have gotten confused, because I always install pytorch with conda beforehand (then it works, but --find-links is then useless). Short answer, my solution sucks and we should find a working solution for the soon-to-be packaged repo. Did you already find a way to install torch with pip that is both flexible and robust enough across various machines?
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.
Ah I see :) ok, thanks for the clarification. I will think about this a bit more and give a proposition
Yes, I agree adding another tool isn't something we should just do for the sake of it, and I think we can actually make it optional. By this I mean that the package dependencies will be defined in For someone not using
I like using a package manager like pdm (other options are pipenv, poetry, uv) because it makes the development process easier by 1) automatically updating package versions in So with
|
Thanks for clarifying and outlining that Leif. I think that all sounds good, and the actual change is just to move dependencies to Will see what I end up doing myself going forward. The |
Can we close this if it is fully superseded by #37 ? |
Superceded by #37 |
This PR simplifies the project setup and updates the requirements file to ensure compatibility and ease of installation. The following changes have been made:
Updated requirements.txt:
Updated README.md:
This should simplify the installation of the environment. The installation is now fully flexible without pinned deps. For papers and such, pinned envs can still be exported of course.