Skip to content

Commit 758a59b

Browse files
committed
error with scVI search compliance with pytorchlightining
1 parent 366c8d6 commit 758a59b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sobolev_alignment/scvi_model_search.py

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from anndata import AnnData
1313
from hyperopt import STATUS_FAIL, STATUS_OK, Trials, fmin, hp, tpe
1414
from sklearn.model_selection import train_test_split
15+
from pytorch_lightning.utilities.exceptions import MisconfigurationException
1516

1617
from ._scvi_default_params import SCVI_MODEL_PARAMS, SCVI_PLAN_PARAMS, SCVI_TRAIN_PARAMS
1718

@@ -179,6 +180,9 @@ def _objective_function(params):
179180
except ValueError:
180181
results_dict = {"status": STATUS_FAIL, "loss": np.iinfo(np.uint64).max}
181182
results_dict.update(params)
183+
except MisconfigurationException:
184+
results_dict = {"status": STATUS_FAIL, "loss": np.iinfo(np.uint64).max}
185+
results_dict.update(params)
182186

183187
results_dict.update(params)
184188
return results_dict

0 commit comments

Comments
 (0)