-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
[doc] Document the categories container, remove JSON schema. #11788
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
Conversation
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.
Pull Request Overview
This PR enhances documentation for XGBoost's JSON serialization format and improves code documentation. The changes focus on explaining the category encoding mechanism introduced in version 3.1 and reorganizing schema documentation.
- Updated documentation comment style in json.h header with stability note
- Added comprehensive documentation for the categories JSON format including feature_segments, sorted_idx, and encoding schemas
- Refactored JSON schema documentation into a separate file with cross-references
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| include/xgboost/json.h | Updated ValueKind enum documentation to use Doxygen format and added stability note |
| doc/tutorials/saving_model.rst | Added table of contents, new Categories section explaining serialization format, and replaced inline schema with document reference |
| doc/model_schema.rst | New file created to hold JSON model schema content previously embedded inline |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
hcho3
left a comment
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.
Can you update model.schema to include the cats field?
Do you use it? |
|
No, but other users may decide to use the JSON schema file. |
For context, I'm inclined to remove it. |
|
Feel free to remove it |
|
Removed. |
I haven't included the category container in the JSON schema yet. Looking back, the schema doesn't seem to be particularly useful.
Ref: dmlc/treelite#639