Skip to content

Conversation

@flinder
Copy link
Contributor

@flinder flinder commented Jan 7, 2026

Summary:

  • Add missing docstring to public data class ParameterConfig
  • Add :returns: documentation tune_mcgrad_parameters
  • Add minimal explanation to internal helper _suppress_logger

Differential Revision: D90260538

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 7, 2026
@meta-codesync
Copy link

meta-codesync bot commented Jan 7, 2026

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

Summary:

Applied the following code quality fixes:

### `tuning.py`

1. **Wrapped long comment** (line 101) - Split the 121-char comment into two lines for readability
2. **Replaced `assert` with proper exception** (line 166) - Changed `assert df_val is not None` to `raise ValueError(...)` for proper runtime validation instead of debug assertions
3. **Converted string concatenation to f-string** (line 221) - Changed `"lightgbm_autotuning" + str(uuid.uuid4())[:8]` to `f"lightgbm_autotuning_{uuid.uuid4().hex[:8]}"`

### `test_tuning.py`

1. **Fixed PascalCase variable** - `BoTorch_count` → `botorch_count` (Google style: snake_case for variables)
2. **Converted `.format()` to f-strings** - Updated 3 assertion messages to use f-strings
3. **Fixed data slice bug** - Changed `sample_data.iloc[:80]` to `sample_data.iloc[:40]` (the fixture only has 50 samples, so `[:80]` was incorrectly returning all rows instead of an 80/20 split)

Reviewed By: TaXxER

Differential Revision: D90259815
Summary:

* Add missing docstring to public data class `ParameterConfig`
* Add :returns: documentation `tune_mcgrad_parameters`
* Add minimal explanation to internal helper `_suppress_logger`

Reviewed By: TaXxER

Differential Revision: D90260538
@meta-codesync
Copy link

meta-codesync bot commented Jan 8, 2026

This pull request has been merged in aed9f16.

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