Skip to content

Conversation

@sply88
Copy link
Contributor

@sply88 sply88 commented May 30, 2023

Towards #22827

I modified the only test in sklearn/utils/tests/test_optimize.py to use the global_random_seed fixture.

Required changes were minimal:
Just replaced the previously fixed seed with global_random_seed and pass the fixture to the test function.

All tests run via

SKLEARN_TESTS_GLOBAL_RANDOM_SEED="all" pytest sklearn/utils/tests/test_optimize.py

pass locally.

The PR only changes a test file, so no addition to the change log required?

test_newton_cg uses global_random_seed fixture
@github-actions
Copy link

github-actions bot commented Jul 1, 2023

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 077d3dc. Link to the linter CI: here

@sply88 sply88 changed the title TST use global_random_seed in sklearn/utils/tests/test_optimize.py [MRG] TST use global_random_seed in sklearn/utils/tests/test_optimize.py Jul 1, 2023
@marenwestermann
Copy link
Member

Hi @sply88 ! Thank you for this PR. I can see that the linter failed but the logs have expired and are not accessible anymore. Could you therefore pull the changes from upstream main again into your feature branch and fix the linting issue?

@sply88
Copy link
Contributor Author

sply88 commented Jun 21, 2024

Hi @marenwestermann. Thank you for having a look at this.

Have included the latest changes from main. The linter passes. Only Check Changelog fails, but I guess there is no need to update the changelog for this PR?

@marenwestermann
Copy link
Member

No, there should be no changelog needed. Can you run the CI for all the random seeds? (See guideline at the top of the issue description and note that you can create an empty commit with git commit --allow-empty.

@sply88 sply88 changed the title [MRG] TST use global_random_seed in sklearn/utils/tests/test_optimize.py TST use global_random_seed in sklearn/utils/tests/test_optimize.py Jul 4, 2024
@adrinjalali
Copy link
Member

CI has failed here @sply88

@adrinjalali
Copy link
Member

@marenwestermann would you like to take over this one?

@sply88
Copy link
Contributor Author

sply88 commented Oct 24, 2024

Sorry for the late reply.

Will close this one as @marenwestermann already fixed the remaining problem with numerical tolerance in #30112.
Thanks for taking over!

@sply88 sply88 closed this Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants