DeDe is a general, scalable, and theoretically grounded optimization framework that accelerates large-scale resource allocation problems through a decouple-and-decompose approach.
Getting started
Hardware requirements
- Linux OS
- A multi-core CPU instance
Dependencies
- Python >= 3.8
g++(required bycvxpy)- (optional) install
pytestwithpip install -U pytest
Installation
We have made DeDe available as a PyPI package! You can simply install it using pip:
pip install dede
- We recommend creating a Python virtual environment (e.g., venv or Conda) before installation.
Code structure
.
├── dede/ # core source code
├── tests/ # test suite
│ └── test_dede.py
└── examples/ # example use cases
├── traffic_engineering/
├── cluster_scheduling/
└── load_balancing/
Using DeDe
DeDe adopts a familiar interface from cvxpy, e.g., Variable(.), Minimize(.).
Key differences in DeDe:
- DeDe requires specifying separate
resource_constraintsanddemand_constraintswhen constructing a problem. - The
solve(.)method includes additional parameters:enable_dede: enables DeDe ifTrue; defaults tocvxpyifFalse.num_cpus: number of CPU cores (defaults to all available cores).rho: ADMM parameter.num_iter: maximum number of iterations; if not specified, DeDe stops if the accuracy improvement falls below 1%.
Toy examples
A toy example for resource allocation with DeDe is as follows:
import dede as dd
N, M = 100, 100
# Create allocation variables
x = dd.Variable((N, M), nonneg=True)
# Create the constraints
resource_constraints = [x[i,:].sum() >= i for i in range(N)]
demand_constraints = [x[:,j].sum() <= j for j in range(M)]
# Create an objective
objective = dd.Minimize(x.sum())
# Construct the problem
prob = dd.Problem(objective, resource_constraints, demand_constraints)
# Solve the problem with DeDe on 4 CPU cores
print(prob.solve(num_cpus=4, solver=dd.ECOS))
Another toy example is provided in tests/test_dede.py. To test these examples quickly, from the project root directory, run
./tests/test_dede.py
or, if pytest is installed:
pytest
Example output screenshots are provided in the assets folder.
Example use cases of DeDe
We provide three example applications of DeDe:
- Traffic engineering: a network flow optimization problem.
- Cluster scheduling: a resource allocation problem in cluster computing.
- Load balancing: a query balancing problem in distributed stores.
Please refer to examples/README.md for details.
Citation
If you use DeDe in your research, please cite our paper:
@inproceedings{dede,
title={{Decouple and Decompose: Scaling Resource Allocation with DeDe}},
author={Xu, Zhiying and Yu, Minlan and Yan, Francis Y.},
booktitle={Proceedings of the USENIX OSDI 2025 Conference},
month=jul,
year={2025}
}
Metadata
Release files for dede 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dede-0.1.6.tar.gz | 12.5 kB | Without provenance | Details for dede-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dede-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for dede-0.1.6-py3-none-any.whl |
Total release size: 24.0 kB
Release files / dede-0.1.6.tar.gz
| Download URL | dede-0.1.6.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95672377253b369a37f2b1d132edfc483dad64972ac573cfec53a5711ecf1baf
|
|
BLAKE2b-256 checksum How to use checksums |
575b160297cff9743af4fd3d551a638cc5c1eee705f18b8874ddeb6ce19b4215
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.4
|
Release files / dede-0.1.6-py3-none-any.whl
| Download URL | dede-0.1.6-py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5900f678fcbfced134fa87539949b19489bf4c23dddaa9fab0d351fa8ef1a154
|
|
BLAKE2b-256 checksum How to use checksums |
74c34f3a6c01c35e2011be822bb2899ec03df4f1507bc90e475e5431685f8ac1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.4
|
Security for dede 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.