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 loss_average argument of KFACLinearOperator #117

Merged
merged 5 commits into from
Jun 12, 2024
Merged

Conversation

runame
Copy link
Collaborator

@runame runame commented May 29, 2024

Since we added the num_per_example_loss_terms recently, we could remove the loss_average argument. I think there is no use case where it adds any additional benefit, and removing it will simplify the user experience significantly and it avoids user errors -- when the user doesn't pass any value for num_per_example_loss_terms it will still lead to the correct result, there will just be the overhead of one dataset pass.

Moreover, I created Enums for the string valued arguments in KFACLinearOperator (FisherType and KFACType) and added a custom TypeVar for the input/ouput of torch_matmat/torch_matvec to support static type checkers (this was a request by @BrunoKM).

@runame runame added the enhancement New feature or request label May 29, 2024
@runame runame requested a review from f-dangel May 29, 2024 14:12
@runame runame self-assigned this May 29, 2024
@coveralls
Copy link

coveralls commented May 29, 2024

Pull Request Test Coverage Report for Build 9288405107

Details

  • 31 of 31 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 88.948%

Totals Coverage Status
Change from base Build 9214967831: 0.2%
Covered Lines: 1328
Relevant Lines: 1493

💛 - Coveralls

Copy link
Owner

@f-dangel f-dangel left a comment

Choose a reason for hiding this comment

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

LGTM!

@runame runame merged commit 13b1082 into main Jun 12, 2024
13 checks passed
@runame runame deleted the remove-loss-average branch June 12, 2024 19:57
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

Successfully merging this pull request may close these issues.

None yet

3 participants