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

Define metainfo for all DMatrix interfaces. #6601

Merged
merged 1 commit into from Jan 25, 2021

Conversation

trivialfis
Copy link
Member

A small part extracted from #6591 to ease reviewing.

  • Add check for consistency between 4 different DMatrix types. They should share a number of common arguments in constructor with correct ordering.

@trivialfis trivialfis force-pushed the dmatrix-metainfo branch 2 times, most recently from 719dbb3 to b21a3a4 Compare January 12, 2021 13:40
@trivialfis trivialfis requested review from RAMitchell and hcho3 and removed request for RAMitchell January 12, 2021 20:43
@codecov-io
Copy link

codecov-io commented Jan 13, 2021

Codecov Report

Merging #6601 (833f145) into master (f0fd762) will decrease coverage by 1.05%.
The diff coverage is 47.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6601      +/-   ##
==========================================
- Coverage   81.13%   80.08%   -1.06%     
==========================================
  Files          13       13              
  Lines        3679     3675       -4     
==========================================
- Hits         2985     2943      -42     
- Misses        694      732      +38     
Impacted Files Coverage Δ
python-package/xgboost/sklearn.py 89.61% <0.00%> (ø)
python-package/xgboost/data.py 56.81% <33.33%> (-3.31%) ⬇️
python-package/xgboost/core.py 81.06% <50.00%> (-1.59%) ⬇️
python-package/xgboost/dask.py 80.64% <50.00%> (-1.55%) ⬇️
python-package/xgboost/tracker.py 93.98% <0.00%> (-1.13%) ⬇️
python-package/xgboost/training.py 95.37% <0.00%> (+0.04%) ⬆️

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 f0fd762...4884b97. Read the comment docs.

Copy link
Collaborator

@hcho3 hcho3 left a comment

Choose a reason for hiding this comment

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

Please address my comment at #6591 (comment). You should choose between two alternatives:

  1. Break backward compatibility now. This might be reasonable choice if it's necessary to unity Dask and non-Dask interfaces; OR
  2. Don't break backward compatibility now; only add deprecation warning. For this alternative, all new parameters should only be added at the end of each function, not in the middle, to avoid breaking existing code using positional args.

My review below assumes that you've chosen Option 2. Let me know if you want to go with Option 1.

python-package/xgboost/core.py Outdated Show resolved Hide resolved
python-package/xgboost/core.py Outdated Show resolved Hide resolved
@trivialfis
Copy link
Member Author

Please address my comment at #6591 (comment). You should choose between two alternatives:

I will try to avoid breaking the compatibility.

@trivialfis
Copy link
Member Author

@hcho3 I limited the breaking changes to enable_categorical and dask interface.

This PR ensures all DMatrix types have a common interface.

* Check for consistency between DMatrix types.
* Add doc for bounds.
@trivialfis trivialfis merged commit 8942c98 into dmlc:master Jan 25, 2021
@trivialfis trivialfis deleted the dmatrix-metainfo branch January 25, 2021 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants