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

Check and make sure that metric names is a list of strings #1798

Merged
merged 5 commits into from
Dec 8, 2022

Conversation

dakinggg
Copy link
Contributor

@dakinggg dakinggg commented Dec 7, 2022

What does this PR do?

If you accidentally pass a string to Evaluator for metric_names, you get a semi nasty silent error of not actually filtering your metrics, because _filter_metrics will happily loop over the string you provided. This PR explicitly checks that the input of metric_names is a list.

What issue(s) does this change relate to?

Closes CO-1505

Before submitting

  • Have you read the contributor guidelines?
  • Was this change discussed/approved in a GitHub issue first? It is much more likely to be merged if so.
  • Did you update any related docs and document your change?
  • Did you update any related tests and add any new tests related to your change? (see testing)
  • Did you run the tests locally to make sure they pass?
  • Did you run pre-commit on your change? (see the pre-commit section of prerequisites)

@dakinggg dakinggg marked this pull request as ready for review December 7, 2022 22:52
Copy link
Contributor

@mvpatel2000 mvpatel2000 left a comment

Choose a reason for hiding this comment

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

minor nits

composer/core/evaluator.py Outdated Show resolved Hide resolved
composer/core/evaluator.py Outdated Show resolved Hide resolved
dakinggg and others added 3 commits December 7, 2022 16:35
Co-authored-by: Mihir Patel <mihir.v.patel7@gmail.com>
Co-authored-by: Mihir Patel <mihir.v.patel7@gmail.com>
@dakinggg dakinggg merged commit 8ce7a93 into mosaicml:dev Dec 8, 2022
@dakinggg dakinggg deleted the silen_eval_bug branch December 8, 2022 17:43
bmosaicml pushed a commit to bmosaicml/composer that referenced this pull request Dec 13, 2022
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.

None yet

2 participants