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
2 changes: 1 addition & 1 deletion src/emcal/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ def plot_gp_fit(
z,
levels=cbar_ticks,
# tick_positions=nticks,
cmap=plt.cm.get_cmap(self.cmap),
cmap=plt.colormaps[self.cmap],
norm=norm,
)

Expand Down
2 changes: 2 additions & 0 deletions tests/unit/test_acquisition.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def test_ei_log_emulator_is_zero_when_variance_non_positive():
# --- __calc_ei_sparse (method 5, sparse-grid integrated EI / 2C) -------------------------

def test_ei_sparse_is_deterministic_and_nonnegative():
pytest.importorskip("Tasmanian")
best_error_x, ep_curr, var = 2.0, 1.5, 0.25
method = GPBOMethod(MethodName.SPARSE_GRID)

Expand Down Expand Up @@ -190,6 +191,7 @@ def test_ei_mc_is_zero_when_variance_negative():


def test_ei_sparse_ldl_fallback_for_non_positive_definite_covariance():
pytest.importorskip("Tasmanian")
# __calc_ei_sparse diagonalizes self.gp_covar with Cholesky, falling back to LDL when
# that fails; a non-PD covariance (eigenvalues 3, -1) forces the except branch.
method = GPBOMethod(MethodName.SPARSE_GRID)
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/test_calibration_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ def test_bad_bound_order():

@pytest.mark.parametrize("cs", BUILT_INS)
def test_get_case_study_returns_valid_problem(cs):
if cs in (2, 3):
pytest.importorskip("pyomo")
p = get_case_study(cs)
assert isinstance(p, CalibrationProblem)
assert len(p.param_names) == len(p.param_bounds)
Expand Down
Loading