Skip to content

#1035: Fix meta-learner random_state handling with check_random_state - #1040

Open
su-jin1425 wants to merge 1 commit into
uber:masterfrom
su-jin1425:fix-issue-1035
Open

#1035: Fix meta-learner random_state handling with check_random_state#1040
su-jin1425 wants to merge 1 commit into
uber:masterfrom
su-jin1425:fix-issue-1035

Conversation

@su-jin1425

Copy link
Copy Markdown
Contributor

Proposed changes

Fixes #1035.

This change normalizes random_state handling in the meta-learner bootstrap paths using scikit-learn's check_random_state.

Specifically:

  • Replace direct np.random.RandomState(...) construction with check_random_state(...).
  • Allow RandomState instances to be passed without raising a TypeError.
  • Update the affected docstrings to reflect the supported random-state types.

The change is limited to the existing random-state handling and does not change the public API behavior for existing integer seeds.

Types of changes

  • Bugfix (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)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Further comments

The reported issue was reproduced on the parent commit: passing a RandomState instance to np.random.RandomState(...) raises a TypeError.

The same input was verified successfully on this commit using check_random_state(...).

The full test suite could not be run locally because the Windows environment blocked a Cython DLL during dependency installation.

Copilot AI balanced review requested due to automatic review settings August 28, 2026 10:52

Copilot AI left a comment

Copy link
Copy Markdown

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.

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.

Normalize meta-learner random_state handling through check_random_state

2 participants