xopt 2.3.0__tar.gz → 2.4.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.
Files changed (154) hide show
  1. xopt-2.4.2/.flake8 +11 -0
  2. xopt-2.4.2/.pre-commit-config.yaml +36 -0
  3. xopt-2.4.2/MANIFEST.in +1 -0
  4. xopt-2.4.2/PKG-INFO +496 -0
  5. {xopt-2.3.0 → xopt-2.4.2}/README.md +24 -24
  6. xopt-2.4.2/docs/algorithms.md +76 -0
  7. xopt-2.4.2/docs/api/evaluator.md +1 -0
  8. xopt-2.4.2/docs/api/generators/bayesian.md +4 -0
  9. xopt-2.4.2/docs/api/generators/genetic.md +1 -0
  10. xopt-2.4.2/docs/api/generators/scipy.md +1 -0
  11. xopt-2.4.2/docs/api/generators.md +1 -0
  12. xopt-2.4.2/docs/api/vocs.md +1 -0
  13. xopt-2.4.2/docs/api/xopt.md +1 -0
  14. xopt-2.4.2/docs/assets/Xopt-logo.png +0 -0
  15. xopt-2.4.2/docs/assets/xopt_overview.pdf +0 -0
  16. xopt-2.3.0/xopt.egg-info/PKG-INFO → xopt-2.4.2/docs/index.md +31 -101
  17. xopt-2.4.2/docs/installation.md +58 -0
  18. xopt-2.4.2/docs/overrides/main.html +11 -0
  19. xopt-2.4.2/docs/stylesheets/extra.css +31 -0
  20. xopt-2.4.2/environment.yml +35 -0
  21. xopt-2.4.2/mkdocs.yml +151 -0
  22. xopt-2.4.2/pyproject.toml +88 -0
  23. xopt-2.4.2/scripts/execute_notebooks.bash +18 -0
  24. xopt-2.4.2/scripts/run_benchmarks.py +73 -0
  25. xopt-2.4.2/scripts/run_examples.py +159 -0
  26. xopt-2.4.2/scripts/run_tests.py +22 -0
  27. xopt-2.4.2/setup.cfg +4 -0
  28. {xopt-2.3.0 → xopt-2.4.2}/xopt/__init__.py +4 -2
  29. xopt-2.4.2/xopt/_version.py +16 -0
  30. {xopt-2.3.0 → xopt-2.4.2}/xopt/base.py +2 -3
  31. {xopt-2.3.0 → xopt-2.4.2}/xopt/generator.py +3 -1
  32. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/__init__.py +7 -1
  33. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/bax/algorithms.py +52 -8
  34. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/bax_generator.py +13 -1
  35. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/bayesian_generator.py +44 -32
  36. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/expected_improvement.py +9 -0
  37. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/time_dependent.py +36 -4
  38. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/turbo.py +106 -46
  39. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/upper_confidence_bound.py +2 -5
  40. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/utils.py +46 -1
  41. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/visualize.py +12 -1
  42. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/rcds/rcds.py +1 -1
  43. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/scipy/neldermead.py +3 -3
  44. {xopt-2.3.0 → xopt-2.4.2}/xopt/resources/benchmarking.py +3 -3
  45. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/bayesian/test_bax.py +7 -7
  46. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/bayesian/test_time_dependent_bo.py +15 -0
  47. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/bayesian/test_turbo.py +112 -24
  48. xopt-2.4.2/xopt/tests/generators/ga/test_cnsga.py +125 -0
  49. xopt-2.4.2/xopt.egg-info/PKG-INFO +496 -0
  50. {xopt-2.3.0 → xopt-2.4.2}/xopt.egg-info/SOURCES.txt +59 -39
  51. xopt-2.4.2/xopt.egg-info/requires.txt +30 -0
  52. xopt-2.4.2/xopt.egg-info/top_level.txt +1 -0
  53. xopt-2.3.0/MANIFEST.in +0 -4
  54. xopt-2.3.0/PKG-INFO +0 -258
  55. xopt-2.3.0/requirements.txt +0 -12
  56. xopt-2.3.0/setup.cfg +0 -14
  57. xopt-2.3.0/setup.py +0 -25
  58. xopt-2.3.0/versioneer.py +0 -2123
  59. xopt-2.3.0/xopt/_version.py +0 -21
  60. xopt-2.3.0/xopt.egg-info/requires.txt +0 -12
  61. xopt-2.3.0/xopt.egg-info/top_level.txt +0 -3
  62. {xopt-2.3.0 → xopt-2.4.2}/LICENSE +0 -0
  63. {xopt-2.3.0 → xopt-2.4.2}/benchmarks/__init__.py +0 -0
  64. {xopt-2.3.0 → xopt-2.4.2}/benchmarks/test_mo.py +0 -0
  65. {xopt-2.3.0 → xopt-2.4.2}/xopt/asynchronous.py +0 -0
  66. {xopt-2.3.0 → xopt-2.4.2}/xopt/errors.py +0 -0
  67. {xopt-2.3.0 → xopt-2.4.2}/xopt/evaluator.py +0 -0
  68. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/__init__.py +0 -0
  69. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/base_model.py +0 -0
  70. {xopt-2.3.0/tests → xopt-2.4.2/xopt/generators/bayesian/bax}/__init__.py +0 -0
  71. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/bax/acquisition.py +0 -0
  72. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/bax/visualize.py +0 -0
  73. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/bayesian_exploration.py +0 -0
  74. {xopt-2.3.0/tests/generators → xopt-2.4.2/xopt/generators/bayesian/custom_botorch}/__init__.py +0 -0
  75. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/custom_botorch/constrained_acquisition.py +0 -0
  76. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/custom_botorch/hessian_kernel.py +0 -0
  77. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/custom_botorch/heteroskedastic.py +0 -0
  78. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/custom_botorch/identity.py +0 -0
  79. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/custom_botorch/log_acquisition_function.py +0 -0
  80. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/custom_botorch/multi_fidelity.py +0 -0
  81. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/custom_botorch/proximal.py +0 -0
  82. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/mggpo.py +0 -0
  83. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/mobo.py +0 -0
  84. {xopt-2.3.0/tests/generators/bayesian → xopt-2.4.2/xopt/generators/bayesian/models}/__init__.py +0 -0
  85. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/models/prior_mean.py +0 -0
  86. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/models/standard.py +0 -0
  87. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/models/time_dependent.py +0 -0
  88. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/multi_fidelity.py +0 -0
  89. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/bayesian/objectives.py +0 -0
  90. {xopt-2.3.0/xopt/generators/bayesian/bax → xopt-2.4.2/xopt/generators/es}/__init__.py +0 -0
  91. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/es/extremumseeking.py +0 -0
  92. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/ga/__init__.py +0 -0
  93. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/ga/cnsga.py +0 -0
  94. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/ga/deap_creator.py +0 -0
  95. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/ga/deap_fitness_with_constraints.py +0 -0
  96. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/ga/fitness_with_constraints.py +0 -0
  97. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/random.py +0 -0
  98. {xopt-2.3.0/xopt/generators/bayesian/custom_botorch → xopt-2.4.2/xopt/generators/rcds}/__init__.py +0 -0
  99. {xopt-2.3.0/xopt/generators/bayesian/models → xopt-2.4.2/xopt/generators/scipy}/__init__.py +0 -0
  100. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/scipy/latin_hypercube.py +0 -0
  101. {xopt-2.3.0 → xopt-2.4.2}/xopt/generators/utils.py +0 -0
  102. {xopt-2.3.0 → xopt-2.4.2}/xopt/log.py +0 -0
  103. {xopt-2.3.0/xopt/generators/es → xopt-2.4.2/xopt/mpi}/__init__.py +0 -0
  104. {xopt-2.3.0 → xopt-2.4.2}/xopt/mpi/run.py +0 -0
  105. {xopt-2.3.0 → xopt-2.4.2}/xopt/numerical_optimizer.py +0 -0
  106. {xopt-2.3.0 → xopt-2.4.2}/xopt/pydantic.py +0 -0
  107. {xopt-2.3.0/xopt/generators/rcds → xopt-2.4.2/xopt/resources}/__init__.py +0 -0
  108. {xopt-2.3.0/xopt/generators/scipy → xopt-2.4.2/xopt/resources/test_functions}/__init__.py +0 -0
  109. {xopt-2.3.0 → xopt-2.4.2}/xopt/resources/test_functions/ackley_20.py +0 -0
  110. {xopt-2.3.0 → xopt-2.4.2}/xopt/resources/test_functions/haverly_pooling.py +0 -0
  111. {xopt-2.3.0 → xopt-2.4.2}/xopt/resources/test_functions/modified_tnk.py +0 -0
  112. {xopt-2.3.0 → xopt-2.4.2}/xopt/resources/test_functions/multi_objective.py +0 -0
  113. {xopt-2.3.0 → xopt-2.4.2}/xopt/resources/test_functions/problem.py +0 -0
  114. {xopt-2.3.0 → xopt-2.4.2}/xopt/resources/test_functions/rosenbrock.py +0 -0
  115. {xopt-2.3.0 → xopt-2.4.2}/xopt/resources/test_functions/sinusoid_1d.py +0 -0
  116. {xopt-2.3.0 → xopt-2.4.2}/xopt/resources/test_functions/sphere_100.py +0 -0
  117. {xopt-2.3.0 → xopt-2.4.2}/xopt/resources/test_functions/sphere_20.py +0 -0
  118. {xopt-2.3.0 → xopt-2.4.2}/xopt/resources/test_functions/sphere_50.py +0 -0
  119. {xopt-2.3.0 → xopt-2.4.2}/xopt/resources/test_functions/tnk.py +0 -0
  120. {xopt-2.3.0 → xopt-2.4.2}/xopt/resources/testing.py +0 -0
  121. {xopt-2.3.0/xopt/mpi → xopt-2.4.2/xopt/tests}/__init__.py +0 -0
  122. {xopt-2.3.0/xopt/resources → xopt-2.4.2/xopt/tests/generators}/__init__.py +0 -0
  123. {xopt-2.3.0/xopt/resources/test_functions → xopt-2.4.2/xopt/tests/generators/bayesian}/__init__.py +0 -0
  124. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/bayesian/test_bayesian_exploration.py +0 -0
  125. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/bayesian/test_bayesian_generator.py +0 -0
  126. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/bayesian/test_constraints.py +0 -0
  127. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/bayesian/test_custom_model.py +0 -0
  128. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/bayesian/test_expected_improvement.py +0 -0
  129. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/bayesian/test_hessian_kernel.py +0 -0
  130. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/bayesian/test_high_level.py +0 -0
  131. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/bayesian/test_mggpo.py +0 -0
  132. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/bayesian/test_mobo.py +0 -0
  133. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/bayesian/test_model_constructor.py +0 -0
  134. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/bayesian/test_multi_fidelity.py +0 -0
  135. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/bayesian/test_upper_confidence_bound.py +0 -0
  136. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/bayesian/test_utils.py +0 -0
  137. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/test_extremum_seeking.py +0 -0
  138. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/test_latin_hypercube.py +0 -0
  139. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/test_neldermead.py +0 -0
  140. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/test_random.py +0 -0
  141. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/generators/test_rcds.py +0 -0
  142. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/test_evaluator.py +0 -0
  143. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/test_generator.py +0 -0
  144. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/test_io.py +0 -0
  145. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/test_mpi.py +0 -0
  146. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/test_numerical_optimizer.py +0 -0
  147. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/test_perf.py +0 -0
  148. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/test_pydantic.py +0 -0
  149. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/test_utils.py +0 -0
  150. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/test_vocs.py +0 -0
  151. {xopt-2.3.0 → xopt-2.4.2/xopt}/tests/test_xopt.py +0 -0
  152. {xopt-2.3.0 → xopt-2.4.2}/xopt/utils.py +0 -0
  153. {xopt-2.3.0 → xopt-2.4.2}/xopt/vocs.py +0 -0
  154. {xopt-2.3.0 → xopt-2.4.2}/xopt.egg-info/dependency_links.txt +0 -0
xopt-2.4.2/.flake8 ADDED
@@ -0,0 +1,11 @@
1
+ [flake8]
2
+ extend-ignore = E203
3
+ exclude =
4
+ .git,
5
+ __pycache__,
6
+ build,
7
+ dist,
8
+ versioneer.py,
9
+ xopt/_version.py
10
+ .ipynb_checkpoints
11
+ max-line-length = 115
@@ -0,0 +1,36 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks.git
5
+ rev: v4.6.0
6
+ hooks:
7
+ - id: no-commit-to-branch
8
+ - id: trailing-whitespace
9
+ - id: end-of-file-fixer
10
+ - id: check-ast
11
+ - id: check-case-conflict
12
+ - id: check-json
13
+ - id: check-merge-conflict
14
+ - id: check-symlinks
15
+ - id: check-xml
16
+ - id: check-yaml
17
+ exclude: "^(python/versioneer.py|python/xopt/_version.py)$"
18
+
19
+ - repo: https://github.com/astral-sh/ruff-pre-commit
20
+ rev: v0.5.0
21
+ hooks:
22
+ - id: ruff
23
+ args: [--fix]
24
+ types_or: [python, pyi, jupyter]
25
+ - id: ruff-format
26
+ types_or: [python, pyi, jupyter]
27
+
28
+ - repo: local
29
+ hooks:
30
+ - id: jupyter-notebook-clear-output
31
+ name: jupyter-notebook-jupyter-clear
32
+ files: \.ipynb$
33
+ stages: [commit]
34
+ language: system
35
+ entry: jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace
36
+ exclude: "^.*(TODO|TODO2).ipynb$"
xopt-2.4.2/MANIFEST.in ADDED
@@ -0,0 +1 @@
1
+ include LICENSE
xopt-2.4.2/PKG-INFO ADDED
@@ -0,0 +1,496 @@
1
+ Metadata-Version: 2.1
2
+ Name: xopt
3
+ Version: 2.4.2
4
+ Summary: Flexible optimization of arbitrary problems in Python.
5
+ Author: Christopher Mayes, Ryan Roussel
6
+ License: Apache License
7
+ Version 2.0, January 2004
8
+ http://www.apache.org/licenses/
9
+
10
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
11
+
12
+ 1. Definitions.
13
+
14
+ "License" shall mean the terms and conditions for use, reproduction,
15
+ and distribution as defined by Sections 1 through 9 of this document.
16
+
17
+ "Licensor" shall mean the copyright owner or entity authorized by
18
+ the copyright owner that is granting the License.
19
+
20
+ "Legal Entity" shall mean the union of the acting entity and all
21
+ other entities that control, are controlled by, or are under common
22
+ control with that entity. For the purposes of this definition,
23
+ "control" means (i) the power, direct or indirect, to cause the
24
+ direction or management of such entity, whether by contract or
25
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
26
+ outstanding shares, or (iii) beneficial ownership of such entity.
27
+
28
+ "You" (or "Your") shall mean an individual or Legal Entity
29
+ exercising permissions granted by this License.
30
+
31
+ "Source" form shall mean the preferred form for making modifications,
32
+ including but not limited to software source code, documentation
33
+ source, and configuration files.
34
+
35
+ "Object" form shall mean any form resulting from mechanical
36
+ transformation or translation of a Source form, including but
37
+ not limited to compiled object code, generated documentation,
38
+ and conversions to other media types.
39
+
40
+ "Work" shall mean the work of authorship, whether in Source or
41
+ Object form, made available under the License, as indicated by a
42
+ copyright notice that is included in or attached to the work
43
+ (an example is provided in the Appendix below).
44
+
45
+ "Derivative Works" shall mean any work, whether in Source or Object
46
+ form, that is based on (or derived from) the Work and for which the
47
+ editorial revisions, annotations, elaborations, or other modifications
48
+ represent, as a whole, an original work of authorship. For the purposes
49
+ of this License, Derivative Works shall not include works that remain
50
+ separable from, or merely link (or bind by name) to the interfaces of,
51
+ the Work and Derivative Works thereof.
52
+
53
+ "Contribution" shall mean any work of authorship, including
54
+ the original version of the Work and any modifications or additions
55
+ to that Work or Derivative Works thereof, that is intentionally
56
+ submitted to Licensor for inclusion in the Work by the copyright owner
57
+ or by an individual or Legal Entity authorized to submit on behalf of
58
+ the copyright owner. For the purposes of this definition, "submitted"
59
+ means any form of electronic, verbal, or written communication sent
60
+ to the Licensor or its representatives, including but not limited to
61
+ communication on electronic mailing lists, source code control systems,
62
+ and issue tracking systems that are managed by, or on behalf of, the
63
+ Licensor for the purpose of discussing and improving the Work, but
64
+ excluding communication that is conspicuously marked or otherwise
65
+ designated in writing by the copyright owner as "Not a Contribution."
66
+
67
+ "Contributor" shall mean Licensor and any individual or Legal Entity
68
+ on behalf of whom a Contribution has been received by Licensor and
69
+ subsequently incorporated within the Work.
70
+
71
+ 2. Grant of Copyright License. Subject to the terms and conditions of
72
+ this License, each Contributor hereby grants to You a perpetual,
73
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
74
+ copyright license to reproduce, prepare Derivative Works of,
75
+ publicly display, publicly perform, sublicense, and distribute the
76
+ Work and such Derivative Works in Source or Object form.
77
+
78
+ 3. Grant of Patent License. Subject to the terms and conditions of
79
+ this License, each Contributor hereby grants to You a perpetual,
80
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
81
+ (except as stated in this section) patent license to make, have made,
82
+ use, offer to sell, sell, import, and otherwise transfer the Work,
83
+ where such license applies only to those patent claims licensable
84
+ by such Contributor that are necessarily infringed by their
85
+ Contribution(s) alone or by combination of their Contribution(s)
86
+ with the Work to which such Contribution(s) was submitted. If You
87
+ institute patent litigation against any entity (including a
88
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
89
+ or a Contribution incorporated within the Work constitutes direct
90
+ or contributory patent infringement, then any patent licenses
91
+ granted to You under this License for that Work shall terminate
92
+ as of the date such litigation is filed.
93
+
94
+ 4. Redistribution. You may reproduce and distribute copies of the
95
+ Work or Derivative Works thereof in any medium, with or without
96
+ modifications, and in Source or Object form, provided that You
97
+ meet the following conditions:
98
+
99
+ (a) You must give any other recipients of the Work or
100
+ Derivative Works a copy of this License; and
101
+
102
+ (b) You must cause any modified files to carry prominent notices
103
+ stating that You changed the files; and
104
+
105
+ (c) You must retain, in the Source form of any Derivative Works
106
+ that You distribute, all copyright, patent, trademark, and
107
+ attribution notices from the Source form of the Work,
108
+ excluding those notices that do not pertain to any part of
109
+ the Derivative Works; and
110
+
111
+ (d) If the Work includes a "NOTICE" text file as part of its
112
+ distribution, then any Derivative Works that You distribute must
113
+ include a readable copy of the attribution notices contained
114
+ within such NOTICE file, excluding those notices that do not
115
+ pertain to any part of the Derivative Works, in at least one
116
+ of the following places: within a NOTICE text file distributed
117
+ as part of the Derivative Works; within the Source form or
118
+ documentation, if provided along with the Derivative Works; or,
119
+ within a display generated by the Derivative Works, if and
120
+ wherever such third-party notices normally appear. The contents
121
+ of the NOTICE file are for informational purposes only and
122
+ do not modify the License. You may add Your own attribution
123
+ notices within Derivative Works that You distribute, alongside
124
+ or as an addendum to the NOTICE text from the Work, provided
125
+ that such additional attribution notices cannot be construed
126
+ as modifying the License.
127
+
128
+ You may add Your own copyright statement to Your modifications and
129
+ may provide additional or different license terms and conditions
130
+ for use, reproduction, or distribution of Your modifications, or
131
+ for any such Derivative Works as a whole, provided Your use,
132
+ reproduction, and distribution of the Work otherwise complies with
133
+ the conditions stated in this License.
134
+
135
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
136
+ any Contribution intentionally submitted for inclusion in the Work
137
+ by You to the Licensor shall be under the terms and conditions of
138
+ this License, without any additional terms or conditions.
139
+ Notwithstanding the above, nothing herein shall supersede or modify
140
+ the terms of any separate license agreement you may have executed
141
+ with Licensor regarding such Contributions.
142
+
143
+ 6. Trademarks. This License does not grant permission to use the trade
144
+ names, trademarks, service marks, or product names of the Licensor,
145
+ except as required for reasonable and customary use in describing the
146
+ origin of the Work and reproducing the content of the NOTICE file.
147
+
148
+ 7. Disclaimer of Warranty. Unless required by applicable law or
149
+ agreed to in writing, Licensor provides the Work (and each
150
+ Contributor provides its Contributions) on an "AS IS" BASIS,
151
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
152
+ implied, including, without limitation, any warranties or conditions
153
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
154
+ PARTICULAR PURPOSE. You are solely responsible for determining the
155
+ appropriateness of using or redistributing the Work and assume any
156
+ risks associated with Your exercise of permissions under this License.
157
+
158
+ 8. Limitation of Liability. In no event and under no legal theory,
159
+ whether in tort (including negligence), contract, or otherwise,
160
+ unless required by applicable law (such as deliberate and grossly
161
+ negligent acts) or agreed to in writing, shall any Contributor be
162
+ liable to You for damages, including any direct, indirect, special,
163
+ incidental, or consequential damages of any character arising as a
164
+ result of this License or out of the use or inability to use the
165
+ Work (including but not limited to damages for loss of goodwill,
166
+ work stoppage, computer failure or malfunction, or any and all
167
+ other commercial damages or losses), even if such Contributor
168
+ has been advised of the possibility of such damages.
169
+
170
+ 9. Accepting Warranty or Additional Liability. While redistributing
171
+ the Work or Derivative Works thereof, You may choose to offer,
172
+ and charge a fee for, acceptance of support, warranty, indemnity,
173
+ or other liability obligations and/or rights consistent with this
174
+ License. However, in accepting such obligations, You may act only
175
+ on Your own behalf and on Your sole responsibility, not on behalf
176
+ of any other Contributor, and only if You agree to indemnify,
177
+ defend, and hold each Contributor harmless for any liability
178
+ incurred by, or claims asserted against, such Contributor by reason
179
+ of your accepting any such warranty or additional liability.
180
+
181
+ END OF TERMS AND CONDITIONS
182
+
183
+ APPENDIX: How to apply the Apache License to your work.
184
+
185
+ To apply the Apache License to your work, attach the following
186
+ boilerplate notice, with the fields enclosed by brackets "[]"
187
+ replaced with your own identifying information. (Don't include
188
+ the brackets!) The text should be enclosed in the appropriate
189
+ comment syntax for the file format. We also recommend that a
190
+ file or class name and description of purpose be included on the
191
+ same "printed page" as the copyright notice for easier
192
+ identification within third-party archives.
193
+
194
+ Copyright [yyyy] [name of copyright owner]
195
+
196
+ Licensed under the Apache License, Version 2.0 (the "License");
197
+ you may not use this file except in compliance with the License.
198
+ You may obtain a copy of the License at
199
+
200
+ http://www.apache.org/licenses/LICENSE-2.0
201
+
202
+ Unless required by applicable law or agreed to in writing, software
203
+ distributed under the License is distributed on an "AS IS" BASIS,
204
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205
+ See the License for the specific language governing permissions and
206
+ limitations under the License.
207
+
208
+ Project-URL: Homepage, https://github.com/xopt-org/xopt
209
+ Classifier: Development Status :: 4 - Beta
210
+ Classifier: Natural Language :: English
211
+ Classifier: Programming Language :: Python :: 3
212
+ Classifier: Topic :: Scientific/Engineering
213
+ Requires-Python: >=3.9
214
+ Description-Content-Type: text/markdown
215
+ License-File: LICENSE
216
+ Requires-Dist: deap
217
+ Requires-Dist: numpy
218
+ Requires-Dist: pydantic>=2.3
219
+ Requires-Dist: pyyaml
220
+ Requires-Dist: botorch<=0.10.0,>=0.9.2
221
+ Requires-Dist: scipy>=1.10.1
222
+ Requires-Dist: pandas
223
+ Requires-Dist: ipywidgets
224
+ Requires-Dist: tqdm
225
+ Requires-Dist: orjson
226
+ Requires-Dist: matplotlib
227
+ Provides-Extra: dev
228
+ Requires-Dist: pytest; extra == "dev"
229
+ Requires-Dist: pytest-cov; extra == "dev"
230
+ Requires-Dist: ffmpeg; extra == "dev"
231
+ Requires-Dist: pytest; extra == "dev"
232
+ Requires-Dist: pytest-cov; extra == "dev"
233
+ Requires-Dist: jupyterlab>=3; extra == "dev"
234
+ Requires-Dist: jupyterlab-lsp; extra == "dev"
235
+ Requires-Dist: python-lsp-server; extra == "dev"
236
+ Requires-Dist: pygments; extra == "dev"
237
+ Requires-Dist: dask; extra == "dev"
238
+ Requires-Dist: mpi4py; extra == "dev"
239
+ Provides-Extra: doc
240
+ Requires-Dist: mkdocs; extra == "doc"
241
+ Requires-Dist: mkdocs-jupyter; extra == "doc"
242
+ Requires-Dist: mkdocs-macros-plugin; extra == "doc"
243
+ Requires-Dist: mkdocs-material; extra == "doc"
244
+ Requires-Dist: mkdocstrings; extra == "doc"
245
+ Requires-Dist: mkdocstrings-python; extra == "doc"
246
+
247
+ <div align="center">
248
+ <img src="docs/assets/Xopt-logo.png", width="200">
249
+ </div>
250
+
251
+
252
+
253
+
254
+ Xopt
255
+ ====
256
+
257
+
258
+ | **`Documentation`** |
259
+ |----------------------------------------------------------------------------------------------------------------------------------|
260
+ | [![Documentation](https://img.shields.io/badge/Xopt-documentation-blue.svg)](https://xopt-org.github.io/Xopt/index.html) |
261
+
262
+ | Name | Downloads | Version | Platforms |
263
+ | --- | --- | --- | --- |
264
+ | [![Conda Recipe](https://img.shields.io/badge/recipe-xopt-green.svg)](https://anaconda.org/conda-forge/xopt) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/xopt.svg)](https://anaconda.org/conda-forge/xopt) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/xopt.svg)](https://anaconda.org/conda-forge/xopt) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/xopt.svg)](https://anaconda.org/conda-forge/xopt) |
265
+
266
+
267
+
268
+
269
+ Flexible optimization of arbitrary problems in Python.
270
+
271
+ The goal of this package is to provide advanced algorithmic support for arbitrary
272
+ optimization problems (simulations/control systems) with minimal required coding. Users
273
+ can easily connect
274
+ arbitrary evaluation functions to advanced algorithms with minimal coding with
275
+ support for multi-threaded or MPI-enabled execution.
276
+
277
+ Currenty **Xopt** provides:
278
+
279
+ - Optimization algorithms:
280
+ - Genetic algorithms
281
+ - `cnsga` Continuous NSGA-II with constraints
282
+ - Bayesian optimization (BO) algorithms:
283
+ - `upper_confidence_bound` BO using Upper Confidence Bound acquisition function
284
+ (w/ or w/o constraints, serial or parallel)
285
+ - `expected_improvement` BO using Expected Improvement acquisition function
286
+ (w/ or w/o constraints, serial or parallel)
287
+ - `mobo` Multi-objective BO (w/ or w/o constraints, serial or parallel)
288
+ - `bayesian_exploration` Autonomous function characterization using Bayesian
289
+ Exploration
290
+ - `mggpo` Parallelized hybrid Multi-Generation Multi-Objective Bayesian
291
+ optimization
292
+ - `multi_fidelity` Multi-fidelity single or multi objective optimization
293
+ - `BAX` Bayesian algorithm execution using virtual measurements
294
+ - BO customization:
295
+ - Trust region BO
296
+ - Heteroskedastic noise specification
297
+ - Multiple acquisition function optimization stratigies
298
+ - `extremum_seeking` Extremum seeking time-dependent optimization
299
+ - `rcds` Robust Conjugate Direction Search (RCDS)
300
+ - `neldermead` Nelder-Mead Simplex
301
+ - Sampling algorithms:
302
+ - `random` Uniform random sampling
303
+ - Convenient YAML/JSON based input format
304
+ - Driver programs:
305
+ - `xopt.mpi.run` Parallel MPI execution using this input format
306
+
307
+ Xopt does **not** provide:
308
+ - your custom simulation or experimental measurement via an `evaluate` function.
309
+
310
+
311
+ Installing Xopt
312
+ ===============
313
+
314
+ Installing `xopt` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with:
315
+
316
+ ```shell
317
+ conda config --add channels conda-forge
318
+ ```
319
+
320
+ Once the `conda-forge` channel has been enabled, `xopt` can be installed with:
321
+
322
+ ```shell
323
+ conda install xopt
324
+ ```
325
+
326
+ It is possible to list all of the versions of `xopt` available on your platform with:
327
+
328
+ ```shell
329
+ conda search xopt --channel conda-forge
330
+ ```
331
+
332
+
333
+ Configuring an Xopt run
334
+ ===============
335
+ Xopt runs can be specified via a YAML file or dictonary input. This requires `generator`, `evaluator`, and `vocs` to be specified, along with optional general options such as `max_evaluations`. An example to run a multi-objective optimiation of a user-defined function `my_function` is:
336
+ ```yaml
337
+ generator:
338
+ name: cnsga
339
+ population_size: 64
340
+ population_file: test.csv
341
+ output_path: .
342
+
343
+ evaluator:
344
+ function: my_function
345
+ function_kwargs:
346
+ my_arguments: 42
347
+
348
+ vocs:
349
+ variables:
350
+ x1: [0, 3.14159]
351
+ x2: [0, 3.14159]
352
+ objectives:
353
+ y1: MINIMIZE
354
+ y2: MINIMIZE
355
+ constraints:
356
+ c1: [GREATER_THAN, 0]
357
+ c2: [LESS_THAN, 0.5]
358
+ constants: {a: dummy_constant}
359
+
360
+ max_evaluations: 6400
361
+ ```
362
+
363
+ Xopt can also be used through a simple Python interface.
364
+ ```python
365
+ import math
366
+
367
+ from xopt.vocs import VOCS
368
+ from xopt.evaluator import Evaluator
369
+ from xopt.generators.bayesian import UpperConfidenceBoundGenerator
370
+ from xopt import Xopt
371
+
372
+ # define variables and function objectives
373
+ vocs = VOCS(
374
+ variables={"x": [0, 2 * math.pi]},
375
+ objectives={"f": "MINIMIZE"},
376
+ )
377
+
378
+ # define the function to optimize
379
+ def sin_function(input_dict):
380
+ return {"f": math.sin(input_dict["x"])}
381
+
382
+ # create Xopt evaluator, generator, and Xopt objects
383
+ evaluator = Evaluator(function=sin_function)
384
+ generator = UpperConfidenceBoundGenerator(vocs=vocs)
385
+ X = Xopt(evaluator=evaluator, generator=generator, vocs=vocs)
386
+
387
+ # call X.random_evaluate() to generate + evaluate 3 initial points
388
+ X.random_evaluate(3)
389
+
390
+ # run optimization for 10 steps
391
+ for i in range(10):
392
+ X.step()
393
+
394
+ # view collected data
395
+ print(X.data)
396
+ ```
397
+
398
+ Defining an evaluation function
399
+ ===============
400
+ Xopt can interface with arbitrary evaluate functions (defined in Python) with the
401
+ following form:
402
+ ```python
403
+ def evaluate(inputs: dict) -> dict:
404
+ """ your code here """
405
+ ```
406
+ Evaluate functions must accept a dictionary object that **at least** has the keys
407
+ specified in `variables, constants` and returns a dictionary
408
+ containing **at least** the
409
+ keys contained in `objectives, constraints`. Extra dictionary keys are tracked and
410
+ used in the evaluate function but are not modified by xopt.
411
+
412
+ Using MPI
413
+ ===============
414
+ Example MPI run, with `xopt.yaml` as the only user-defined file:
415
+ ```b
416
+ mpirun -n 64 python -m mpi4py.futures -m xopt.mpi.run xopt.yaml
417
+ ```
418
+
419
+
420
+ Citing Xopt
421
+ ==========
422
+ If you use ```Xopt``` for your research, please consider adding the following
423
+ citation to your publications.
424
+ ```
425
+ R. Roussel., et al., "Xopt: A simplified framework for optimization of accelerator problems using advanced algorithms",
426
+ in Proc. IPAC'23, Venezia.doi:https://doi.org/10.18429/JACoW-14th International Particle Accelerator Conference-THPL164
427
+ ```
428
+
429
+ BibTex entry:
430
+ ```bibtex
431
+ @inproceedings{Xopt,
432
+ title = {Xopt: A simplified framework for optimization of accelerator problems using advanced algorithms},
433
+ author = {R. Roussel and A. Edelen and A. Bartnik and C. Mayes},
434
+ year = 2023,
435
+ month = {05},
436
+ booktitle = {Proc. IPAC'23},
437
+ publisher = {JACoW Publishing, Geneva, Switzerland},
438
+ series = {IPAC'23 - 14th International Particle Accelerator Conference},
439
+ number = 14,
440
+ pages = {4796--4799},
441
+ doi = {doi:10.18429/jacow-ipac2023-thpl164},
442
+ isbn = {978-3-95450-231-8},
443
+ issn = {2673-5490},
444
+ url = {https://indico.jacow.org/event/41/contributions/2556},
445
+ paper = {THPL164},
446
+ venue = {Venezia},
447
+ language = {english}
448
+ }
449
+ ```
450
+
451
+ Particular versions of Xopt can be cited from [Zenodo](https://zenodo.org/record/7983779)
452
+
453
+
454
+ Developers
455
+ ==========
456
+
457
+ Clone this repository with a truncated git history (recommended):
458
+ ```shell
459
+ git clone --depth=1 https://github.com/xopt-org/xopt.git
460
+ ```
461
+
462
+ Or, clone this repository with the full git history (> 970 MB):
463
+ ```shell
464
+ git clone https://github.com/xopt-org/xopt.git
465
+ ```
466
+
467
+ Create an environment `xopt-dev` with all the dependencies:
468
+ ```shell
469
+ conda env create -f environment.yml
470
+ ```
471
+
472
+
473
+ Install as editable:
474
+ ```shell
475
+ conda activate xopt-dev
476
+ pip install --no-dependencies -e .
477
+ ```
478
+
479
+ Install pre-commit hooks:
480
+ ```
481
+ pre-commit install
482
+ ```
483
+
484
+ The pre-commit hooks perform autoformatting and report style-compliance errors.
485
+ * [ufmt](https://pypi.org/project/ufmt/) formats files w.r.t. [black](https://github.com/psf/black) a strict style enforcer, and [μsort](https://usort.readthedocs.io/en/stable/), which sorts imports in Python modules.
486
+ * [flake8](https://flake8.pycqa.org/en/latest/) confirms compliance. Occasionally black misses long-line comments/docstrings and they require manual format.
487
+
488
+ Pre-commit runs the hooks against your files. If the commit fails, correct the reported errors and then re-add the file with `git add my_file.py`.
489
+
490
+ ### VSCode
491
+ The source control integration packaged with VSCode requires additional configuration. Git commands are run in the integrated terminal, which does not inherit the Python interpreter configured with the VSCode project thus breaking the pre-commit hooks. The integration terminal can be configured to use the conda Python environment by including a `.env` file in your project repository:
492
+
493
+ ```
494
+ #!/usr/bin/bash
495
+ source /path/to/xopt-dev/bin/activate
496
+ ```
@@ -11,7 +11,7 @@ Xopt
11
11
 
12
12
  | **`Documentation`** |
13
13
  |----------------------------------------------------------------------------------------------------------------------------------|
14
- | [![Documentation](https://img.shields.io/badge/Xopt-documentation-blue.svg)](https://ChristopherMayes.github.io/Xopt/index.html) |
14
+ | [![Documentation](https://img.shields.io/badge/Xopt-documentation-blue.svg)](https://xopt-org.github.io/Xopt/index.html) |
15
15
 
16
16
  | Name | Downloads | Version | Platforms |
17
17
  | --- | --- | --- | --- |
@@ -22,10 +22,10 @@ Xopt
22
22
 
23
23
  Flexible optimization of arbitrary problems in Python.
24
24
 
25
- The goal of this package is to provide advanced algorithmic support for arbitrary
26
- optimization problems (simulations/control systems) with minimal required coding. Users
27
- can easily connect
28
- arbitrary evaluation functions to advanced algorithms with minimal coding with
25
+ The goal of this package is to provide advanced algorithmic support for arbitrary
26
+ optimization problems (simulations/control systems) with minimal required coding. Users
27
+ can easily connect
28
+ arbitrary evaluation functions to advanced algorithms with minimal coding with
29
29
  support for multi-threaded or MPI-enabled execution.
30
30
 
31
31
  Currenty **Xopt** provides:
@@ -34,14 +34,14 @@ Currenty **Xopt** provides:
34
34
  - Genetic algorithms
35
35
  - `cnsga` Continuous NSGA-II with constraints
36
36
  - Bayesian optimization (BO) algorithms:
37
- - `upper_confidence_bound` BO using Upper Confidence Bound acquisition function
37
+ - `upper_confidence_bound` BO using Upper Confidence Bound acquisition function
38
38
  (w/ or w/o constraints, serial or parallel)
39
- - `expected_improvement` BO using Expected Improvement acquisition function
39
+ - `expected_improvement` BO using Expected Improvement acquisition function
40
40
  (w/ or w/o constraints, serial or parallel)
41
41
  - `mobo` Multi-objective BO (w/ or w/o constraints, serial or parallel)
42
- - `bayesian_exploration` Autonomous function characterization using Bayesian
42
+ - `bayesian_exploration` Autonomous function characterization using Bayesian
43
43
  Exploration
44
- - `mggpo` Parallelized hybrid Multi-Generation Multi-Objective Bayesian
44
+ - `mggpo` Parallelized hybrid Multi-Generation Multi-Objective Bayesian
45
45
  optimization
46
46
  - `multi_fidelity` Multi-fidelity single or multi objective optimization
47
47
  - `BAX` Bayesian algorithm execution using virtual measurements
@@ -58,7 +58,7 @@ Currenty **Xopt** provides:
58
58
  - Driver programs:
59
59
  - `xopt.mpi.run` Parallel MPI execution using this input format
60
60
 
61
- Xopt does **not** provide:
61
+ Xopt does **not** provide:
62
62
  - your custom simulation or experimental measurement via an `evaluate` function.
63
63
 
64
64
 
@@ -103,7 +103,7 @@ vocs:
103
103
  variables:
104
104
  x1: [0, 3.14159]
105
105
  x2: [0, 3.14159]
106
- objectives:
106
+ objectives:
107
107
  y1: MINIMIZE
108
108
  y2: MINIMIZE
109
109
  constraints:
@@ -111,7 +111,7 @@ vocs:
111
111
  c2: [LESS_THAN, 0.5]
112
112
  constants: {a: dummy_constant}
113
113
 
114
- max_evaluations: 6400
114
+ max_evaluations: 6400
115
115
  ```
116
116
 
117
117
  Xopt can also be used through a simple Python interface.
@@ -151,16 +151,16 @@ print(X.data)
151
151
 
152
152
  Defining an evaluation function
153
153
  ===============
154
- Xopt can interface with arbitrary evaluate functions (defined in Python) with the
154
+ Xopt can interface with arbitrary evaluate functions (defined in Python) with the
155
155
  following form:
156
156
  ```python
157
157
  def evaluate(inputs: dict) -> dict:
158
158
  """ your code here """
159
159
  ```
160
- Evaluate functions must accept a dictionary object that **at least** has the keys
161
- specified in `variables, constants` and returns a dictionary
162
- containing **at least** the
163
- keys contained in `objectives, constraints`. Extra dictionary keys are tracked and
160
+ Evaluate functions must accept a dictionary object that **at least** has the keys
161
+ specified in `variables, constants` and returns a dictionary
162
+ containing **at least** the
163
+ keys contained in `objectives, constraints`. Extra dictionary keys are tracked and
164
164
  used in the evaluate function but are not modified by xopt.
165
165
 
166
166
  Using MPI
@@ -173,10 +173,10 @@ mpirun -n 64 python -m mpi4py.futures -m xopt.mpi.run xopt.yaml
173
173
 
174
174
  Citing Xopt
175
175
  ==========
176
- If you use ```Xopt``` for your research, please consider adding the following
176
+ If you use ```Xopt``` for your research, please consider adding the following
177
177
  citation to your publications.
178
178
  ```
179
- R. Roussel., et al., "Xopt: A simplified framework for optimization of accelerator problems using advanced algorithms",
179
+ R. Roussel., et al., "Xopt: A simplified framework for optimization of accelerator problems using advanced algorithms",
180
180
  in Proc. IPAC'23, Venezia.doi:https://doi.org/10.18429/JACoW-14th International Particle Accelerator Conference-THPL164
181
181
  ```
182
182
 
@@ -210,12 +210,12 @@ Developers
210
210
 
211
211
  Clone this repository with a truncated git history (recommended):
212
212
  ```shell
213
- git clone --depth=1 https://github.com/ChristopherMayes/Xopt.git
213
+ git clone --depth=1 https://github.com/xopt-org/xopt.git
214
214
  ```
215
215
 
216
216
  Or, clone this repository with the full git history (> 970 MB):
217
217
  ```shell
218
- git clone https://github.com/ChristopherMayes/Xopt.git
218
+ git clone https://github.com/xopt-org/xopt.git
219
219
  ```
220
220
 
221
221
  Create an environment `xopt-dev` with all the dependencies:
@@ -235,7 +235,7 @@ Install pre-commit hooks:
235
235
  pre-commit install
236
236
  ```
237
237
 
238
- The pre-commit hooks perform autoformatting and report style-compliance errors.
238
+ The pre-commit hooks perform autoformatting and report style-compliance errors.
239
239
  * [ufmt](https://pypi.org/project/ufmt/) formats files w.r.t. [black](https://github.com/psf/black) a strict style enforcer, and [μsort](https://usort.readthedocs.io/en/stable/), which sorts imports in Python modules.
240
240
  * [flake8](https://flake8.pycqa.org/en/latest/) confirms compliance. Occasionally black misses long-line comments/docstrings and they require manual format.
241
241
 
@@ -245,6 +245,6 @@ Pre-commit runs the hooks against your files. If the commit fails, correct the r
245
245
  The source control integration packaged with VSCode requires additional configuration. Git commands are run in the integrated terminal, which does not inherit the Python interpreter configured with the VSCode project thus breaking the pre-commit hooks. The integration terminal can be configured to use the conda Python environment by including a `.env` file in your project repository:
246
246
 
247
247
  ```
248
- #!/usr/bin/bash
248
+ #!/usr/bin/bash
249
249
  source /path/to/xopt-dev/bin/activate
250
- ```
250
+ ```