Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions emerging_optimizers/utils/eig.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def eig_orthogonal_iteration(
Q = approx_eigenvectors
approx_eigvals = conjugate(x, Q, diag=True)
iteration = 0
sorted_approx_eigvals: Tensor = approx_eigvals
while iteration < max_iterations and not met_approx_eigvals_criteria(x, approx_eigvals, tolerance):
power_iteration = x @ Q
Q = torch.linalg.qr(power_iteration).Q
Expand Down
25 changes: 25 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[mypy]
cache_dir = .mypy_cache/normal
allow_redefinition = True
warn_unused_configs = True
warn_redundant_casts = True
show_error_codes = True
show_column_numbers = True
check_untyped_defs = True
disallow_untyped_defs = True
disallow_untyped_decorators = True
follow_imports = normal
local_partial_types = True
enable_error_code = possibly-undefined

# do not reenable this:
# https://github.com/pytorch/pytorch/pull/60006#issuecomment-866130657
warn_unused_ignores = False

ignore_missing_imports = True

files =
emerging_optimizers,


exclude = ^docs