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

Add features to PGM solver classes #56

Merged
merged 4 commits into from
Oct 21, 2021
Merged

Add features to PGM solver classes #56

merged 4 commits into from
Oct 21, 2021

Conversation

bwohlberg
Copy link
Collaborator

Add features to PGM solver classes that were recently added to ADMM solver classes:

  • Timing of solver iterations
  • Iteration counter that maintains state between solve calls
  • Optional callback function argument of solve method

Also cleanup up flake8 warnings, primarily related to over-length lines.

@bwohlberg bwohlberg added the enhancement New feature or request label Oct 21, 2021
@bwohlberg bwohlberg assigned crstngc and unassigned crstngc Oct 21, 2021
@lukepfister
Copy link
Contributor

I'd be wary of adding extra state to the optimizers. Jax doesn't play nice with side effects.

In fact, we discussed eventually making the internals to PGM and ADMM entirely stateless at some point-- you can see bits of that with the way that the step size is always passed as an argument to the step function, even though it is an attribute of the PGM instance.

@bwohlberg
Copy link
Collaborator Author

I'd be wary of adding extra state to the optimizers. Jax doesn't play nice with side effects.

In fact, we discussed eventually making the internals to PGM and ADMM entirely stateless at some point-- you can see bits of that with the way that the step size is always passed as an argument to the step function, even though it is an attribute of the PGM instance.

Noted, but the same mechanism is already in ADMM. I'll go ahead and merge this soon, but let's discuss when possible, and make an issue for appropriate changes to both ADMM and PGM.

@bwohlberg bwohlberg merged commit 49c034c into main Oct 21, 2021
@bwohlberg bwohlberg deleted the brendt/pgm-add-timer branch October 21, 2021 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants