moospread 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl

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.
@@ -0,0 +1,158 @@
1
+ Metadata-Version: 2.4
2
+ Name: moospread
3
+ Version: 0.1.2
4
+ Summary: Sampling-based Pareto front Refinement via Efficient Adaptive Diffusion
5
+ Author-email: Sedjro Salomon Hotegni <salomon.hotegni@aims.ac.rw>
6
+ Maintainer-email: Sedjro Salomon Hotegni <salomon.hotegni@tu-dortmund.de>
7
+ License: MIT License
8
+
9
+ Copyright (c) 2026 Sedjro Salomon Hotegni
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17
+
18
+ Project-URL: bugs, https://github.com/safe-autonomous-systems/moo-spread/issues
19
+ Project-URL: changelog, https://github.com/safe-autonomous-systems/moo-spread/blob/main/changelog.md
20
+ Project-URL: Homepage, https://github.com/safe-autonomous-systems/moo-spread
21
+ Requires-Python: >=3.8
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: numpy>=1.24
25
+ Requires-Dist: scipy>=1.10
26
+ Requires-Dist: scikit-learn>=1.3
27
+ Requires-Dist: matplotlib>=3.7
28
+ Requires-Dist: pandas>=2.0
29
+ Requires-Dist: pytz
30
+ Requires-Dist: PyYAML>=6.0
31
+ Requires-Dist: tqdm>=4.66
32
+ Requires-Dist: cvxopt>=1.3.2
33
+ Requires-Dist: pymoo>=0.5
34
+ Requires-Dist: torch>=2.2
35
+ Requires-Dist: torchvision
36
+ Requires-Dist: torchaudio
37
+ Requires-Dist: gpytorch>=1.10
38
+ Requires-Dist: botorch>=0.8.5
39
+ Requires-Dist: pyro-ppl>=1.9.1
40
+ Provides-Extra: dev
41
+ Requires-Dist: pytest; extra == "dev"
42
+ Requires-Dist: ruff; extra == "dev"
43
+ Requires-Dist: build; extra == "dev"
44
+ Requires-Dist: twine; extra == "dev"
45
+ Provides-Extra: plot
46
+ Requires-Dist: seaborn>=0.13; extra == "plot"
47
+ Provides-Extra: config
48
+ Requires-Dist: hydra-core>=1.3.2; extra == "config"
49
+ Requires-Dist: omegaconf>=2.3.0; extra == "config"
50
+ Provides-Extra: tracking
51
+ Requires-Dist: wandb>=0.20; extra == "tracking"
52
+ Dynamic: license-file
53
+
54
+ <p align="center">
55
+ <img src="https://github.com/safe-autonomous-systems/moo-spread/raw/main/images/logo_well_spread.png"
56
+ alt="moospread logo" width="300">
57
+ </p>
58
+ <!--
59
+ <p align="center">
60
+ <a href="https://pypi.org/project/moospread/"><img src="https://img.shields.io/pypi/v/advermorel.svg" alt="PyPI version"></a>
61
+ </p>
62
+ -->
63
+
64
+ # SPREAD: Sampling-based Pareto front Refinement via Efficient Adaptive Diffusion
65
+
66
+ > SPREAD is a novel sampling-based approach for multi-objective optimization that leverages diffusion models to efficiently refine and generate well-spread Pareto front approximations. It combines the expressiveness of diffusion models with multi-objective optimization principles to achieve both high convergence to the Pareto front and excellent diversity across the objective space. SPREAD demonstrates competitive performance against state-of-the-art methods while providing a flexible framework for different optimization contexts.
67
+
68
+ ## 🚀 Getting Started
69
+
70
+ ### Installation
71
+
72
+ ```python
73
+ conda create -n moospread python=3.11
74
+ conda activate moospread
75
+ pip install moospread
76
+ ```
77
+ Or, to install the latest code from GitHub:
78
+ ```python
79
+ conda create -n moospread python=3.11
80
+ conda activate moospread
81
+ git clone https://github.com/safe-autonomous-systems/moo-spread.git
82
+ cd moo-spread
83
+ pip install -e .
84
+ ```
85
+ ### Basic usage
86
+ This example shows how to solve a standard multi-objective optimization benchmark (ZDT2) using the **SPREAD** solver.
87
+
88
+ ```python
89
+ import numpy as np
90
+ import torch
91
+
92
+ # Import the SPREAD solver
93
+ from moospread import SPREAD
94
+
95
+ # Import a test problem
96
+ from moospread.tasks import ZDT2
97
+
98
+ # Define the problem
99
+ n_var = 30
100
+ problem = ZDT2(n_var=n_var)
101
+
102
+ # Initialize the SPREAD solver
103
+ solver = SPREAD(
104
+ problem,
105
+ data_size=10000,
106
+ timesteps=5000,
107
+ num_epochs=1000,
108
+ train_tol=100,
109
+ num_blocks=3,
110
+ validation_split=0.1,
111
+ mode="online",
112
+ seed=2026,
113
+ verbose=True
114
+ )
115
+
116
+ # Solve the problem
117
+ results = solver.solve(
118
+ num_points_sample=200,
119
+ strict_guidance=False,
120
+ rho_scale_gamma=0.9,
121
+ nu_t=10.0,
122
+ eta_init=0.9,
123
+ num_inner_steps=10,
124
+ lr_inner=0.9,
125
+ free_initial_h=True,
126
+ use_sigma_rep=False,
127
+ kernel_sigma_rep=0.01,
128
+ iterative_plot=True,
129
+ plot_period=10,
130
+ max_backtracks=25,
131
+ save_results=True,
132
+ samples_store_path="./samples_dir/",
133
+ images_store_path="./images_dir/"
134
+ )
135
+ ```
136
+
137
+ This will train a diffusion-based multi-objective solver, approximate the Pareto front of the ZDT2 problem, and store generated samples and plots in the specified directories.
138
+
139
+ ---
140
+
141
+ <!--
142
+ ### 📚 Next steps
143
+
144
+ For more advanced examples (offline mode, Bayesian mode, custom problems), see the full [documentation](https://moospread.readthedocs.io/en/latest/).
145
+ -->
146
+
147
+ ## Citation
148
+ If you find `moospread` useful in your research, please consider citing:
149
+ ```
150
+ @inproceedings{
151
+ hotegni2026spread,
152
+ title={{SPREAD}: Sampling-based Pareto front Refinement via Efficient Adaptive Diffusion},
153
+ author={Hotegni, Sedjro Salomon and Peitz, Sebastian},
154
+ booktitle={The Fourteenth International Conference on Learning Representations},
155
+ year={2026},
156
+ url={https://openreview.net/forum?id=4731mIqv89}
157
+ }
158
+ ```
@@ -56,8 +56,8 @@ moospread/utils/mobo_utils/mobo/surrogate_model/thompson_sampling.py,sha256=Nmp6
56
56
  moospread/utils/offline_utils/__init__.py,sha256=MJC-fqvQnbQ0T_wjCw_QK8nKo_xpQxh0buq91fxYjFY,742
57
57
  moospread/utils/offline_utils/handle_task.py,sha256=VJjcWZC5AoPm42YN_SKgSpcyHtKBAgXgWwSFU0-Ehis,7586
58
58
  moospread/utils/offline_utils/proxies.py,sha256=DPBykB8l1XJmT5QQCAQrgMZz-8FiGEiNwN0bBdYJIaY,11218
59
- moospread-0.1.0.dist-info/licenses/LICENSE,sha256=YwtV5PRo6WMw5CWQMD728fSF8cWEKKfwOhek37Yi1so,1079
60
- moospread-0.1.0.dist-info/METADATA,sha256=4M1Tp9DjNbkMtS6hW1W4peAXAtYACmR7LmYtoYgE1n0,4005
61
- moospread-0.1.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
62
- moospread-0.1.0.dist-info/top_level.txt,sha256=LWi5kIahDQRNXNkx55T-gefn09Bgcq8SoCxp72S-7x0,10
63
- moospread-0.1.0.dist-info/RECORD,,
59
+ moospread-0.1.2.dist-info/licenses/LICENSE,sha256=YwtV5PRo6WMw5CWQMD728fSF8cWEKKfwOhek37Yi1so,1079
60
+ moospread-0.1.2.dist-info/METADATA,sha256=wzYcnaPd_T-vgO7vsUS1vgIRMr4uNyX4bcbrfdDoSGM,5839
61
+ moospread-0.1.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
62
+ moospread-0.1.2.dist-info/top_level.txt,sha256=LWi5kIahDQRNXNkx55T-gefn09Bgcq8SoCxp72S-7x0,10
63
+ moospread-0.1.2.dist-info/RECORD,,
@@ -1,75 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: moospread
3
- Version: 0.1.0
4
- Summary: Sampling-based Pareto front Refinement via Efficient Adaptive Diffusion
5
- Author-email: Sedjro Salomon Hotegni <salomon.hotegni@aims.ac.rw>
6
- Maintainer-email: Sedjro Salomon Hotegni <salomon.hotegni@tu-dortmund.de>
7
- License: MIT License
8
-
9
- Copyright (c) 2026 Sedjro Salomon Hotegni
10
-
11
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17
-
18
- Project-URL: bugs, https://github.com/safe-autonomous-systems/moo-spread/issues
19
- Project-URL: changelog, https://github.com/safe-autonomous-systems/moo-spread/blob/main/changelog.md
20
- Project-URL: Homepage, https://github.com/safe-autonomous-systems/moo-spread
21
- Requires-Python: >=3.8
22
- Description-Content-Type: text/markdown
23
- License-File: LICENSE
24
- Requires-Dist: numpy
25
- Requires-Dist: torch
26
- Provides-Extra: dev
27
- Requires-Dist: coverage; extra == "dev"
28
- Requires-Dist: mypy; extra == "dev"
29
- Requires-Dist: pytest; extra == "dev"
30
- Requires-Dist: ruff; extra == "dev"
31
- Dynamic: license-file
32
-
33
- <p align="center">
34
- <img src="/images/logo_well_spread.png" style="width: 30%; height: auto;">
35
- </p>
36
-
37
- # SPREAD: Sampling-based Pareto front Refinement via Efficient Adaptive Diffusion
38
-
39
- > SPREAD is a novel sampling-based approach for multi-objective optimization that leverages diffusion models to efficiently refine and generate well-spread Pareto front approximations. It combines the expressiveness of diffusion models with multi-objective optimization principles to achieve both high convergence to the Pareto front and excellent diversity across the objective space. SPREAD demonstrates competitive performance against state-of-the-art methods while providing a flexible framework for different optimization contexts.
40
-
41
- ### 🔬 Experiments
42
-
43
- All experiment code is contained in the `/experiments` directory:
44
-
45
- * **Online setting:** `/experiments/spread/`
46
- * **Offline setting:** `/experiments/spread_offline/`
47
- * **Bayesian setting:** `/experiments/spread_bayesian/`
48
-
49
- The following Jupyter notebooks reproduce the plots shown in our paper:
50
-
51
- * `/experiments/spread/notebook_online_spread.ipynb`
52
- * `/experiments/spread_bayesian/notebook_bayesian_spread.ipynb`
53
-
54
- ### ⚙️ Environment Setup
55
-
56
- Each experiment setting comes with its own environment file located in the corresponding folder:
57
-
58
- - Online setting: `experiments/spread/spread.yml`
59
- - Offline setting: `experiments/spread_offline/spread_off.yml`
60
- - Bayesian setting: `experiments/spread_bayesian/spread_bay.yml`
61
-
62
- To create the environment for a given setting, run:
63
- ```bash
64
- conda env create -f experiments/<folder>/<env_name>.yml
65
- conda activate <env_name>
66
- ```
67
- For example, to run the online experiments:
68
- ```bash
69
- conda env create -f experiments/spread/spread.yml
70
- conda activate spread
71
- ```
72
- The offline experiments require installing **Off-MOO-Bench** from the authors’ public repository: https://github.com/lamda-bbo/offline-moo. The datasets should be downloaded into the folder: `experiments/spread_offline/offline_moo/data/`.
73
-
74
-
75
-