Skip to content

Commit 3d37995

Browse files
authored
Merge pull request #113 from PerformanceEstimation/devel/last_call_for_functions
Additional classes + examples // fix workflows incorporated
2 parents 8d6d9f5 + dd321da commit 3d37995

148 files changed

Lines changed: 4277 additions & 1025 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/execute_notebook.yaml

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,40 +19,44 @@ on:
1919

2020
jobs:
2121
linux:
22-
2322
runs-on: ubuntu-latest
2423
if: "!contains(github.event.head_commit.message, 'no ci')"
2524
strategy:
2625
max-parallel: 5
2726
matrix:
2827
os: [ubuntu-latest]
29-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
28+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
3029

3130
steps:
32-
- uses: actions/checkout@v1
33-
- name: Set up Python ${{ matrix.python-version }}
34-
uses: actions/setup-python@v1
35-
with:
36-
python-version: ${{ matrix.python-version }}
37-
- name: Install dependencies
38-
run: |
39-
python -m pip install --upgrade pip
40-
pip install lxml_html_clean
41-
pip install -r requirements.txt
42-
pip install mosek
43-
- name: Update version in setup.py
44-
run: >-
45-
sed -i "s/{{VERSION_PLACEHOLDER}}/0.0.0/g" setup.py
46-
- name: Install PEPit
47-
run: |
48-
pip install -e .
49-
- uses: yaananth/run-notebook@v2
50-
env:
51-
MOSEKLM_LICENSE_FILE: ${{ secrets.MSK_LICENSE }}
52-
RUNNER: ${{ toJson(runner) }}
53-
SECRETS: ${{ toJson(secrets) }}
54-
GITHUB: ${{ toJson(github) }}
55-
with:
56-
notebook: "ressources/demo/PEPit_demo.ipynb"
57-
isReport: False
58-
poll: True
31+
- uses: actions/checkout@v1
32+
33+
- name: Set up Python ${{ matrix.python-version }}
34+
uses: actions/setup-python@v4
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
38+
- name: Install dependencies
39+
run: |
40+
python -m pip install --upgrade pip
41+
pip install lxml_html_clean
42+
pip install -r requirements.txt
43+
pip install mosek
44+
45+
- name: Update version in setup.py
46+
run: sed -i "s/{{VERSION_PLACEHOLDER}}/0.0.0/g" setup.py
47+
48+
- name: Install PEPit
49+
run: pip install -e .
50+
51+
- name: Install notebook runner deps (papermill etc.)
52+
run: |
53+
pip install papermill ipykernel nbformat nbconvert
54+
55+
- name: Run demo notebook with papermill
56+
env:
57+
MOSEKLM_LICENSE_FILE: ${{ secrets.MSK_LICENSE }}
58+
RUNNER: ${{ toJson(runner) }}
59+
SECRETS: ${{ toJson(secrets) }}
60+
GITHUB: ${{ toJson(github) }}
61+
run: |
62+
papermill ressources/demo/PEPit_demo.ipynb output.ipynb

.github/workflows/tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
strategy:
2828
max-parallel: 5
2929
matrix:
30-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
30+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
3131

3232
steps:
3333
- uses: actions/checkout@v1
@@ -65,7 +65,7 @@ jobs:
6565
strategy:
6666
max-parallel: 5
6767
matrix:
68-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
68+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
6969

7070
steps:
7171
- uses: actions/checkout@v1
@@ -98,7 +98,7 @@ jobs:
9898
strategy:
9999
max-parallel: 5
100100
matrix:
101-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
101+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
102102

103103
steps:
104104
- uses: actions/checkout@v1

PEPit/examples/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@
1010
'low_dimensional_worst_cases_scenarios',
1111
'tutorials',
1212
'continuous_time_models',
13+
'online_learning',
1314
]

PEPit/examples/adaptive_methods/polyak_steps_in_distance_to_optimum.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,16 @@ def wc_polyak_steps_in_distance_to_optimum(L, mu, gamma, wrapper="cvxpy", solver
8686
(PEPit) Setting up the problem: additional constraints for 0 function(s)
8787
(PEPit) Compiling SDP
8888
(PEPit) Calling SDP solver
89-
(PEPit) Solver status: optimal (wrapper:cvxpy, solver: MOSEK); optimal value: 0.6694214876445734
89+
(PEPit) Solver status: optimal (wrapper:cvxpy, solver: MOSEK); optimal value: 0.6694214876445957
9090
(PEPit) Primal feasibility check:
9191
The solver found a Gram matrix that is positive semi-definite
92-
All the primal scalar constraints are verified up to an error of 1.765730096858764e-11
92+
All the primal scalar constraints are verified up to an error of 1.7665928615795412e-11
9393
(PEPit) Dual feasibility check:
9494
The solver found a residual matrix that is positive semi-definite
9595
All the dual scalar values associated with inequality constraints are nonnegative
96-
(PEPit) The worst-case guarantee proof is perfectly reconstituted up to an error of 3.680247484013155e-10
97-
(PEPit) Final upper bound (dual): 0.6694214876573649 and lower bound (primal example): 0.6694214876445734
98-
(PEPit) Duality gap: absolute: 1.2791434578218741e-11 and relative: 1.91081923934451e-11
96+
(PEPit) The worst-case guarantee proof is perfectly reconstituted up to an error of 3.682795799602065e-10
97+
(PEPit) Final upper bound (dual): 0.6694214876573941 and lower bound (primal example): 0.6694214876445957
98+
(PEPit) Duality gap: absolute: 1.2798317960971417e-11 and relative: 1.911847497755585e-11
9999
*** Example file: worst-case performance of Polyak steps ***
100100
PEPit guarantee: ||x_1 - x_*||^2 <= 0.669421 ||x_0 - x_*||^2
101101
Theoretical guarantee: ||x_1 - x_*||^2 <= 0.669421 ||x_0 - x_*||^2

PEPit/examples/adaptive_methods/polyak_steps_in_function_value.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,16 @@ def wc_polyak_steps_in_function_value(L, mu, gamma, wrapper="cvxpy", solver=None
8686
(PEPit) Setting up the problem: additional constraints for 0 function(s)
8787
(PEPit) Compiling SDP
8888
(PEPit) Calling SDP solver
89-
(PEPit) Solver status: optimal (wrapper:cvxpy, solver: MOSEK); optimal value: 0.6694214253294206
89+
(PEPit) Solver status: optimal (wrapper:cvxpy, solver: MOSEK); optimal value: 0.669421425329469
9090
(PEPit) Primal feasibility check:
91-
The solver found a Gram matrix that is positive semi-definite up to an error of 2.474995615842516e-09
92-
All the primal scalar constraints are verified up to an error of 1.1975611058367974e-09
91+
The solver found a Gram matrix that is positive semi-definite up to an error of 2.4750111811639e-09
92+
All the primal scalar constraints are verified up to an error of 1.1975687108645161e-09
9393
(PEPit) Dual feasibility check:
9494
The solver found a residual matrix that is positive semi-definite
9595
All the dual scalar values associated with inequality constraints are nonnegative
96-
(PEPit) The worst-case guarantee proof is perfectly reconstituted up to an error of 6.514273074953545e-08
97-
(PEPit) Final upper bound (dual): 0.6694214228930617 and lower bound (primal example): 0.6694214253294206
98-
(PEPit) Duality gap: absolute: -2.4363588924103396e-09 and relative: -3.6394994247628294e-09
96+
(PEPit) The worst-case guarantee proof is perfectly reconstituted up to an error of 6.514349882625909e-08
97+
(PEPit) Final upper bound (dual): 0.6694214228931324 and lower bound (primal example): 0.669421425329469
98+
(PEPit) Duality gap: absolute: -2.4363365769275447e-09 and relative: -3.6394660892851664e-09
9999
*** Example file: worst-case performance of Polyak steps ***
100100
PEPit guarantee: f(x_1) - f_* <= 0.669421 (f(x_0) - f_*)
101101
Theoretical guarantee: f(x_1) - f_* <= 0.669421 (f(x_0) - f_*)

PEPit/examples/composite_convex_minimization/accelerated_douglas_rachford_splitting.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,16 @@ def wc_accelerated_douglas_rachford_splitting(mu, L, alpha, n, wrapper="cvxpy",
9292
(PEPit) Setting up the problem: additional constraints for 0 function(s)
9393
(PEPit) Compiling SDP
9494
(PEPit) Calling SDP solver
95-
(PEPit) Solver status: optimal (wrapper:cvxpy, solver: MOSEK); optimal value: 0.192914822762597
95+
(PEPit) Solver status: optimal (wrapper:cvxpy, solver: MOSEK); optimal value: 0.19291482276257793
9696
(PEPit) Primal feasibility check:
97-
The solver found a Gram matrix that is positive semi-definite up to an error of 6.655442687317297e-09
98-
All the primal scalar constraints are verified up to an error of 1.4452059383419924e-08
97+
The solver found a Gram matrix that is positive semi-definite up to an error of 6.6554381338528585e-09
98+
All the primal scalar constraints are verified up to an error of 1.4452049501567643e-08
9999
(PEPit) Dual feasibility check:
100100
The solver found a residual matrix that is positive semi-definite
101101
All the dual scalar values associated with inequality constraints are nonnegative
102-
(PEPit) The worst-case guarantee proof is perfectly reconstituted up to an error of 7.332087161994639e-08
103-
(PEPit) Final upper bound (dual): 0.19291482672195612 and lower bound (primal example): 0.192914822762597
104-
(PEPit) Duality gap: absolute: 3.959359118343997e-09 and relative: 2.0523871943300208e-08
102+
(PEPit) The worst-case guarantee proof is perfectly reconstituted up to an error of 7.332184313444333e-08
103+
(PEPit) Final upper bound (dual): 0.19291482672193344 and lower bound (primal example): 0.19291482276257793
104+
(PEPit) Duality gap: absolute: 3.959355510119167e-09 and relative: 2.0523853239582232e-08
105105
*** Example file: worst-case performance of the Accelerated Douglas Rachford Splitting in function values ***
106106
PEPit guarantee: F(y_n)-F_* <= 0.192915 ||x0 - ws||^2
107107
Theoretical guarantee for quadratics: F(y_n)-F_* <= 1.68889 ||x0 - ws||^2

PEPit/examples/composite_convex_minimization/accelerated_proximal_gradient.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,16 @@ def wc_accelerated_proximal_gradient(mu, L, n, wrapper="cvxpy", solver=None, ver
8484
(PEPit) Setting up the problem: additional constraints for 0 function(s)
8585
(PEPit) Compiling SDP
8686
(PEPit) Calling SDP solver
87-
(PEPit) Solver status: optimal (wrapper:cvxpy, solver: MOSEK); optimal value: 0.052631584231766296
87+
(PEPit) Solver status: optimal (wrapper:cvxpy, solver: MOSEK); optimal value: 0.05263158422835028
8888
(PEPit) Primal feasibility check:
89-
The solver found a Gram matrix that is positive semi-definite up to an error of 5.992753634406465e-09
90-
All the primal scalar constraints are verified up to an error of 1.4782311839878215e-08
89+
The solver found a Gram matrix that is positive semi-definite up to an error of 5.991982341524508e-09
90+
All the primal scalar constraints are verified up to an error of 1.4780313955381486e-08
9191
(PEPit) Dual feasibility check:
9292
The solver found a residual matrix that is positive semi-definite
9393
All the dual scalar values associated with inequality constraints are nonnegative
94-
(PEPit) The worst-case guarantee proof is perfectly reconstituted up to an error of 7.756506718232842e-08
95-
(PEPit) Final upper bound (dual): 0.05263158967733932 and lower bound (primal example): 0.052631584231766296
96-
(PEPit) Duality gap: absolute: 5.445573027229589e-09 and relative: 1.0346587712901982e-07
94+
(PEPit) The worst-case guarantee proof is perfectly reconstituted up to an error of 7.783914601477293e-08
95+
(PEPit) Final upper bound (dual): 0.052631589673196755 and lower bound (primal example): 0.05263158422835028
96+
(PEPit) Duality gap: absolute: 5.444846476465592e-09 and relative: 1.034520726726044e-07
9797
*** Example file: worst-case performance of the Accelerated Proximal Gradient Method in function values***
9898
PEPit guarantee: f(x_n)-f_* <= 0.0526316 ||x0 - xs||^2
9999
Theoretical guarantee: f(x_n)-f_* <= 0.0526316 ||x0 - xs||^2

PEPit/examples/composite_convex_minimization/bregman_proximal_point.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@ def wc_bregman_proximal_point(gamma, n, wrapper="cvxpy", solver=None, verbose=1)
7171
(PEPit) Setting up the problem: additional constraints for 0 function(s)
7272
(PEPit) Compiling SDP
7373
(PEPit) Calling SDP solver
74-
(PEPit) Solver status: optimal (wrapper:cvxpy, solver: MOSEK); optimal value: 0.06666666577966435
74+
(PEPit) Solver status: optimal (wrapper:cvxpy, solver: MOSEK); optimal value: 0.06666666577966336
7575
(PEPit) Primal feasibility check:
7676
The solver found a Gram matrix that is positive semi-definite
77-
All the primal scalar constraints are verified up to an error of 7.300917023722597e-10
77+
All the primal scalar constraints are verified up to an error of 7.300920007446976e-10
7878
(PEPit) Dual feasibility check:
7979
The solver found a residual matrix that is positive semi-definite
80-
All the dual scalar values associated with inequality constraints are nonnegative up to an error of 3.627346042650288e-10
81-
(PEPit) The worst-case guarantee proof is perfectly reconstituted up to an error of 1.1600769917201519e-08
82-
(PEPit) Final upper bound (dual): 0.06666666638907502 and lower bound (primal example): 0.06666666577966435
83-
(PEPit) Duality gap: absolute: 6.094106747012162e-10 and relative: 9.1411602421417e-09
80+
All the dual scalar values associated with inequality constraints are nonnegative up to an error of 3.627362036465223e-10
81+
(PEPit) The worst-case guarantee proof is perfectly reconstituted up to an error of 1.1600747813276144e-08
82+
(PEPit) Final upper bound (dual): 0.06666666638907442 and lower bound (primal example): 0.06666666577966336
83+
(PEPit) Duality gap: absolute: 6.094110632792749e-10 and relative: 9.14116607081279e-09
8484
*** Example file: worst-case performance of the Bregman Proximal Point in function values ***
8585
PEPit guarantee: F(x_n)-F_* <= 0.0666667 Dh(x_*; x_0)
8686
Theoretical guarantee: F(x_n)-F_* <= 0.0666667 Dh(x_*; x_0)

PEPit/examples/composite_convex_minimization/douglas_rachford_splitting.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,16 @@ def wc_douglas_rachford_splitting(L, alpha, theta, n, wrapper="cvxpy", solver=No
8787
(PEPit) Setting up the problem: additional constraints for 0 function(s)
8888
(PEPit) Compiling SDP
8989
(PEPit) Calling SDP solver
90-
(PEPit) Solver status: optimal (wrapper:cvxpy, solver: MOSEK); optimal value: 0.027791729871150122
90+
(PEPit) Solver status: optimal (wrapper:cvxpy, solver: MOSEK); optimal value: 0.02779172988059079
9191
(PEPit) Primal feasibility check:
92-
The solver found a Gram matrix that is positive semi-definite up to an error of 2.497713205381149e-09
93-
All the primal scalar constraints are verified up to an error of 7.050520128663862e-09
92+
The solver found a Gram matrix that is positive semi-definite up to an error of 2.4990957076994907e-09
93+
All the primal scalar constraints are verified up to an error of 7.054584369795003e-09
9494
(PEPit) Dual feasibility check:
9595
The solver found a residual matrix that is positive semi-definite
96-
All the dual scalar values associated with inequality constraints are nonnegative up to an error of 2.997247465328208e-10
97-
(PEPit) The worst-case guarantee proof is perfectly reconstituted up to an error of 6.051666237897567e-08
98-
(PEPit) Final upper bound (dual): 0.027791732322924277 and lower bound (primal example): 0.027791729871150122
99-
(PEPit) Duality gap: absolute: 2.4517741552265715e-09 and relative: 8.821955907723812e-08
96+
All the dual scalar values associated with inequality constraints are nonnegative up to an error of 3.0070786282625263e-10
97+
(PEPit) The worst-case guarantee proof is perfectly reconstituted up to an error of 5.968467133801908e-08
98+
(PEPit) Final upper bound (dual): 0.02779173233376415 and lower bound (primal example): 0.02779172988059079
99+
(PEPit) Duality gap: absolute: 2.4531733623656127e-09 and relative: 8.826990521661848e-08
100100
*** Example file: worst-case performance of the Douglas Rachford Splitting in function values ***
101101
PEPit guarantee: f(y_n)-f_* <= 0.0278 ||x0 - xs||^2
102102
Theoretical guarantee: f(y_n)-f_* <= 0.0278 ||x0 - xs||^2

PEPit/examples/composite_convex_minimization/douglas_rachford_splitting_contraction.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,16 @@ def wc_douglas_rachford_splitting_contraction(mu, L, alpha, theta, n, wrapper="c
9898
(PEPit) Setting up the problem: additional constraints for 0 function(s)
9999
(PEPit) Compiling SDP
100100
(PEPit) Calling SDP solver
101-
(PEPit) Solver status: optimal (wrapper:cvxpy, solver: MOSEK); optimal value: 0.3501278029546837
101+
(PEPit) Solver status: optimal (wrapper:cvxpy, solver: MOSEK); optimal value: 0.35012780295429113
102102
(PEPit) Primal feasibility check:
103-
The solver found a Gram matrix that is positive semi-definite up to an error of 1.581993336260348e-10
104-
All the primal scalar constraints are verified up to an error of 1.7788042150357342e-09
103+
The solver found a Gram matrix that is positive semi-definite up to an error of 1.5819643752082932e-10
104+
All the primal scalar constraints are verified up to an error of 1.7787298300930843e-09
105105
(PEPit) Dual feasibility check:
106106
The solver found a residual matrix that is positive semi-definite
107107
All the dual scalar values associated with inequality constraints are nonnegative
108-
(PEPit) The worst-case guarantee proof is perfectly reconstituted up to an error of 1.1407815086579577e-07
109-
(PEPit) Final upper bound (dual): 0.3501278016887412 and lower bound (primal example): 0.3501278029546837
110-
(PEPit) Duality gap: absolute: -1.2659425174810224e-09 and relative: -3.6156583590274623e-09
108+
(PEPit) The worst-case guarantee proof is perfectly reconstituted up to an error of 1.1344535856561752e-07
109+
(PEPit) Final upper bound (dual): 0.350127801688298 and lower bound (primal example): 0.35012780295429113
110+
(PEPit) Duality gap: absolute: -1.2659931436509453e-09 and relative: -3.615802952432828e-09
111111
*** Example file: worst-case performance of the Douglas-Rachford splitting in distance ***
112112
PEPit guarantee: ||w - wp||^2 <= 0.350128 ||w0 - w0p||^2
113113
Theoretical guarantee: ||w - wp||^2 <= 0.350128 ||w0 - w0p||^2

0 commit comments

Comments
 (0)