Skip to content

feat: add VisdomXGBLogger with autolog for xgboost training#1621

Open
Jayantparashar10 wants to merge 11 commits into
fossasia:devfrom
Jayantparashar10:feat/xgboost-logging
Open

feat: add VisdomXGBLogger with autolog for xgboost training#1621
Jayantparashar10 wants to merge 11 commits into
fossasia:devfrom
Jayantparashar10:feat/xgboost-logging

Conversation

@Jayantparashar10

@Jayantparashar10 Jayantparashar10 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description

Adds VisdomXGBLogger, an XGBoost TrainingCallback that plots train/eval metrics to Visdom as boosting progresses, with an autolog() classmethod that patches xgb.train and every XGBModel subclass fit() for zero-config logging.

Motivation and Context

There was no way to visualize XGBoost training runs in Visdom without manually attaching a TrainingCallback and wiring up viz.line() calls yourself. This adds opt-in auto-logging behind a single autolog() call, with no changes required to model, train(), or fit() code

How Has This Been Tested?

Ran example/train_xgboost_example.py covering both the functional xgb.train and sklearn XGBClassifier.fit APIs, xgb.cv tuple-metric case, and repeated autolog() calls, against visdom.server instance.

Screenshots (if appropriate):

Screenshot 2026-07-20 at 11 23 59 PM

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code refactor or cleanup (changes to existing code for improved readability or performance)

Checklist:

  • I adapted the version number under py/visdom/VERSION according to Semantic Versioning
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copilot AI review requested due to automatic review settings July 20, 2026 16:15

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry @Jayantparashar10, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@tonypzy tonypzy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How do you think of adding XGBoost unit tests?

@Jayantparashar10

Copy link
Copy Markdown
Contributor Author

How do you think of adding XGBoost unit tests?

Will make a separate PR for addition of unit test for each loggers.

@Jayantparashar10
Jayantparashar10 requested a review from tonypzy July 21, 2026 22: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.

4 participants