substrafl icon indicating copy to clipboard operation
substrafl copied to clipboard

refactor: modifying _update_from_checkpoint signature

Open jeandut opened this issue 1 year ago • 1 comments

Related issue

No related issue

Summary

Notes

This PR introduces a change in the signature of the algorithm's update_from_checkpoint function in order to ease its use in complex pipelines. As of before this PR if you had a checkpoint (a dict from say a call to get_state_to_save) it was impossible to load it ... Now workflows can use patterns like:

chkpt = self.get_state_to_save()
self._update_from_checkpoint(chkpt)

Please check if the PR fulfills these requirements

  • [x] If the feature has an impact on the user experience, the changelog has been updated
  • [x] Tests for the changes have been added (for bug fixes / features)
  • [x] Docs have been added / updated (for bug fixes / features)
  • [x] The commit message follows the conventional commit specification

jeandut avatar Jan 19 '24 09:01 jeandut

Okay will copy checkpoint in the function however striving for functional purity is a bit of an unattainable ideal.

jeandut avatar Jan 23 '24 14:01 jeandut