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

FIX: Set random state in classification test #306

Merged
merged 9 commits into from
Jul 5, 2023

Conversation

thibaultcordier
Copy link
Collaborator

@thibaultcordier thibaultcordier commented May 5, 2023

Description

Set the random state of a classification test (this test sometimes leads to coverage failure).

Fixes #307

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the contributing guidelines
  • I have updated the HISTORY.rst and AUTHORS.rst files
  • Linting passes successfully : make lint
  • Typing passes successfully : make type-check
  • Unit tests pass successfully : make tests
  • Coverage is 100% : make coverage
  • Documentation builds successfully : make doc

@thibaultcordier thibaultcordier added the bug Something isn't working label May 5, 2023
@thibaultcordier thibaultcordier added this to In progress in Developments via automation May 5, 2023
@thibaultcordier thibaultcordier self-assigned this May 5, 2023
@codecov-commenter
Copy link

codecov-commenter commented May 5, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (b99bb8c) 100.00% compared to head (c383f52) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #306   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           32        32           
  Lines         3523      3524    +1     
  Branches       364       364           
=========================================
+ Hits          3523      3524    +1     
Impacted Files Coverage Δ
mapie/tests/test_classification.py 100.00% <100.00%> (ø)
mapie/tests/test_multi_label_classification.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@thibaultcordier thibaultcordier marked this pull request as ready for review May 5, 2023 10:40
Developments automation moved this from In progress to Review approved Jun 7, 2023
Copy link
Collaborator

@vincentblot28 vincentblot28 left a comment

Choose a reason for hiding this comment

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

Add this change to the History.rst

Copy link
Collaborator

@LacombeLouis LacombeLouis left a comment

Choose a reason for hiding this comment

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

Good. I think it would be best to set the variable random_state = 42 and then use that variable every time. But this fixes the quick issue.

@thibaultcordier thibaultcordier merged commit 1861c8c into master Jul 5, 2023
11 checks passed
Developments automation moved this from Review approved to Done Jul 5, 2023
@thibaultcordier thibaultcordier deleted the thibaultcordier-patch-test_classification branch July 5, 2023 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging this pull request may close these issues.

[BUG] Random state is not defined in the classification test
4 participants