forked from automl/SMAC3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
36 lines (27 loc) · 1.08 KB
/
__init__.py
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
import json
import os
import sys
from smac.utils import dependencies
__copyright__ = "Copyright 2021, AutoML.org Freiburg-Hannover"
__license__ = "3-clause BSD"
__version__ = '1.0.1'
__author__ = 'Marius Lindauer, Katharina Eggensperger, Matthias Feurer, André Biedenkapp, ' \
'Difan Deng, Carolin Benjamins, René Sass ' \
'and Frank Hutter'
with open(os.path.join(os.path.dirname(__file__), 'requirements.txt')) as fh:
dependencies.verify_packages(fh.read())
with open(os.path.join(os.path.dirname(__file__), 'extras_require.json')) as fh:
extras_require = json.load(fh)
extras_installed = set()
for name, requirements in extras_require.items():
if name in ['documentation', 'test']:
continue
if dependencies.are_valid_packages(requirements):
extras_installed.add(name)
if sys.version_info < (3, 7, 0):
raise ValueError("SMAC requires Python 3.7.0 or newer.")
if os.name != 'posix':
print(
'Detected unsupported operating system: %s. Please be aware, that SMAC might not run on this system.' %
sys.platform
)