Skip to content

Conversation

@flinder
Copy link
Contributor

@flinder flinder commented Dec 22, 2025

Summary:
Renamed MCBoost -> MCGrad for the implementation to be open sourced

Created two subclasses for MCBoost and RegressionMCBoost for backward compatibility.

Differential Revision: D89670100

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Dec 22, 2025
@meta-codesync
Copy link

meta-codesync bot commented Dec 22, 2025

@flinder has exported this pull request. If you are a Meta employee, you can view the originating Diff in D89670100.

@flinder flinder force-pushed the export-D89670100 branch 14 times, most recently from 954da48 to 6b4e8f1 Compare January 5, 2026 19:26
Summary:

This slipped our tests on Github because we don't have unittests for `plot_learning_curve`. Adding some basic tests here to close the coverage gap.

Reviewed By: TaXxER, Lorenzo-Perini

Differential Revision: D90111397
Summary:

Renamed MCBoost -> MCGrad for the implementation to be open sourced.

**Core Changes (methods.py):**
- Renamed classes: `MCBoost` → `MCGrad`, `RegressionMCBoost` → `RegressionMCGrad`
- Renamed base class: `BaseMCBoost` → `BaseMCGrad`
- Renamed data class: `MCBoostProcessedData` → `MCGradProcessedData`
- Created backward-compatible subclasses `MCBoost` and `RegressionMCBoost` (inheriting from MCGrad) for internal use
- Changed `_check_predictions` and `_check_labels` from `staticmethod` to instance methods to support dynamic class names via `self.__class__.__name__`
- Updated all docstrings, log messages, and error messages to use new class names. Where possible I used the dynamic name. **Where this wasn't possible (docstrings) I default to "MCGrad", favoring consistency in the open source version**

**Plotting Changes (plotting.py):**
- Renamed `plot_learning_curve` parameter: `mcboost_model` → `mcgrad_model`
- Updated all internal variable references from `mcboost_model` to `mcgrad_model`

**Tuning Changes (tuning.py):**
- Renamed function: `tune_mcboost_params` → `tune_mcgrad_params`
- Added backward-compatible alias: `tune_mcboost_params = tune_mcgrad_params`

**Transformer Changes (mcboost_transformer.py):**
- Updated abstract property type hints: `type[methods.BaseMCBoost]` → `type[methods.BaseMCGrad]`
- Updated related comments referencing the abstract return type

**Test Changes (test_methods.py, test_metrics.py):**
- Updated all test parametrization to use `MCGrad`/`RegressionMCGrad`
- Renamed test functions from `test_mcboost_*` → `test_mcgrad_*`
- Updated comments referencing MCBoost to MCGrad
- Updated isinstance checks to use `BaseMCGrad`

Reviewed By: TaXxER

Differential Revision: D89670100
@meta-codesync
Copy link

meta-codesync bot commented Jan 5, 2026

This pull request has been merged in 58cc162.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants