physbo 2.0.0__tar.gz → 2.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {physbo-2.0.0 → physbo-2.0.2}/PKG-INFO +6 -4
- {physbo-2.0.0 → physbo-2.0.2}/README.md +5 -3
- {physbo-2.0.0 → physbo-2.0.2}/physbo/__init__.py +1 -1
- {physbo-2.0.0 → physbo-2.0.2}/physbo/search/discrete/policy.py +16 -6
- {physbo-2.0.0 → physbo-2.0.2}/physbo/search/discrete/results.py +2 -2
- {physbo-2.0.0 → physbo-2.0.2}/physbo/search/discrete_multi/policy.py +16 -7
- {physbo-2.0.0 → physbo-2.0.2}/physbo/search/discrete_multi/results.py +2 -2
- {physbo-2.0.0 → physbo-2.0.2}/physbo.egg-info/PKG-INFO +6 -4
- physbo-2.0.2/pyproject.toml +3 -0
- {physbo-2.0.0 → physbo-2.0.2}/setup.cfg +1 -1
- physbo-2.0.0/pyproject.toml +0 -3
- {physbo-2.0.0 → physbo-2.0.2}/physbo/blm/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/blm/basis/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/blm/basis/fourier.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/blm/core/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/blm/core/model.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/blm/inf/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/blm/inf/exact.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/blm/lik/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/blm/lik/_src/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/blm/lik/_src/cov.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/blm/lik/gauss.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/blm/lik/linear.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/blm/predictor.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/blm/prior/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/blm/prior/gauss.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/core/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/core/learning.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/core/model.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/core/prior.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/cov/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/cov/_src/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/cov/_src/enhance_gauss.pyx +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/cov/gauss.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/inf/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/inf/exact.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/lik/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/lik/gauss.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/mean/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/mean/const.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/mean/zero.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/gp/predictor.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/misc/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/misc/_src/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/misc/_src/cholupdate.pyx +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/misc/_src/diagAB.pyx +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/misc/_src/logsumexp.pyx +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/misc/_src/traceAB.pyx +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/misc/centering.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/misc/gauss_elim.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/misc/set_config.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/opt/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/opt/adam.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/predictor.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/search/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/search/discrete/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/search/discrete_multi/__init__.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/search/pareto.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/search/score.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/search/score_multi.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/search/utility.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo/variable.py +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo.egg-info/SOURCES.txt +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo.egg-info/dependency_links.txt +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo.egg-info/not-zip-safe +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo.egg-info/requires.txt +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/physbo.egg-info/top_level.txt +0 -0
- {physbo-2.0.0 → physbo-2.0.2}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: physbo
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: optimization tool for PHYSics based on Bayesian Optimization
|
|
5
5
|
Home-page: https://github.com/issp-center-dev/PHYSBO
|
|
6
6
|
Author: PHYSBO developers
|
|
@@ -18,7 +18,7 @@ A standard implementation (e.g., scikit-learn), however, can accommodate only sm
|
|
|
18
18
|
PHYSBO is highly scalable due to an efficient protocol that employs Thompson sampling, random feature maps, one-rank Cholesky update and automatic hyperparameter tuning. Technical features are described in [COMBO's document](https://github.com/tsudalab/combo/blob/master/docs/combo_document.pdf) and [PHYSBO's report](https://doi.org/10.1016/j.cpc.2022.108405) (open access).
|
|
19
19
|
PHYSBO was developed based on [COMBO](https://github.com/tsudalab/combo) for academic use.
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## Documentation
|
|
22
22
|
|
|
23
23
|
- Stable (master branch)
|
|
24
24
|
- [English](https://issp-center-dev.github.io/PHYSBO/manual/master/en/index.html)
|
|
@@ -27,7 +27,7 @@ PHYSBO was developed based on [COMBO](https://github.com/tsudalab/combo) for aca
|
|
|
27
27
|
- [English](https://issp-center-dev.github.io/PHYSBO/manual/develop/en/index.html)
|
|
28
28
|
- [日本語](https://issp-center-dev.github.io/PHYSBO/manual/develop/ja/index.html)
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## Dependencies
|
|
31
31
|
|
|
32
32
|
- Python >= 3.6
|
|
33
33
|
- No longer tested with Python 3.6
|
|
@@ -74,7 +74,9 @@ python3 -m pip uninstall physbo
|
|
|
74
74
|
|
|
75
75
|
## Usage
|
|
76
76
|
|
|
77
|
-
[
|
|
77
|
+
For an introductory tutorial please consult the documentation. ([English](https://issp-center-dev.github.io/PHYSBO/manual/master/en/notebook/tutorial_basic.html) / [日本語](https://issp-center-dev.github.io/PHYSBO/manual/develop/ja/install.html#id2))
|
|
78
|
+
|
|
79
|
+
['examples/simple.py'](./examples/simple.py) is a simple example.
|
|
78
80
|
|
|
79
81
|
## Data repository
|
|
80
82
|
|
|
@@ -5,7 +5,7 @@ A standard implementation (e.g., scikit-learn), however, can accommodate only sm
|
|
|
5
5
|
PHYSBO is highly scalable due to an efficient protocol that employs Thompson sampling, random feature maps, one-rank Cholesky update and automatic hyperparameter tuning. Technical features are described in [COMBO's document](https://github.com/tsudalab/combo/blob/master/docs/combo_document.pdf) and [PHYSBO's report](https://doi.org/10.1016/j.cpc.2022.108405) (open access).
|
|
6
6
|
PHYSBO was developed based on [COMBO](https://github.com/tsudalab/combo) for academic use.
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Documentation
|
|
9
9
|
|
|
10
10
|
- Stable (master branch)
|
|
11
11
|
- [English](https://issp-center-dev.github.io/PHYSBO/manual/master/en/index.html)
|
|
@@ -14,7 +14,7 @@ PHYSBO was developed based on [COMBO](https://github.com/tsudalab/combo) for aca
|
|
|
14
14
|
- [English](https://issp-center-dev.github.io/PHYSBO/manual/develop/en/index.html)
|
|
15
15
|
- [日本語](https://issp-center-dev.github.io/PHYSBO/manual/develop/ja/index.html)
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Dependencies
|
|
18
18
|
|
|
19
19
|
- Python >= 3.6
|
|
20
20
|
- No longer tested with Python 3.6
|
|
@@ -61,7 +61,9 @@ python3 -m pip uninstall physbo
|
|
|
61
61
|
|
|
62
62
|
## Usage
|
|
63
63
|
|
|
64
|
-
[
|
|
64
|
+
For an introductory tutorial please consult the documentation. ([English](https://issp-center-dev.github.io/PHYSBO/manual/master/en/notebook/tutorial_basic.html) / [日本語](https://issp-center-dev.github.io/PHYSBO/manual/develop/ja/install.html#id2))
|
|
65
|
+
|
|
66
|
+
['examples/simple.py'](./examples/simple.py) is a simple example.
|
|
65
67
|
|
|
66
68
|
## Data repository
|
|
67
69
|
|
|
@@ -138,11 +138,15 @@ class policy:
|
|
|
138
138
|
time_run_simulator=time_run_simulator,
|
|
139
139
|
)
|
|
140
140
|
self.training.add(X=X, t=t, Z=Z)
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
141
|
+
|
|
142
|
+
# remove the selected actions from the list of candidates if exists
|
|
143
|
+
if len(self.actions) > 0:
|
|
144
|
+
local_index = np.searchsorted(self.actions, action)
|
|
145
|
+
local_index = local_index[
|
|
146
|
+
np.take(self.actions, local_index, mode="clip") == action
|
|
147
|
+
]
|
|
148
|
+
self.actions = self._delete_actions(local_index)
|
|
149
|
+
|
|
146
150
|
if self.new_data is None:
|
|
147
151
|
self.new_data = variable(X=X, t=t, Z=Z)
|
|
148
152
|
else:
|
|
@@ -690,7 +694,13 @@ class policy:
|
|
|
690
694
|
self.predictor = pickle.load(f)
|
|
691
695
|
|
|
692
696
|
N = self.history.total_num_search
|
|
693
|
-
|
|
697
|
+
|
|
698
|
+
visited = self.history.chosen_actions[:N]
|
|
699
|
+
local_index = np.searchsorted(self.actions, visited)
|
|
700
|
+
local_index = local_index[
|
|
701
|
+
np.take(self.actions, local_index, mode="clip") == visited
|
|
702
|
+
]
|
|
703
|
+
self.actions = self._delete_actions(local_index)
|
|
694
704
|
|
|
695
705
|
def export_predictor(self):
|
|
696
706
|
"""
|
|
@@ -183,8 +183,8 @@ class history:
|
|
|
183
183
|
|
|
184
184
|
"""
|
|
185
185
|
data = np.load(filename)
|
|
186
|
-
M = data["num_runs"]
|
|
187
|
-
N = data["total_num_search"]
|
|
186
|
+
M = int(data["num_runs"])
|
|
187
|
+
N = int(data["total_num_search"])
|
|
188
188
|
self.num_runs = M
|
|
189
189
|
self.total_num_search = N
|
|
190
190
|
self.fx[0:N] = data["fx"]
|
|
@@ -58,7 +58,7 @@ class policy(discrete.policy):
|
|
|
58
58
|
msg = "ERROR: len(initial_data[0]) != initial_data[1].shape[0]"
|
|
59
59
|
raise RuntimeError(msg)
|
|
60
60
|
self.write(actions, fs)
|
|
61
|
-
self.actions = sorted(list(set(self.actions) - set(actions)))
|
|
61
|
+
self.actions = np.array(sorted(list(set(self.actions) - set(actions))))
|
|
62
62
|
|
|
63
63
|
if comm is None:
|
|
64
64
|
self.mpicomm = None
|
|
@@ -106,11 +106,14 @@ class policy(discrete.policy):
|
|
|
106
106
|
else:
|
|
107
107
|
self.new_data_list[i].add(X=X, t=t[:, i], Z=Z)
|
|
108
108
|
self.training_list[i].add(X=X, t=t[:, i], Z=Z)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
|
|
110
|
+
# remove action from candidates if exists
|
|
111
|
+
if len(self.actions) > 0:
|
|
112
|
+
local_index = np.searchsorted(self.actions, action)
|
|
113
|
+
local_index = local_index[
|
|
114
|
+
np.take(self.actions, local_index, mode="clip") == action
|
|
115
|
+
]
|
|
116
|
+
self.actions = self._delete_actions(local_index)
|
|
114
117
|
|
|
115
118
|
def _model(self, i):
|
|
116
119
|
training = self.training_list[i]
|
|
@@ -487,7 +490,13 @@ class policy(discrete.policy):
|
|
|
487
490
|
self.load_predictor_list(file_predictor_list)
|
|
488
491
|
|
|
489
492
|
N = self.history.total_num_search
|
|
490
|
-
|
|
493
|
+
|
|
494
|
+
visited = self.history.chosen_actions[:N]
|
|
495
|
+
local_index = np.searchsorted(self.actions, visited)
|
|
496
|
+
local_index = local_index[
|
|
497
|
+
np.take(self.actions, local_index, mode="clip") == visited
|
|
498
|
+
]
|
|
499
|
+
self.actions = self._delete_actions(local_index)
|
|
491
500
|
|
|
492
501
|
def save_predictor_list(self, file_name):
|
|
493
502
|
with open(file_name, "wb") as f:
|
|
@@ -118,8 +118,8 @@ class history(object):
|
|
|
118
118
|
with open(filename, "rb") as f:
|
|
119
119
|
data = pickle.load(f)
|
|
120
120
|
|
|
121
|
-
M = data["num_runs"]
|
|
122
|
-
N = data["total_num_search"]
|
|
121
|
+
M = int(data["num_runs"])
|
|
122
|
+
N = int(data["total_num_search"])
|
|
123
123
|
self.num_runs = M
|
|
124
124
|
self.total_num_search = N
|
|
125
125
|
self.fx[0:N] = data["fx"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: physbo
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: optimization tool for PHYSics based on Bayesian Optimization
|
|
5
5
|
Home-page: https://github.com/issp-center-dev/PHYSBO
|
|
6
6
|
Author: PHYSBO developers
|
|
@@ -18,7 +18,7 @@ A standard implementation (e.g., scikit-learn), however, can accommodate only sm
|
|
|
18
18
|
PHYSBO is highly scalable due to an efficient protocol that employs Thompson sampling, random feature maps, one-rank Cholesky update and automatic hyperparameter tuning. Technical features are described in [COMBO's document](https://github.com/tsudalab/combo/blob/master/docs/combo_document.pdf) and [PHYSBO's report](https://doi.org/10.1016/j.cpc.2022.108405) (open access).
|
|
19
19
|
PHYSBO was developed based on [COMBO](https://github.com/tsudalab/combo) for academic use.
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## Documentation
|
|
22
22
|
|
|
23
23
|
- Stable (master branch)
|
|
24
24
|
- [English](https://issp-center-dev.github.io/PHYSBO/manual/master/en/index.html)
|
|
@@ -27,7 +27,7 @@ PHYSBO was developed based on [COMBO](https://github.com/tsudalab/combo) for aca
|
|
|
27
27
|
- [English](https://issp-center-dev.github.io/PHYSBO/manual/develop/en/index.html)
|
|
28
28
|
- [日本語](https://issp-center-dev.github.io/PHYSBO/manual/develop/ja/index.html)
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## Dependencies
|
|
31
31
|
|
|
32
32
|
- Python >= 3.6
|
|
33
33
|
- No longer tested with Python 3.6
|
|
@@ -74,7 +74,9 @@ python3 -m pip uninstall physbo
|
|
|
74
74
|
|
|
75
75
|
## Usage
|
|
76
76
|
|
|
77
|
-
[
|
|
77
|
+
For an introductory tutorial please consult the documentation. ([English](https://issp-center-dev.github.io/PHYSBO/manual/master/en/notebook/tutorial_basic.html) / [日本語](https://issp-center-dev.github.io/PHYSBO/manual/develop/ja/install.html#id2))
|
|
78
|
+
|
|
79
|
+
['examples/simple.py'](./examples/simple.py) is a simple example.
|
|
78
80
|
|
|
79
81
|
## Data repository
|
|
80
82
|
|
physbo-2.0.0/pyproject.toml
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|