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

Update MetricWrapper to work with the update/compute from torchmetrics #466

Open
4 tasks
DomInvivo opened this issue Sep 20, 2023 · 0 comments
Open
4 tasks
Labels
enhancement New feature or request

Comments

@DomInvivo
Copy link
Collaborator

DomInvivo commented Sep 20, 2023

Currently, we cannot compute train metrics because it requires to save all the preds and targets over the epoch.
The problem also affects the val and test sets, but since they're smaller, the effect is less noticeable.

To fix this, the MetricWrapper should have an update method taking the preds and target that calls the underlying self.metrics.update, and the compute method which no longer takes in the pred and target, but instead calls the self.metric.compute

  • Add the update to the MetricWrapper
  • Modify the MetricWrapper.compute to work with the update
  • How to deal with missing labels??

Also, all TorchMetrics in spaces.py should become their class equivalent rather than functions.

  • Change the spaces.py to use classes rather than functions. Make sure the classes get initialized.
@DomInvivo DomInvivo added the enhancement New feature or request label Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant