Closed runame closed 5 months ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
curvlinops/kfac.py | 8 | 10 | 80.0% | ||
<!-- | Total: | 9 | 11 | 81.82% | --> |
Totals | |
---|---|
Change from base Build 9488896670: | -0.08% |
Covered Lines: | 1333 |
Relevant Lines: | 1500 |
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
curvlinops/kfac.py | 8 | 10 | 80.0% | ||
<!-- | Total: | 9 | 11 | 81.82% | --> |
Totals | |
---|---|
Change from base Build 9488896670: | -0.08% |
Covered Lines: | 1333 |
Relevant Lines: | 1500 |
Seems like the issue is actually because of a newer version of Python. Your check works in Python 3.8, but fails in Python 3.9 (the default of laplace-torch
).
This works in Python 3.9:
In [5]: [v.value for v in FisherType]
Out[5]: ['type-2', 'mc', 'empirical', 'forward-only']
PS. Python 3.8 will be deprecated soon https://devguide.python.org/versions/.
@wiseodd Have you tried the fix in this PR? I also tested it with Python 3.11 and it worked.
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
curvlinops/kfac.py | 8 | 10 | 80.0% | ||
<!-- | Total: | 9 | 11 | 81.82% | --> |
Totals | |
---|---|
Change from base Build 9488896670: | -0.08% |
Covered Lines: | 1333 |
Relevant Lines: | 1500 |
Fixes #118.
Also, I have added the
FisherType
andKFACType
Enums to__init__
to make them easy to import.