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 ConvergenceStopping callback to stop driver upon convergence to a certain value #1481

Merged
merged 6 commits into from Jun 26, 2023

Conversation

PhilipVinc
Copy link
Member

Also improve EarlyStopping to support a relative tolerance, which is needed to use it when optimising the infidelity or other quantities converging to zero...

@alleSini99 can you tell me if we need something else to be able to implement the black-box infidelity driver in netket fidelity?

@codecov
Copy link

codecov bot commented May 24, 2023

Codecov Report

Merging #1481 (2950770) into master (26372e3) will increase coverage by 0.03%.
The diff coverage is 95.12%.

@@            Coverage Diff             @@
##           master    #1481      +/-   ##
==========================================
+ Coverage   83.78%   83.81%   +0.03%     
==========================================
  Files         240      241       +1     
  Lines       13687    13720      +33     
  Branches     2076     2079       +3     
==========================================
+ Hits        11467    11500      +33     
  Misses       1706     1706              
  Partials      514      514              
Impacted Files Coverage Δ
netket/callbacks/earlystopping.py 93.93% <88.88%> (+2.63%) ⬆️
netket/callbacks/__init__.py 100.00% <100.00%> (ø)
netket/callbacks/convergence_stopping.py 100.00% <100.00%> (ø)

@alleSini99
Copy link
Collaborator

Maybe a last thing would be to have the possibility to not re-generate the whole sample set at each timestep, but to only update a (controllable) portion of it (using a First In First Out mechanism). This might be useful to reduce the sampling cost.

@gcarleo
Copy link
Member

gcarleo commented Jun 8, 2023

This would be roughly equilavent to using very small number of samples per vmc step and estimate energies and gradients with decaying rolling averages that take into account past values. I think this would be easier to implement just changing the optimizer/ is in the spirit of what Adam and similar would do? The only problem is that we don't have an optimizer that collects decaying running averages for the QGT...

@PhilipVinc
Copy link
Member Author

merging this as the comments are not too relevant and it's useful for infidelity optimisation and similar things..

@PhilipVinc PhilipVinc merged commit cbe2b20 into netket:master Jun 26, 2023
5 of 6 checks passed
@PhilipVinc PhilipVinc deleted the pv/stop branch June 26, 2023 21:04
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

3 participants