-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add saving/loading for transforms, models, pipelines (#1068)
- Loading branch information
1 parent
56990dd
commit c04bf64
Showing
83 changed files
with
2,863 additions
and
909 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
from etna.core.mixins import BaseMixin | ||
from etna.core.mixins import SaveMixin | ||
from etna.core.mixins import StringEnumWithRepr | ||
from etna.core.saving import AbstractSaveable | ||
from etna.core.utils import load |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import pathlib | ||
from abc import ABC | ||
from abc import abstractmethod | ||
from typing import Any | ||
|
||
|
||
class AbstractSaveable(ABC): | ||
"""Abstract class with methods for saving, loading objects.""" | ||
|
||
@abstractmethod | ||
def save(self, path: pathlib.Path): | ||
"""Save the object. | ||
Parameters | ||
---------- | ||
path: | ||
Path to save object to. | ||
""" | ||
pass | ||
|
||
@classmethod | ||
@abstractmethod | ||
def load(cls, path: pathlib.Path) -> Any: | ||
"""Load an object. | ||
Parameters | ||
---------- | ||
path: | ||
Path to load object from. | ||
""" | ||
pass |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from etna.ensembles.base import EnsembleMixin | ||
from etna.ensembles.direct_ensemble import DirectEnsemble | ||
from etna.ensembles.mixins import EnsembleMixin | ||
from etna.ensembles.stacking_ensemble import StackingEnsemble | ||
from etna.ensembles.voting_ensemble import VotingEnsemble |
This file was deleted.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.
c04bf64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://etna-docs.netlify.app as production
🚀 Deployed on https://63c505111f9e711aee2ed371--etna-docs.netlify.app