diff --git a/.gitignore b/.gitignore index 01aa5097..46ab9b74 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ dist/* .tox/ _build *.png +deepsensor.egg-info/ diff --git a/deepsensor/active_learning/algorithms.py b/deepsensor/active_learning/algorithms.py index fb62bbc9..51234704 100644 --- a/deepsensor/active_learning/algorithms.py +++ b/deepsensor/active_learning/algorithms.py @@ -377,9 +377,9 @@ def _search(self, acquisition_fn: AcquisitionFunction): self.X_s_mask.data ] = importances else: - self.acquisition_fn_ds.loc[ - self.iteration, task["time"] - ] = importances.reshape(self.acquisition_fn_ds.shape[-2:]) + self.acquisition_fn_ds.loc[self.iteration, task["time"]] = ( + importances.reshape(self.acquisition_fn_ds.shape[-2:]) + ) return np.mean(importances_list, axis=0) diff --git a/deepsensor/config.py b/deepsensor/config.py index e11679d2..66e29155 100644 --- a/deepsensor/config.py +++ b/deepsensor/config.py @@ -2,7 +2,6 @@ Configuration file for deepsensor """ - DEFAULT_LAB_EPSILON = 1e-6 """ Magnitude of diagonal to regularise matrices with in ``backends`` library used diff --git a/deepsensor/model/model.py b/deepsensor/model/model.py index 315d8fe0..d32d0f07 100644 --- a/deepsensor/model/model.py +++ b/deepsensor/model/model.py @@ -577,10 +577,10 @@ def unnormalise_pred_array(arr, **kwargs): if unnormalise: if param == "samples": for sample_i in range(n_samples): - prediction_arrs["samples"][ - sample_i - ] = unnormalise_pred_array( - prediction_arrs["samples"][sample_i] + prediction_arrs["samples"][sample_i] = ( + unnormalise_pred_array( + prediction_arrs["samples"][sample_i] + ) ) elif param in scale_and_offset_params: prediction_arrs[param] = unnormalise_pred_array(arr) diff --git a/tests/test_model.py b/tests/test_model.py index c3d675bc..80519269 100644 --- a/tests/test_model.py +++ b/tests/test_model.py @@ -269,9 +269,9 @@ def test_prediction_shapes_highlevel(self, target_dim): tasks, X_t=self.da, n_samples=n_samples, - unnormalise=True - if target_dim == 1 - else False, # TODO fix unnormalising for multiple equally named targets + unnormalise=( + True if target_dim == 1 else False + ), # TODO fix unnormalising for multiple equally named targets ) assert [isinstance(ds, xr.Dataset) for ds in pred.values()] for var_ID in pred: