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

[Breaking] Add global versioning. #4936

Merged
merged 12 commits into from
Oct 23, 2019
Merged

[Breaking] Add global versioning. #4936

merged 12 commits into from
Oct 23, 2019

Conversation

trivialfis
Copy link
Member

@trivialfis trivialfis commented Oct 12, 2019

  • Generate c and Python version file with CMake.

The generated file is written into source tree. But unless XGBoost updates
its version, there will be no actual modification. This retains compatibility
with Makefiles for R.

  • Add XGBoost version to the DMatrix binaries.
  • Export a C function for storing version.

Small part of #4732 , tidied up.

* Generate c and Python version file with CMake.

The generated file is written into source tree.  But unless XGBoost upgrades
its version, there will be no actual modification.  This retains compatibility
with Makefiles for R.

* Add XGBoost version the DMatrix binaries.
@trivialfis trivialfis requested a review from RAMitchell October 12, 2019 11:07
@trivialfis trivialfis changed the title Add version to CMake config files. Add global versioning. Oct 12, 2019
@trivialfis
Copy link
Member Author

trivialfis commented Oct 12, 2019

Hi @trams . This is a small portion of JSON PR with cleaned up code for handling version. It will also benefit your c++ code base mentioned in #4895 (comment) . Would you like to take a look?

@codecov-io
Copy link

codecov-io commented Oct 13, 2019

Codecov Report

Merging #4936 into master will decrease coverage by 0.21%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4936      +/-   ##
==========================================
- Coverage   71.27%   71.05%   -0.22%     
==========================================
  Files          11       11              
  Lines        2294     2301       +7     
==========================================
  Hits         1635     1635              
- Misses        659      666       +7
Impacted Files Coverage Δ
python-package/xgboost/dask.py 18.5% <0%> (-0.48%) ⬇️
python-package/xgboost/sklearn.py 86.97% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bbf062...4076d89. Read the comment docs.

Copy link
Member

@RAMitchell RAMitchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this PR breaks compatibility for DMatrix serialisation? We might have to have some wider discussions about how this transition is going to occur. I assume you will gradually phase out the old serialisation for classes in parts.

src/data/data.cc Show resolved Hide resolved
src/data/data.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@trams trams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I would just fix the issue with binary file header ("version: ")

cmake/build_config.h.in Outdated Show resolved Hide resolved
src/c_api/c_api.cc Outdated Show resolved Hide resolved
src/common/version.cc Outdated Show resolved Hide resolved
@trivialfis trivialfis changed the title Add global versioning. [Breaking] Add global versioning. Oct 16, 2019
@trivialfis
Copy link
Member Author

@hcho3 It's a breaking change. Could you please take a look when time allows? This uses XGBoost version for DMatrix instead of its own version. I believe the breakage is a net gain in the future. WDYT?

@hcho3
Copy link
Collaborator

hcho3 commented Oct 17, 2019

@trivialfis I will review this as time allows. One request: Since we are breaking backward compatibility, can we modify MetaInfo to add extra_float_info_ and extra_uint_info_ in this PR, as in https://github.com/dmlc/xgboost/pull/4763/files#diff-95d8126e28130173959c24f455e01a05? This will make MetaInfo more flexible and make changes to it less necessary in the future. Also my recent work in #4763 uses it. If you are okay with it, I will modify this PR to add extra_float_info_ and extra_uint_info_.

cc @RAMitchell

@trivialfis
Copy link
Member Author

@hcho3 Can we have something more concrete than extra ?

@trivialfis
Copy link
Member Author

It shouldn't be too difficult to add new fields in the future. After all we are just appending to the end of binary, newer version can try reading at the end see if the new field is there. We only break things when removing something, and adding stuffs in the middle.

@hcho3
Copy link
Collaborator

hcho3 commented Oct 17, 2019 via email

@trivialfis
Copy link
Member Author

trivialfis commented Oct 17, 2019 via email

@trivialfis
Copy link
Member Author

@hcho3 Added an issue #4956

@hcho3
Copy link
Collaborator

hcho3 commented Oct 17, 2019 via email

@hcho3
Copy link
Collaborator

hcho3 commented Oct 22, 2019

@trivialfis I simplified the logic for detecting prefetch intrinsics. Can you take a look and see if the change is reasonable?

@trivialfis
Copy link
Member Author

Looks nice. Thanks for cleaning it up.

@hcho3
Copy link
Collaborator

hcho3 commented Oct 22, 2019

@trivialfis I'll submit a follow-up PR to implement new binary DMatrix format, after this PR is merged.

@trivialfis trivialfis merged commit 5620322 into dmlc:master Oct 23, 2019
@trivialfis trivialfis deleted the version branch October 23, 2019 03:27
@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants