physbo 2.0.0__tar.gz → 2.0.1__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.
Files changed (68) hide show
  1. {physbo-2.0.0 → physbo-2.0.1}/PKG-INFO +1 -1
  2. {physbo-2.0.0 → physbo-2.0.1}/physbo/__init__.py +1 -1
  3. {physbo-2.0.0 → physbo-2.0.1}/physbo/search/discrete/policy.py +9 -5
  4. {physbo-2.0.0 → physbo-2.0.1}/physbo/search/discrete/results.py +2 -2
  5. {physbo-2.0.0 → physbo-2.0.1}/physbo/search/discrete_multi/policy.py +8 -5
  6. {physbo-2.0.0 → physbo-2.0.1}/physbo/search/discrete_multi/results.py +2 -2
  7. {physbo-2.0.0 → physbo-2.0.1}/physbo.egg-info/PKG-INFO +1 -1
  8. {physbo-2.0.0 → physbo-2.0.1}/setup.cfg +1 -1
  9. {physbo-2.0.0 → physbo-2.0.1}/README.md +0 -0
  10. {physbo-2.0.0 → physbo-2.0.1}/physbo/blm/__init__.py +0 -0
  11. {physbo-2.0.0 → physbo-2.0.1}/physbo/blm/basis/__init__.py +0 -0
  12. {physbo-2.0.0 → physbo-2.0.1}/physbo/blm/basis/fourier.py +0 -0
  13. {physbo-2.0.0 → physbo-2.0.1}/physbo/blm/core/__init__.py +0 -0
  14. {physbo-2.0.0 → physbo-2.0.1}/physbo/blm/core/model.py +0 -0
  15. {physbo-2.0.0 → physbo-2.0.1}/physbo/blm/inf/__init__.py +0 -0
  16. {physbo-2.0.0 → physbo-2.0.1}/physbo/blm/inf/exact.py +0 -0
  17. {physbo-2.0.0 → physbo-2.0.1}/physbo/blm/lik/__init__.py +0 -0
  18. {physbo-2.0.0 → physbo-2.0.1}/physbo/blm/lik/_src/__init__.py +0 -0
  19. {physbo-2.0.0 → physbo-2.0.1}/physbo/blm/lik/_src/cov.py +0 -0
  20. {physbo-2.0.0 → physbo-2.0.1}/physbo/blm/lik/gauss.py +0 -0
  21. {physbo-2.0.0 → physbo-2.0.1}/physbo/blm/lik/linear.py +0 -0
  22. {physbo-2.0.0 → physbo-2.0.1}/physbo/blm/predictor.py +0 -0
  23. {physbo-2.0.0 → physbo-2.0.1}/physbo/blm/prior/__init__.py +0 -0
  24. {physbo-2.0.0 → physbo-2.0.1}/physbo/blm/prior/gauss.py +0 -0
  25. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/__init__.py +0 -0
  26. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/core/__init__.py +0 -0
  27. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/core/learning.py +0 -0
  28. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/core/model.py +0 -0
  29. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/core/prior.py +0 -0
  30. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/cov/__init__.py +0 -0
  31. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/cov/_src/__init__.py +0 -0
  32. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/cov/_src/enhance_gauss.pyx +0 -0
  33. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/cov/gauss.py +0 -0
  34. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/inf/__init__.py +0 -0
  35. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/inf/exact.py +0 -0
  36. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/lik/__init__.py +0 -0
  37. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/lik/gauss.py +0 -0
  38. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/mean/__init__.py +0 -0
  39. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/mean/const.py +0 -0
  40. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/mean/zero.py +0 -0
  41. {physbo-2.0.0 → physbo-2.0.1}/physbo/gp/predictor.py +0 -0
  42. {physbo-2.0.0 → physbo-2.0.1}/physbo/misc/__init__.py +0 -0
  43. {physbo-2.0.0 → physbo-2.0.1}/physbo/misc/_src/__init__.py +0 -0
  44. {physbo-2.0.0 → physbo-2.0.1}/physbo/misc/_src/cholupdate.pyx +0 -0
  45. {physbo-2.0.0 → physbo-2.0.1}/physbo/misc/_src/diagAB.pyx +0 -0
  46. {physbo-2.0.0 → physbo-2.0.1}/physbo/misc/_src/logsumexp.pyx +0 -0
  47. {physbo-2.0.0 → physbo-2.0.1}/physbo/misc/_src/traceAB.pyx +0 -0
  48. {physbo-2.0.0 → physbo-2.0.1}/physbo/misc/centering.py +0 -0
  49. {physbo-2.0.0 → physbo-2.0.1}/physbo/misc/gauss_elim.py +0 -0
  50. {physbo-2.0.0 → physbo-2.0.1}/physbo/misc/set_config.py +0 -0
  51. {physbo-2.0.0 → physbo-2.0.1}/physbo/opt/__init__.py +0 -0
  52. {physbo-2.0.0 → physbo-2.0.1}/physbo/opt/adam.py +0 -0
  53. {physbo-2.0.0 → physbo-2.0.1}/physbo/predictor.py +0 -0
  54. {physbo-2.0.0 → physbo-2.0.1}/physbo/search/__init__.py +0 -0
  55. {physbo-2.0.0 → physbo-2.0.1}/physbo/search/discrete/__init__.py +0 -0
  56. {physbo-2.0.0 → physbo-2.0.1}/physbo/search/discrete_multi/__init__.py +0 -0
  57. {physbo-2.0.0 → physbo-2.0.1}/physbo/search/pareto.py +0 -0
  58. {physbo-2.0.0 → physbo-2.0.1}/physbo/search/score.py +0 -0
  59. {physbo-2.0.0 → physbo-2.0.1}/physbo/search/score_multi.py +0 -0
  60. {physbo-2.0.0 → physbo-2.0.1}/physbo/search/utility.py +0 -0
  61. {physbo-2.0.0 → physbo-2.0.1}/physbo/variable.py +0 -0
  62. {physbo-2.0.0 → physbo-2.0.1}/physbo.egg-info/SOURCES.txt +0 -0
  63. {physbo-2.0.0 → physbo-2.0.1}/physbo.egg-info/dependency_links.txt +0 -0
  64. {physbo-2.0.0 → physbo-2.0.1}/physbo.egg-info/not-zip-safe +0 -0
  65. {physbo-2.0.0 → physbo-2.0.1}/physbo.egg-info/requires.txt +0 -0
  66. {physbo-2.0.0 → physbo-2.0.1}/physbo.egg-info/top_level.txt +0 -0
  67. {physbo-2.0.0 → physbo-2.0.1}/pyproject.toml +0 -0
  68. {physbo-2.0.0 → physbo-2.0.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: physbo
3
- Version: 2.0.0
3
+ Version: 2.0.1
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
@@ -14,4 +14,4 @@ from . import predictor
14
14
  from .predictor import base_predictor
15
15
  from .variable import variable
16
16
 
17
- __version__ = "2.0.0"
17
+ __version__ = "2.0.1"
@@ -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
- local_index = np.searchsorted(self.actions, action)
142
- local_index = local_index[
143
- np.take(self.actions, local_index, mode="clip") == action
144
- ]
145
- self.actions = self._delete_actions(local_index)
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:
@@ -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"]
@@ -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
- local_index = np.searchsorted(self.actions, action)
110
- local_index = local_index[
111
- np.take(self.actions, local_index, mode="clip") == action
112
- ]
113
- self.actions = self._delete_actions(local_index)
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]
@@ -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.0
3
+ Version: 2.0.1
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
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = physbo
3
- version = 2.0.0
3
+ version = 2.0.1
4
4
  description = optimization tool for PHYSics based on Bayesian Optimization
5
5
  long_description = file: README.md
6
6
  long_description_content_type = text/markdown
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