Skip to content

Commit

Permalink
fix: CUDA Minified Tests following refactoring (#3067)
Browse files Browse the repository at this point in the history
Update test_models_with_minified_data.py with to cpu()
  • Loading branch information
ori-kron-wis authored Dec 4, 2024
1 parent 371b228 commit 034d452
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/model/test_models_with_minified_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,10 @@ def test_validate_supported_if_minified_keep_count():
assert model.minified_data_type == ADATA_MINIFY_TYPE.LATENT_POSTERIOR_WITH_COUNTS
assert model2.minified_data_type is None

assert np.allclose(model2.get_elbo(), model.get_elbo(), rtol=5e-2)
assert np.allclose(model2.get_elbo().cpu(), model.get_elbo().cpu(), rtol=5e-2)
assert np.allclose(
model2.get_reconstruction_error()["reconstruction_loss"],
model.get_reconstruction_error()["reconstruction_loss"],
model2.get_reconstruction_error()["reconstruction_loss"].cpu(),
model.get_reconstruction_error()["reconstruction_loss"].cpu(),
rtol=5e-2,
)
assert np.allclose(model2.get_marginal_ll(), model.get_marginal_ll(), rtol=5e-2)
Expand Down

0 comments on commit 034d452

Please sign in to comment.