Skip to content

Commit 631fd7e

Browse files
authored
Merge pull request #139 from PerformanceEstimation/fix/linesearch_naming
renaming ELS
2 parents 27dbd73 + f3a3a2b commit 631fd7e

File tree

6 files changed

+2675
-14
lines changed

6 files changed

+2675
-14
lines changed

PEPit/primitive_steps/exact_linesearch_step.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from PEPit.point import Point
22

33

4-
def exact_linesearch_step(x0, f, directions):
4+
def exact_linesearch_step(x0, f, directions, name='new_x'):
55
"""
66
This routine outputs some :math:`x` by *mimicking* an exact line/span search in specified directions.
77
It is used for instance in ``PEPit.examples.unconstrained_convex_minimization.wc_gradient_exact_line_search``
@@ -63,6 +63,7 @@ def exact_linesearch_step(x0, f, directions):
6363
x0 (Point): the starting point.
6464
f (Function): the function on which the (sub)gradient will be evaluated.
6565
directions (List of Points): the list of all directions required to be orthogonal to the (sub)gradient of x.
66+
name (Str): the name of the point we arrive to.
6667
6768
Returns:
6869
x (Point): such that all vectors in directions are orthogonal to the (sub)gradient of f at x.
@@ -72,18 +73,18 @@ def exact_linesearch_step(x0, f, directions):
7273
"""
7374

7475
# Instantiate a Point
75-
x = Point()
76+
x = Point(name=name)
7677

7778
# Define gradient and function value of f on x
7879
gx, fx = f.oracle(x)
7980

8081
# Add constraints
8182
constraint = ((x - x0) * gx == 0)
82-
constraint.set_name("exact_linesearch({})_on_{}".format(f.get_name(), x0.get_name()))
83+
constraint.set_name("exact_linesearch({})_to_{}_from_{}".format(f.get_name(), x.get_name(), x0.get_name()))
8384
f.add_constraint(constraint)
8485
for d in directions:
8586
constraint = (d * gx == 0)
86-
constraint.set_name("exact_linesearch({})_on_{}_in_direction_{}".format(f.get_name(), x0.get_name(), d.get_name()))
87+
constraint.set_name("exact_linesearch({})_to_{}_from_{}_in_direction_{}".format(f.get_name(), x.get_name(), x0.get_name(), d.get_name()))
8788
f.add_constraint(constraint)
8889

8990
# Return triplet of points

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -274,16 +274,15 @@ PEPit supports the following [operator classes](https://pepit.readthedocs.io/en/
274274

275275
## Contributors
276276

277-
### Creators
277+
### Creators, internal contributors and maintainers
278278

279-
This toolbox has been created by
280-
281-
- [**Baptiste Goujaud**](https://www.linkedin.com/in/baptiste-goujaud-b60060b3/)
282-
- [**Céline Moucer**](https://cmoucer.github.io)
283-
- [**Julien Hendrickx**](https://perso.uclouvain.be/julien.hendrickx/index.html)
284-
- [**François Glineur**](https://perso.uclouvain.be/francois.glineur/)
285-
- [**Adrien Taylor**](https://adrientaylor.github.io/)
286-
- [**Aymeric Dieuleveut**](http://www.cmap.polytechnique.fr/~aymeric.dieuleveut/)
279+
- [**Baptiste Goujaud**](https://bgoujaud.github.io/) (creator and maintainer)
280+
- [**Céline Moucer**](https://cmoucer.github.io) (creator)
281+
- [**Julien Hendrickx**](https://perso.uclouvain.be/julien.hendrickx/index.html) (creator)
282+
- [**François Glineur**](https://perso.uclouvain.be/francois.glineur/) (creator)
283+
- [**Adrien Taylor**](https://adrientaylor.github.io/) (creator and maintainer)
284+
- [**Aymeric Dieuleveut**](http://www.cmap.polytechnique.fr/~aymeric.dieuleveut/) (creator and maintainer)
285+
- [**Daniel Berg Thomsen**](https://bergthomsen.com/) (internal contributor)
287286

288287
<p align="center">
289288
<a href="https://www.inria.fr" style="margin: 0 40px;">
@@ -297,6 +296,7 @@ This toolbox has been created by
297296
</a>
298297
</p>
299298

299+
300300
### External contributions
301301

302302
All external contributions are welcome.

docs/source/tutorials.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ Tutorials
66
:caption: Contents:
77

88
Finding worst-case guarantees <notebooks_folder/PEPit_demo.ipynb>
9-
Extracting a proof <notebooks_folder/PEPit_demo_extracting_a_proof.ipynb>
109
Extracting a worst-case example <notebooks_folder/PEPit_demo_extract_worst_case_examples.ipynb>
10+
Extracting a proof <notebooks_folder/PEPit_demo_extracting_a_proof.ipynb>
11+
Designing an algorithm <notebooks_folder/PEPit_demo_algorithm_design.ipynb>

docs/source/whatsnew.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ What's new in PEPit
1313
whatsnew/0.3.3
1414
whatsnew/0.4.0
1515
whatsnew/0.5.0
16+
whatsnew/0.5.1

docs/source/whatsnew/0.5.1.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
What's new in PEPit 0.5.1
2+
=========================
3+
4+
New demo:
5+
---------
6+
7+
- The file `ressources/demo/PEPit_demo_algorithm_design.ipynb` contains examples for algorithm design with PEPit.
8+
9+
Fixes:
10+
------
11+
12+
- Improved constraint naming within the exact linesearch procedure.

ressources/demo/PEPit_demo_algorithm_design.ipynb

Lines changed: 2646 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)