Skip to content

Add SaveEnsembleMixin #1043

Closed
Mr-Geekman opened this issue Dec 15, 2022 · 2 comments · Fixed by #1046
Closed

Add SaveEnsembleMixin #1043

Mr-Geekman opened this issue Dec 15, 2022 · 2 comments · Fixed by #1046
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Mr-Geekman
Copy link
Contributor

🚀 Feature Request

We want to make ensembles saveable.

Proposal

  1. Add class SaveEnsembleMixin(SaveMixin), it will be responsible for saving all ensembles.
  2. Signature of save for this moment remains the same. But in the future we plan to make it different.
    def save(self, path: pathlib.Path, save_ts: bool = False).
    It will make it possible to save ts with pipeline. For now, we don't want to implement saving TSDataset (it will be much simplier after completion of TSDataset-v2.0).
  3. Signature of load we want to change.
    def load(cls, path: pathlib.Path, ts: Optional[TSDataset] = None) -> Any.
    We expect that user gives us dataset we want to work with. If user hasn't give us the dataset, may be he wants to refit pipeline or he want to give a custom TSDataset into forecast/predict.
  4. How save should work.
    • Remove attributes pipelines, ts.
    • Save object with SaveMixin.
    • Save each pipeline in pipelines separately into folder inside the archive.
  5. How load should work.
    • Load object with SaveMixin.
    • Load pipelines. We should get classname from meta or implement load method that makes this logic with loading classname for us.

Test cases

  1. Test mixin.
    • Test in saving that everything except for pipeline is saved in object.pkl.
    • Test in saving that pipelines are saved into separate folder and can be loaded from it.
    • Test error on non-existent file.
    • Test that load restores pipelines and ts (if given).
    • Test warning on different versions on etna.
  2. Test saving/loading on VotingEnsemble.
  3. Test saving/loading on StackingEnsemble.
  4. Test saving/loading on DirectEnsemble.

Additional context

No response

@Mr-Geekman Mr-Geekman added the enhancement New feature or request label Dec 15, 2022
@Mr-Geekman Mr-Geekman added this to the Inference 2.0 milestone Dec 15, 2022
@Mr-Geekman Mr-Geekman moved this to Specification in etna board Dec 15, 2022
@Mr-Geekman Mr-Geekman moved this from Specification to Todo in etna board Dec 16, 2022
@Mr-Geekman Mr-Geekman self-assigned this Dec 16, 2022
@Mr-Geekman Mr-Geekman moved this from Todo to In Progress in etna board Dec 16, 2022
@Mr-Geekman Mr-Geekman mentioned this issue Dec 19, 2022
4 tasks
@Mr-Geekman Mr-Geekman moved this from In Progress to In Review in etna board Dec 19, 2022
@martins0n martins0n linked a pull request Dec 20, 2022 that will close this issue
4 tasks
@Mr-Geekman
Copy link
Contributor Author

Mr-Geekman commented Dec 22, 2022

Closed via #1046.

@Mr-Geekman
Copy link
Contributor Author

Closed via #1046.

Repository owner moved this from In Review to Done in etna board Dec 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant