Skip to content

BUG: Fix bug in tests for fairlearn + 1 more test#313

Merged
adrinjalali merged 1 commit intoskops-dev:mainfrom
BenjaminBossan:bug-fairlearn-tests-after-card-refactor
Mar 7, 2023
Merged

BUG: Fix bug in tests for fairlearn + 1 more test#313
adrinjalali merged 1 commit intoskops-dev:mainfrom
BenjaminBossan:bug-fairlearn-tests-after-card-refactor

Conversation

@BenjaminBossan
Copy link
Copy Markdown
Collaborator

@BenjaminBossan BenjaminBossan commented Mar 7, 2023

We merged #298 and #310 shortly after each other but they contained an incompatibility that broke the fairlearn tests (the code itself was fine). This PR fixes this incompatibility.

To be clear, the only change needed to fix the tests is the following:

- actual_table = card.select("Metric Frame Table").content.format()
+ actual_table = card.select("Metric Frame Table").format()

On top, I added the description argument to add_fairlearn_metric_frame, to be consistent with all the other methods (also changed in #310), and I also added as a test for it. Since we now have 2 tests, I moved the metric_frame variable to a fixture.

Finally, 2 small fixes:

  • Added type annotation to transpose argument
  • Changed order of arguments in docstring to match order in signature

We merged skops-dev#298 and skops-dev#310 shortly after each other but they contained an
incompatibility that broke the fairlearn tests (the code itself was
fine). This PR fixes this incompatibility.

On top, I added the description argument to add_fairlearn_metric_frame,
to be consistent with all the other methods, and also as a test for it.

Finally, 2 small fixes:

- Added type annotation to transpose argument
- Changed order of arguments in docstring to match order in signature
@BenjaminBossan BenjaminBossan added the bug Something isn't working label Mar 7, 2023
@BenjaminBossan BenjaminBossan changed the title Fix bug in tests for fairlearn + 1 more test BUG: Fix bug in tests for fairlearn + 1 more test Mar 7, 2023
@BenjaminBossan
Copy link
Copy Markdown
Collaborator Author

Ready for review @skops-dev/maintainers

Copy link
Copy Markdown
Member

@adrinjalali adrinjalali left a comment

Choose a reason for hiding this comment

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

Thanks!

@adrinjalali adrinjalali merged commit eabc3bf into skops-dev:main Mar 7, 2023
@BenjaminBossan BenjaminBossan deleted the bug-fairlearn-tests-after-card-refactor branch March 7, 2023 12:52
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

None yet

Development

Successfully merging this pull request may close these issues.

2 participants