You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Benchmark Early Stopping for the GapEncoder - #663
This PR adds a script to benchmark the use of early stopping for GapEncoder.
The early stopping, implemented in a modified version of GapEncoder and enabled with early_stop=True, monitors the GapEncoder score every monitor_steps batches. As soon as the score increases (worsen) it triggers a counter with a limit given by patience batches. If after patience batches the score has not been decreased, the process is ended.
This PR is related to #593, where a previous benchmark is run to investigate GAPEncoder slowness.
Should we add an early stopping to the GapEncoder class directly and modify the bench script ?
Should we add the min_delta parameter (like in pytorch), i.e. a decrease of more than or equal to min_delta, will count as improvement? For now there's no such parameter, so equivalent to min_delta=0.
Should we record the best encoder status so far (score, matrices, ...) so to restore it in case the score worsen instead? Here we always take the last score obtained.
Should we record the best encoder status so far (score, matrices, ...) so to restore it in case the score worsen instead? Here we always take the last score obtained.
I think taking the last should be okay, though we can check when I run the benchmarks on more datasets. (also it decreases the memory usage).
Should we add the min_delta parameter (like in pytorch), i.e. a decrease of more than or equal to min_delta, will count as improvement? For now there's no such parameter, so equivalent to min_delta=0.
Right now the version with early stopping is actually slower than the original version, I think because the score method is so long. I'll try to see if it can be sped up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a script to benchmark the use of early stopping for GapEncoder.
The early stopping, implemented in a modified version of GapEncoder and enabled with
early_stop=True, monitors the GapEncoder score everymonitor_stepsbatches. As soon as the score increases (worsen) it triggers a counter with a limit given bypatiencebatches. If afterpatiencebatches the score has not been decreased, the process is ended.This PR is related to #593, where a previous benchmark is run to investigate GAPEncoder slowness.