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

Merging XGBoost changes from 2.4 #2712

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

nvidianz
Copy link
Collaborator

Description

Merged all the changes made to XGBoost in 2.4 back to main. This includes the user experience improvement and several bug fixes.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Quick tests passed locally by running ./runtest.sh.
  • In-line docstrings updated.
  • Documentation updated.

Copy link
Collaborator

@YuanTingHsieh YuanTingHsieh left a comment

Choose a reason for hiding this comment

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

mostly good, some places we can enhance, can be this PR or follow up PR

nvflare/app_opt/xgboost/histogram_based_v2/controller.py Outdated Show resolved Hide resolved
@@ -72,11 +71,15 @@ def initialize(self, fl_ctx: FLContext):
if not isinstance(self._metrics_writer, LogWriter):
self.system_panic("writer should be type LogWriter", fl_ctx)

def _xgb_train(self, params: XGBoostParams, train_data: xgb.DMatrix, val_data) -> xgb.core.Booster:
def _xgb_train(self, num_rounds, xgb_params: dict, xgb_options: dict, train_data, val_data) -> xgb.core.Booster:
Copy link
Collaborator

Choose a reason for hiding this comment

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

for all the parameters to be passed into xgb.train method.
suggest either totally pack it as before a custom class call "XGBoostParams"
Or totally unpack it, so this method signature is similar to https://xgboost.readthedocs.io/en/stable/python/python_api.html#xgboost.train and docstring to explain each of the argument meaning.

Randomly group some into xgb_params, some standalone and some other into xgb_options is very confusing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The grouping is very clear. The params (Booster parameters) is passed as its own dictionary, everything else is packed into xgb_options. The params is specifically unpacked due to its importance.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Got it, then suggest either rename to "num_boost_round" or remove this "num_round" argument to be consistent

nvflare/utils/cli_utils.py Show resolved Hide resolved
Copy link
Collaborator

@YuanTingHsieh YuanTingHsieh left a comment

Choose a reason for hiding this comment

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

Thanks, Just one comment.

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