Skip to content
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

[FEA] Ability to obtain the version number from Python and C++. #663

Closed
hcho3 opened this issue Dec 16, 2020 · 2 comments · Fixed by #666
Closed

[FEA] Ability to obtain the version number from Python and C++. #663

hcho3 opened this issue Dec 16, 2020 · 2 comments · Fixed by #666
Assignees
Labels
feature request New feature or request Python Related to RMM Python API

Comments

@hcho3
Copy link
Contributor

hcho3 commented Dec 16, 2020

#647 made a breaking change that affects downstream packages such as XGBoost (dmlc/xgboost#6510). Currently, there is no way to reliably obtain the version string in Python or C++. As RMM is used in more downstream packages, the ability to detect version and account for breaking changes will be critically important.

Proposal:

  • Add a C++ macro to obtain the major / minor version of RMM. For example:
#define RAPIDSAI_RMM_VER_MAJOR 0
#define RAPIDSAI_RMM_VER_MINOR 18

The version macros can be configured as part of the CMake build. See this example from XGBoost.

  • Add the top-level module attribute __version__ in the Python package. For example:
>>> rmm.__version__
'0.18'
@hcho3
Copy link
Contributor Author

hcho3 commented Dec 16, 2020

I will try to put together a proof-of-concept PR for this request, modeling after how XGBoost manages the version string.

@harrism
Copy link
Member

harrism commented Dec 16, 2020

Thanks @hcho3 ! This is a good suggestion. We should also consider the approach and naming desireable across other RAPIDS libraries so we can be consistent. CC @kkraus14 @JohnZed @BradReesWork @mike-wendt

@harrism harrism removed this from Needs prioritizing in Feature Planning Dec 16, 2020
@harrism harrism added this to Issue-Needs prioritizing in v0.18 Release via automation Dec 16, 2020
@harrism harrism added Python Related to RMM Python API and removed ? - Needs Triage Need team to review and classify labels Dec 16, 2020
@harrism harrism moved this from Issue-Needs prioritizing to Issue-P0 in v0.18 Release Dec 16, 2020
@rapids-bot rapids-bot bot closed this as completed in #666 Jan 26, 2021
v0.18 Release automation moved this from Issue-P0 to Done Jan 26, 2021
rapids-bot bot pushed a commit that referenced this issue Jan 26, 2021
Closes #663

Depends on #665

* Expose C++ macros `RMM_VER_MAJOR` and `RMM_VER_MINOR` to encode the major and minor versions of RMM. This is useful for downstream packages that links with RMM in the C++ layer.
* Expose the version string via `rmm.__version__`, to follow a widely-recognized convention for accessing version of Python modules.

Authors:
  - Philip Hyunsu Cho (@hcho3)

Approvers:
  - Ashwin Srinath (@shwina)
  - @jakirkham
  - Keith Kraus (@kkraus14)
  - Mark Harris (@harrism)

URL: #666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request Python Related to RMM Python API
Projects
No open projects
v0.18 Release
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants