rodrigo-arenas / Sklearn-genetic-opt

ML hyperparameters tuning and features selection, using evolutionary algorithms.
https://sklearn-genetic-opt.readthedocs.io
MIT License
289 stars 73 forks source link

Graceful training stopping #86

Closed rodrigo-arenas closed 2 years ago

rodrigo-arenas commented 2 years ago

This PR implements a graceful training stopping for all the algorithms.

Training gracefully stops if interrupted by some of these exceptions: KeyboardInterrupt, SystemExit, StopIteration. When one of these exceptions is raised, the model finishes the current generation and saves the current best model. It only works if at least one generation has been completed.

codecov[bot] commented 2 years ago

Codecov Report

Merging #86 (4adadcc) into master (a0c1791) will decrease coverage by 0.92%. The diff coverage is 88.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #86      +/-   ##
==========================================
- Coverage   99.89%   98.97%   -0.93%     
==========================================
  Files          19       19              
  Lines         953      971      +18     
==========================================
+ Hits          952      961       +9     
- Misses          1       10       +9     
Impacted Files Coverage Δ
sklearn_genetic/algorithms.py 94.64% <88.00%> (-5.36%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a0c1791...4adadcc. Read the comment docs.