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

Remove speed metrics from default compute objective [WIP] #10107

Merged
merged 1 commit into from Feb 10, 2021

Conversation

shiva-z
Copy link
Contributor

@shiva-z shiva-z commented Feb 9, 2021

What does this PR do?

This PR removes speed metrics (e.g. eval_runtime) from the default compute objective (default_compute_objective). default_compute_objective is used when no compute_objective is passed to Trainer.hyperparameter_search. Trainer adds speed metrics such as eval_runtime and eval_samples_per_second to the metrics and default_compute_objective returns the sum of metrics as the objective so these speed metrics will be included in the objective.

I still need to add unit test for default_compute_objective to avoid having such metrics in the objective in the future.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

@sgugger

@sgugger
Copy link
Collaborator

sgugger commented Feb 9, 2021

Oh boy, that is rather bad! Thanks a lot for fixing this!
Did you want to add the test in this PR?

@shiva-z
Copy link
Contributor Author

shiva-z commented Feb 9, 2021

Oh boy, that is rather bad! Thanks a lot for fixing this!
Did you want to add the test in this PR?

I can also create a follow up PR if you want to merge this asap. I can't implement the test cases right away. Maybe in ~4 days. @sgugger

@sgugger
Copy link
Collaborator

sgugger commented Feb 10, 2021

In that case maybe a follow-up PR, this fix is needed badly so I will merge. Thanks again!

@sgugger sgugger merged commit 85395e4 into huggingface:master Feb 10, 2021
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