-
Notifications
You must be signed in to change notification settings - Fork 31
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
Remove pynvml
module and convert to a "meta package"
#57
Remove pynvml
module and convert to a "meta package"
#57
Conversation
NOTE: When I install this package, I cannot query the version of @jakirkham - Does this general approach seem reasonable? Also, if we start depending on |
Think we are using Versioneer here. We would want to follow these steps as if we were configuring versioneer from scratch It is possible we will still need to cleanup some files after We may want to consider devendoring Versioneer, but that can be follow on work Generally this seems like a reasonable approach. Think the version constraint on In terms of reworking things in conda-forge, yes we will want to fix lines that you have indicated in Likely we will also want a repodata patch to fix old versions to work as well. Would want to check with Lawrence since he knows which versions have the bug fixes we need |
I think I already did this back in August (maybe?). Was this in response to my question about |
Update: I removed versioneer to simplify the repo a bit. I also made some small test changes. However, there is still one failing test (Cause is the NVML_P2P_CAPS_INDEX_READ problem reported in this dev forum). |
pynvml
module and convert to a "meta package"pynvml
module and convert to a "meta package"
Yes
Removing versioneer may have helped with this problem |
Unfortunately not, because the problem is in nvidia-ml-py |
Should we go ahead and convert this to |
Co-authored-by: jakirkham <[email protected]>
Co-authored-by: jakirkham <[email protected]>
@jakirkham - Would this be easy to you to contribute? I don't personally deal much with build/packaging details, so I'd need to learn a bit about toml files first :) |
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.
Thanks Rick! 🙏
Had some feedback on the changes so far
pytest>=3.6,<7.0 | ||
pytest-runner | ||
pytest-cov |
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.
Think we should still capture these somewhere as they are used for testing
here = path.abspath(path.dirname(__file__)) | ||
|
||
# Get the long description from the README file | ||
with open(path.join(here, 'README.md'), encoding='utf-8') as f: | ||
long_description = f.read() | ||
|
||
setup(name='pynvml', | ||
version=versioneer.get_version(), | ||
cmdclass=versioneer.get_cmdclass(), | ||
python_requires='>=3.6', |
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.
Think it is unwise to drop this minimum. It is unlikely their code works on anything older than Python 3.6 (possibly it even needs a newer version). The code we still ship at least needs Python 3.6 (possibly newer depending on what we test with)
setup.py
Outdated
@@ -2,18 +2,15 @@ | |||
from os import path | |||
from io import open | |||
|
|||
import versioneer | |||
|
|||
here = path.abspath(path.dirname(__file__)) | |||
|
|||
# Get the long description from the README file | |||
with open(path.join(here, 'README.md'), encoding='utf-8') as f: | |||
long_description = f.read() | |||
|
|||
setup(name='pynvml', |
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.
Given the simplicity of this code, think we can move this to a pyproject.toml
, which will simplify and deduplicate dependency handling, metadata (like the README), etc.
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.
Okay, I gave it a go. My knowledge in this area is limited, so feel free to suggest/push changes.
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.
Thanks Rick! 🙏
Generally this looks good. Had a few suggestions below
requirements.txt
Outdated
pip>=9.0.1 | ||
pytest>=3.6,<7.0 | ||
pytest>=3.6 | ||
pytest-runner | ||
pytest-cov | ||
nvidia-ml-py>=12.0.0,<13.0.0a0 |
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.
As this is now in the test
requirements in pyproject.toml
, think we can drop this
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.
Is the suggestion to drop the requirements.txt
file altogether? That seems fine to me. I only left it because it is used in the Dockerfile (though I don't personally know if anyone is using that).
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.
Update: I removed requirements.txt
now that the Dockerfile doesn't need it.
docker/Dockerfile
Outdated
pip install --no-cache-dir -r /app/requirements.txt && \ | ||
rm -rf ~/.cache/pip | ||
|
||
ADD ./pynvml /app/pynvml | ||
ADD ./setup.py /app/ | ||
ADD ./setup.cfg /app/ | ||
ADD ./pynvml_utils /app/pynvml_utils | ||
ADD ./README.md /app/ | ||
ADD ./PKG-INFO /app/ | ||
ADD ./MANIFEST.in /app/ | ||
ADD ./help_query_gpu.txt /app/ | ||
ADD docker/entrypoint.sh /docker-entrypoint.sh |
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.
Think we can consolidate this to one ADD
of the whole directory and then use pip install .
Alternatively this might be a good time to clean this up if it is unneeded
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.
Okay, gave this a try.
Co-authored-by: jakirkham <[email protected]>
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.
Thanks Rick! 🙏
Think this is pretty close to done
Had a few cleanup suggestions below
Co-authored-by: jakirkham <[email protected]>
Thanks Rick! 🙏 This looks reasonable to me @kenhester could you please take a look as well? |
Note: Ken confirmed offline that we are good to move forward with this. |
TODO: