Checkpoint.py 462 B

12345678910111213141516171819202122
  1. # main imports
  2. import os
  3. import logging
  4. class Checkpoint():
  5. def __init__(self, _algo, _every, _filepath):
  6. self.algo = _algo
  7. self.every = _every
  8. self.filepath = _filepath
  9. def run(self):
  10. """
  11. Check if necessary to do backup based on `_every` variable
  12. """
  13. pass
  14. def load(self):
  15. """
  16. Load last backup line of solution and set algorithm state at this backup
  17. """
  18. pass