moospread 0.1.0__py3-none-any.whl → 0.1.1__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,141 @@
1
+ Metadata-Version: 2.4
2
+ Name: moospread
3
+ Version: 0.1.1
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="https://github.com/safe-autonomous-systems/moo-spread/raw/main/images/logo_well_spread.png"
35
+ alt="moospread logo" width="300">
36
+ </p>
37
+ <!--
38
+ <p align="center">
39
+ <a href="https://pypi.org/project/moospread/"><img src="https://img.shields.io/pypi/v/advermorel.svg" alt="PyPI version"></a>
40
+ </p>
41
+ -->
42
+
43
+ # SPREAD: Sampling-based Pareto front Refinement via Efficient Adaptive Diffusion
44
+
45
+ > 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.
46
+
47
+ ## 🚀 Getting Started
48
+
49
+ ### Installation
50
+
51
+ ```python
52
+ conda create -n moospread python=3.11
53
+ conda activate moospread
54
+ pip install moospread
55
+ # To install CUDA‐enabled PyTorch, run (or visit: https://pytorch.org/get-started/locally/):
56
+ pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
57
+ ```
58
+ Or, to install the latest code from GitHub:
59
+ ```python
60
+ conda create -n moospread python=3.11
61
+ conda activate moospread
62
+ git clone https://github.com/safe-autonomous-systems/moo-spread.git
63
+ cd moo-spread
64
+ pip install -e .
65
+ # To install CUDA‐enabled PyTorch, run (or visit: https://pytorch.org/get-started/locally/):
66
+ pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
67
+ ```
68
+ ### Basic usage
69
+ This example shows how to solve a standard multi-objective optimization benchmark (ZDT2) using the **SPREAD** solver.
70
+
71
+ ```python
72
+ import numpy as np
73
+ import torch
74
+
75
+ # Import the SPREAD solver
76
+ from moospread import SPREAD
77
+
78
+ # Import a test problem
79
+ from moospread.tasks import ZDT2
80
+
81
+ # Define the problem
82
+ n_var = 30
83
+ problem = ZDT2(n_var=n_var)
84
+
85
+ # Initialize the SPREAD solver
86
+ solver = SPREAD(
87
+ problem,
88
+ data_size=10000,
89
+ timesteps=5000,
90
+ num_epochs=1000,
91
+ train_tol=100,
92
+ num_blocks=3,
93
+ validation_split=0.1,
94
+ mode="online",
95
+ seed=2026,
96
+ verbose=True
97
+ )
98
+
99
+ # Solve the problem
100
+ results = solver.solve(
101
+ num_points_sample=200,
102
+ strict_guidance=False,
103
+ rho_scale_gamma=0.9,
104
+ nu_t=10.0,
105
+ eta_init=0.9,
106
+ num_inner_steps=10,
107
+ lr_inner=0.9,
108
+ free_initial_h=True,
109
+ use_sigma_rep=False,
110
+ kernel_sigma_rep=0.01,
111
+ iterative_plot=True,
112
+ plot_period=10,
113
+ max_backtracks=25,
114
+ save_results=True,
115
+ samples_store_path="./samples_dir/",
116
+ images_store_path="./images_dir/"
117
+ )
118
+ ```
119
+
120
+ 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.
121
+
122
+ ---
123
+
124
+ <!--
125
+ ### 📚 Next steps
126
+
127
+ For more advanced examples (offline mode, Bayesian mode, custom problems), see the full [documentation](https://moospread.readthedocs.io/en/latest/).
128
+ -->
129
+
130
+ ## Citation
131
+ If you find `moospread` useful in your research, please consider citing:
132
+ ```
133
+ @inproceedings{
134
+ hotegni2026spread,
135
+ title={{SPREAD}: Sampling-based Pareto front Refinement via Efficient Adaptive Diffusion},
136
+ author={Hotegni, Sedjro Salomon and Peitz, Sebastian},
137
+ booktitle={The Fourteenth International Conference on Learning Representations},
138
+ year={2026},
139
+ url={https://openreview.net/forum?id=4731mIqv89}
140
+ }
141
+ ```
@@ -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.1.dist-info/licenses/LICENSE,sha256=YwtV5PRo6WMw5CWQMD728fSF8cWEKKfwOhek37Yi1so,1079
60
+ moospread-0.1.1.dist-info/METADATA,sha256=-7JBHPht8mrI4_CbpCenE81_NGKot8SG-OBdDhVtoTk,5548
61
+ moospread-0.1.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
62
+ moospread-0.1.1.dist-info/top_level.txt,sha256=LWi5kIahDQRNXNkx55T-gefn09Bgcq8SoCxp72S-7x0,10
63
+ moospread-0.1.1.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
-