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

Computing train metrics at a given frequency #3411

Open
Ghelfi opened this issue Jun 18, 2024 · 1 comment
Open

Computing train metrics at a given frequency #3411

Ghelfi opened this issue Jun 18, 2024 · 1 comment
Labels
enhancement New (engineering) enhancements, such as features or API changes.

Comments

@Ghelfi
Copy link
Contributor

Ghelfi commented Jun 18, 2024

🚀 Feature Request

Add the possibility to compute metrics on the train dataset with a given frequency and avoid computing these every steps

Motivation

Having the possibility to compute training metrics is great and allow a good control on what is happening at this stage. Some metrics can be quite compute intensive and we might want to compute these on a lower frequency to reduce to compute needed.
This should come with a default behaviour falling back to the current one: evaluating the training metrics for each batch.

Implementation

There is a eval_interval argument for the when to run evaluation and I propose to keep the same logic with a train_metric_interval to decide when to compute training metrics.

Happy to have a look and propose an implementation.

@Ghelfi Ghelfi added the enhancement New (engineering) enhancements, such as features or API changes. label Jun 18, 2024
@mvpatel2000
Copy link
Contributor

Hm... this is a bit tricky since this would affect all metrics...

Two proposed workarounds:

  1. Store metric separately in callback, which easily gives control over frequency
  2. Have code in metric to control frequency and ignore some calls (not ideal)

What do you think of alternatives? Not strongly opposed to proposal, but my regularizer is to avoid adding trainer args as much as possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New (engineering) enhancements, such as features or API changes.
Projects
None yet
Development

No branches or pull requests

2 participants