Skip to content

Commit

Permalink
Backport PR #3067 on branch 1.2.x (fix: CUDA Minified Tests following…
Browse files Browse the repository at this point in the history
… refactoring) (#3068)

Backport PR #3067: fix: CUDA Minified Tests following refactoring

Co-authored-by: Ori Kronfeld <[email protected]>
  • Loading branch information
meeseeksmachine and ori-kron-wis authored Dec 4, 2024
1 parent 51deee4 commit d510f0d
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 d510f0d

Please sign in to comment.