Skip to content

Commit

Permalink
Updated test tolerances to accomodate MacOS precision.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sm00thix committed Aug 4, 2024
1 parent bedf910 commit 8c42baa
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/test_ikpls.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,8 +963,8 @@ def test_pls_1(self) -> None:
jax_pls_alg_2=jax_pls_alg_2,
diff_jax_pls_alg_1=diff_jax_pls_alg_1,
diff_jax_pls_alg_2=diff_jax_pls_alg_2,
atol=1e-8,
rtol=6e-5,
atol=3e-8,
rtol=2e-4,
)

self.check_predictions(
Expand Down Expand Up @@ -3178,13 +3178,13 @@ def test_fast_cross_val_pls_1(self):
splits = self.load_Y(["split"])
assert Y.shape[1] == 1
self.check_fast_cross_val_pls(
X, Y, splits, center=False, scale=False, atol=0, rtol=2e-8
X, Y, splits, center=False, scale=False, atol=0, rtol=1e-7
)
self.check_fast_cross_val_pls(
X, Y, splits, center=True, scale=False, atol=0, rtol=2e-8
X, Y, splits, center=True, scale=False, atol=0, rtol=1e-7
)
self.check_fast_cross_val_pls(
X, Y, splits, center=True, scale=True, atol=0, rtol=2e-8
X, Y, splits, center=True, scale=True, atol=0, rtol=1e-7
)

# Remove the singleton dimension and check that the predictions are consistent.
Expand Down Expand Up @@ -3243,13 +3243,13 @@ def test_fast_cross_val_pls_2_m_less_k(self):
assert Y.shape[1] > 1
assert Y.shape[1] < X.shape[1]
self.check_fast_cross_val_pls(
X, Y, splits, center=False, scale=False, atol=0, rtol=2e-7
X, Y, splits, center=False, scale=False, atol=0, rtol=1e-6
)
self.check_fast_cross_val_pls(
X, Y, splits, center=True, scale=False, atol=0, rtol=2e-7
X, Y, splits, center=True, scale=False, atol=0, rtol=1e-6
)
self.check_fast_cross_val_pls(
X, Y, splits, center=True, scale=True, atol=0, rtol=2e-7
X, Y, splits, center=True, scale=True, atol=0, rtol=1e-6
)

# JAX will issue a warning if os.fork() is called as JAX is incompatible with
Expand Down Expand Up @@ -3448,13 +3448,13 @@ def test_fast_cross_val_pls_2_m_less_k_loocv(self):
assert Y.shape[1] > 1
assert Y.shape[1] < X.shape[1]
self.check_fast_cross_val_pls(
X, Y, splits, center=False, scale=False, atol=6e-6, rtol=2e-8
X, Y, splits, center=False, scale=False, atol=1e-4, rtol=2e-8
)
self.check_fast_cross_val_pls(
X, Y, splits, center=True, scale=False, atol=6e-6, rtol=2e-8
X, Y, splits, center=True, scale=False, atol=1e-4, rtol=2e-8
)
self.check_fast_cross_val_pls(
X, Y, splits, center=True, scale=True, atol=6e-6, rtol=2e-8
X, Y, splits, center=True, scale=True, atol=1e-4, rtol=2e-8
)

def test_fast_cross_val_pls_2_m_eq_k_loocv(self):
Expand Down

0 comments on commit 8c42baa

Please sign in to comment.