Skip to content

Conversation

@bqth29
Copy link
Owner

@bqth29 bqth29 commented Jan 2, 2024

💬 Pull Request Description

When the Stop Window detects that an agent has converged, it is stored in the window's memory and a boolean tensor is sent back to the optimizer to indicate which agents still have not converged. Thus, the oscillators corresponding to converged agents are removed which reduces the computation size and time.

It also becomes more relevant to rename StopWindow as ConvergenceChecker so its purpose is more easily understandable. Documentation has been updated.

Besides, the use_window parameter used in the various optimization functions and methods has been renamed early_stopping for relevance's sake.

✔️ Check list

  • The code matches the styling rules
  • The new code is covered by relevant tests
  • Documentation was added

🚀 New features

None.

🐞 Bug fixes

None.

📣 Supplementary information

None.

⚠️ Breaking changes

Renaming StopWindow and use_window to respectively ConvergenceChecker and early_stopping introduced breaking changes with respect to versions <= 1.2.1.

@bqth29 bqth29 added the enhancement New feature or request label Jan 2, 2024
@bqth29 bqth29 linked an issue Jan 2, 2024 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (a9ab8bb) to head (c7984b6).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #55   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           36        36           
  Lines         1600      1537   -63     
=========================================
- Hits          1600      1537   -63     
Flag Coverage Δ
100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@bqth29
Copy link
Owner Author

bqth29 commented Apr 20, 2024

Possible bug when combining this new window with the keyboard interrupt feature from #51: if the user stops the optimization manually between the moment when the window is reduced but not the oscillators in the optimizer, this may create shape conflicts when combining both in the final spins that are returned. Need to discuss this.

@bqth29 bqth29 added feature New feature refactoring Existing code is refactored (no new feature, no breaking change) performance Improvement of the algorithm's performance and removed enhancement New feature or request labels May 28, 2024
@bqth29 bqth29 changed the title More efficient stop window Make StopWindow more efficient and rename it to ConvergenceChecker Sep 29, 2024
@bqth29 bqth29 changed the title Make StopWindow more efficient and rename it to ConvergenceChecker Make StopWindow more efficient and rename it to ConvergenceChecker Sep 29, 2024
@bqth29 bqth29 added the breaking change A breaking change is brought by this PR label Sep 29, 2024
Rename "Stop Window" to "Convergence Checker"
@bqth29 bqth29 added this to the Simulated Bifurcation 2.0 milestone Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change A breaking change is brought by this PR feature New feature performance Improvement of the algorithm's performance refactoring Existing code is refactored (no new feature, no breaking change)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH] Speed up computation when agents have converged

1 participant