Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterator as fp #103

Open
wants to merge 62 commits into
base: main
Choose a base branch
from
Open

Iterator as fp #103

wants to merge 62 commits into from

Conversation

samuro95
Copy link
Collaborator

@samuro95 samuro95 commented Oct 29, 2023

Major updates :

  • Refactor optimization iterators to make a distinction between fixed-point iterate and estimate of the minimizer. This enables to rewrite all optimization algorithm as fixed-point algorithms, and to use them in the DEQ framework.
    The dictionary iterated has typically the form {"iterate" : (x,z) , "estimate" : x, "cost" : F}.
    The iterate variable can be either a tuple ( ADMM, CP), either a single tensor (all the other implemented iterators)
    The link between the iterate and the estimate is given by the 'get_estiamte_from_iterate' function for each optim_iterator.
  • Each optim iterator has its own initialization function 'init_algo'.

Minor updates :

  • Allow str to be passed as directory name in demo dataset loader
  • Change name 'F_fn' to 'cost_fn'
  • Anderson acceleration in utils

Checks to be done before submitting your PR

  • python3 -m pytest tests/ runs successfully.
  • black . runs successfully.
  • make html runs successfully (in the docs/ directory).
  • Updated docstrings related to the changes (as applicable).
  • Added an entry to the CHANGELOG.rst.

Copy link

codecov bot commented Nov 6, 2023

Codecov Report

Attention: Patch coverage is 40.61303% with 155 lines in your changes are missing coverage. Please review.

Project coverage is 70.17%. Comparing base (2e138eb) to head (06deba3).
Report is 21 commits behind head on main.

Current head 06deba3 differs from pull request most recent head 71ae2c1

Please upload reports for the commit 71ae2c1 to get more accurate results.

Files Patch % Lines
test.py 0.00% 46 Missing ⚠️
deepinv/optim/utils.py 12.50% 35 Missing ⚠️
deepinv/tests/test_unfolded.py 9.37% 29 Missing ⚠️
deepinv/optim/optimizers.py 58.33% 15 Missing ⚠️
deepinv/unfolded/deep_equilibrium.py 10.00% 9 Missing ⚠️
deepinv/optim/optim_iterators/gradient_descent.py 0.00% 6 Missing ⚠️
deepinv/optim/optim_iterators/primal_dual_CP.py 57.14% 6 Missing ⚠️
deepinv/training_utils.py 73.33% 2 Missing and 2 partials ⚠️
deepinv/optim/fixed_point.py 33.33% 2 Missing ⚠️
deepinv/optim/optim_iterators/admm.py 91.66% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #103      +/-   ##
==========================================
- Coverage   76.01%   70.17%   -5.85%     
==========================================
  Files         101       93       -8     
  Lines        7481     6715     -766     
  Branches     1013      904     -109     
==========================================
- Hits         5687     4712     -975     
- Misses       1474     1714     +240     
+ Partials      320      289      -31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@samuro95 samuro95 mentioned this pull request May 29, 2024
@tachella tachella self-requested a review May 31, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant