File tree Expand file tree Collapse file tree 8 files changed +64
-17
lines changed
solvers/bayesian_optimization Expand file tree Collapse file tree 8 files changed +64
-17
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
5
5
[project ]
6
6
name = " poli-baselines"
7
- version = " 1.0.0 "
7
+ version = " 1.0.1 "
8
8
description = " poli-baselines, a library of discrete objective optimizers"
9
9
readme = " README.md"
10
10
authors = [{
name =
" Miguel González-Duque" ,
email =
" [email protected] " }]
@@ -94,7 +94,7 @@ markers = [
94
94
profile = " black"
95
95
96
96
[tool .bumpversion ]
97
- current_version = " 1.0.0 "
97
+ current_version = " 1.0.1 "
98
98
parse = """ (?x)
99
99
(?P<major>0|[1-9]\\ d*)\\ .
100
100
(?P<minor>0|[1-9]\\ d*)\\ .
Original file line number Diff line number Diff line change 1
1
[metadata]
2
2
name = poli_baselines
3
- version = 1.0.0
3
+ version = 1.0.1
4
4
5
5
description = Baselines for Discrete Sequence Optimization, focusing on proteins
6
6
long_description = file: readme.md
Original file line number Diff line number Diff line change 1
- __version__ = "1.0.0 "
1
+ __version__ = "1.0.1 "
Original file line number Diff line number Diff line change 5
5
6
6
import numpy as np
7
7
import torch
8
- from ax .modelbridge .generation_strategy import GenerationStrategy
9
- from ax .service .ax_client import AxClient , ObjectiveProperties
8
+
9
+ try :
10
+ from ax .modelbridge .generation_strategy import GenerationStrategy
11
+ from ax .service .ax_client import AxClient , ObjectiveProperties
12
+ except ImportError as e :
13
+ raise ImportError (
14
+ "You are trying to use a solver that requires Ax. Install "
15
+ "the relevant optional dependencies with [ax] or [alebo].\n "
16
+ "You can do this by running e.g. \n "
17
+ "pip install 'poli-baselines[ax] @ git+https://github.com/MachineLearningLifeScience/poli-baselines.git'"
18
+ ) from e
19
+
10
20
from numpy import ndarray
11
21
from poli .core .abstract_black_box import AbstractBlackBox
12
22
from poli .objective_repository import ToyContinuousBlackBox
Original file line number Diff line number Diff line change 4
4
from typing import List
5
5
6
6
import numpy as np
7
- from baxus .baxus import BAxUS as OriginalBAxUS
8
- from baxus .benchmarks .benchmark_function import Benchmark
7
+
8
+ try :
9
+ from baxus .baxus import BAxUS as OriginalBAxUS
10
+ from baxus .benchmarks .benchmark_function import Benchmark
11
+ except ImportError as e :
12
+ raise ImportError (
13
+ "You are trying to use the BAxUS solver. Install "
14
+ "the relevant optional dependencies with [baxus]. \n "
15
+ "You can do this by running: \n "
16
+ "pip install 'poli-baselines[baxus] @ git+https://github.com/MachineLearningLifeScience/poli-baselines.git'"
17
+ ) from e
9
18
from poli .core .abstract_black_box import AbstractBlackBox
10
19
11
20
from poli_baselines .core .abstract_solver import AbstractSolver
Original file line number Diff line number Diff line change 10
10
11
11
import numpy as np
12
12
import torch
13
- from bounce .bounce import Bounce
13
+
14
+ try :
15
+ from bounce .bounce import Bounce
16
+ except ImportError as e :
17
+ raise ImportError (
18
+ "You are trying to use the Bounce solver. Install "
19
+ "the relevant optional dependencies with [bounce]. \n "
20
+ "You can do this by running: \n "
21
+ "pip install 'poli-baselines[bounce] @ git+https://github.com/MachineLearningLifeScience/poli-baselines.git'"
22
+ ) from e
23
+
14
24
from poli .core .abstract_black_box import AbstractBlackBox
15
25
from poli .core .util .seeding import seed_python_numpy_and_torch
16
26
Original file line number Diff line number Diff line change 27
27
from pathlib import Path
28
28
from uuid import uuid4
29
29
30
- import edlib
31
- import hydra
32
- import lightning as L
30
+ try :
31
+ import edlib
32
+ import hydra
33
+ import lightning as L
34
+ from beignet import farthest_first_traversal
35
+ from omegaconf import OmegaConf
36
+ except ImportError as e :
37
+ raise ImportError (
38
+ "You are trying to use the Lambo2 solver. Install "
39
+ "the relevant optional dependencies with [lambo2].\n "
40
+ "You can do this by running e.g. \n "
41
+ "pip install 'poli-baselines[lambo2] @ git+https://github.com/MachineLearningLifeScience/poli-baselines.git'"
42
+ ) from e
43
+
33
44
import numpy as np
34
45
import torch
35
- from beignet import farthest_first_traversal
36
- from omegaconf import OmegaConf
37
46
from poli .core .abstract_black_box import AbstractBlackBox
38
47
from poli .core .util .seeding import seed_python_numpy_and_torch
39
48
Original file line number Diff line number Diff line change 11
11
from poli .core .abstract_black_box import AbstractBlackBox
12
12
13
13
from poli_baselines .core .abstract_solver import AbstractSolver
14
- from poli_baselines .core .utils .bo_pr .run_one_replication import (
15
- run_one_replication_on_poli_black_box ,
16
- )
14
+
15
+ try :
16
+ from poli_baselines .core .utils .bo_pr .run_one_replication import (
17
+ run_one_replication_on_poli_black_box ,
18
+ )
19
+ except ImportError as e :
20
+ raise ImportError (
21
+ "You are trying to use the Probabilistic Reparametrization solver. Install "
22
+ "the relevant optional dependencies with [pr]. \n "
23
+ "You can do this by running: \n "
24
+ "pip install 'poli-baselines[pr] @ git+https://github.com/MachineLearningLifeScience/poli-baselines.git'"
25
+ ) from e
17
26
18
27
19
28
class ProbabilisticReparametrizationSolver (AbstractSolver ):
You can’t perform that action at this time.
0 commit comments