-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy path__init__.py
More file actions
62 lines (54 loc) · 1.68 KB
/
__init__.py
File metadata and controls
62 lines (54 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# flake8: noqa: F401
import importlib
import warnings
# from dacbench.envs.fast_downward import FastDownwardEnv
from dacbench.envs.function_approximation import (
FunctionApproximationEnv,
FunctionApproximationInstance,
)
from dacbench.envs.luby import LubyEnv, LubyInstance, luby_gen
from dacbench.envs.theory import TheoryEnv
from dacbench.envs.toysgd import ToySGDEnv, ToySGDInstance
__all__ = [
"FunctionApproximationEnv",
"FunctionApproximationInstance",
"LubyEnv",
"LubyInstance",
"TheoryEnv",
# "FastDownwardEnv",
"ToySGDEnv",
"ToySGDInstance",
"luby_gen",
]
modcma_spec = importlib.util.find_spec("modcma")
found = modcma_spec is not None
if found:
from dacbench.envs.cma_es import CMAESEnv, CMAESInstance
__all__.append("CMAESEnv")
__all__.append("CMAESInstance")
else:
warnings.warn( # noqa: B028
"CMA-ES Benchmark not installed. If you want to use this benchmark, "
"please follow the installation guide."
)
sgd_spec = importlib.util.find_spec("torch")
found = sgd_spec is not None
if found:
from dacbench.envs.sgd import SGDEnv, SGDInstance
__all__.append("SGDEnv")
__all__.append("SGDInstance")
else:
warnings.warn( # noqa: B028
"SGD Benchmark not installed. If you want to use this benchmark, "
"please follow the installation guide."
)
dacboenv_spec = importlib.util.find_spec("dacboenv")
found = dacboenv_spec is not None
if found:
from dacbench.envs.dacbo import DACBOEnv
__all__.append("DACBOEnv")
else:
warnings.warn( # noqa: B028
"DACBO Env not installed. If you want to use this benchmark, "
"please follow the installation guide."
)