Skip to content

Commit

Permalink
Minor formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wesselb committed Aug 9, 2024
1 parent 816c37d commit 814af32
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

from aurora import AuroraSmall, Batch, Metadata

torch.use_deterministic_algorithms(True)


class SavedMetadata(TypedDict):
"""Type of metadata of a saved test batch."""
Expand Down Expand Up @@ -101,7 +99,7 @@ def interpolate(v: np.ndarray) -> np.ndarray:
with torch.inference_mode():
pred = model.forward(batch)

def assert_approx_equality(v_out, v_ref, tol) -> None:
def assert_approx_equality(v_out: np.ndarray, v_ref: np.ndarray, tol: float) -> None:
err = np.abs(v_out - v_ref).mean()
mag = np.abs(v_ref).mean()
assert err / mag <= tol
Expand Down

0 comments on commit 814af32

Please sign in to comment.