Skip to content

Commit 73ceea1

Browse files
committed
Revert "Fix import of AxModelManager"
This reverts commit d6221cc.
1 parent d6221cc commit 73ceea1

File tree

3 files changed

+2
-21
lines changed

3 files changed

+2
-21
lines changed

optimas/generators/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from .ax.service.multi_fidelity import AxMultiFidelityGenerator
55
from .ax.service.ax_client import AxClientGenerator
66
from .ax.developer.multitask import AxMultitaskGenerator
7-
except (ImportError, ModuleNotFoundError) as e:
8-
if e.__str__().startswith("No module named 'ax"):
7+
except ImportError as e:
8+
if e.__str__() == "No module named 'ax'":
99
# Replace generators by dummy generators that will
1010
# raise an error only if the user tries to instantiate them
1111
# and tell them to install ax-platform

optimas/utils/ax/ax_model_manager.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,8 @@
2929

3030
ax_installed = True
3131
except ImportError:
32-
from .import_error_dummy_class import AxImportErrorDummyClass
33-
AxClient = AxImportErrorDummyClass
34-
TorchModelBridge = AxImportErrorDummyClass
3532
ax_installed = False
3633

37-
3834
from optimas.core import VaryingParameter, Objective
3935
from optimas.utils.other import convert_to_dataframe
4036

optimas/utils/ax/import_error_dummy_class.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)