Skip to content

Commit

Permalink
Merge pull request #470 from WenjieDu/dev
Browse files Browse the repository at this point in the history
Fix failed saving strategy "better", update docs, and release v0.7
  • Loading branch information
WenjieDu authored Jul 21, 2024
2 parents 4f4f7fc + 1532cc3 commit b103df4
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 13 deletions.
7 changes: 4 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ build:
- pip install -r requirements.txt
- pip install pypots
- pip install sphinx==6.2.1 docutils==0.19 sphinxcontrib-bibtex==2.1.4 sphinxcontrib-gtagjs sphinx-autodoc-typehints furo==2023.07.26
- git clone https://github.com/WenjieDu/TSDB TSDB_repo --depth 1
- git clone https://github.com/WenjieDu/PyGrinder PyGrinder_repo --depth 1
- pip install ./TSDB_repo && pip install ./PyGrinder_repo && pip install .
- git clone https://github.com/WenjieDu/TSDB TSDB_repo --depth 1 && pip install ./TSDB_repo
- git clone https://github.com/WenjieDu/PyGrinder PyGrinder_repo --depth 1 && pip install ./PyGrinder_repo
- git clone https://github.com/WenjieDu/BenchPOTS BenchPOTS_repo --depth 1 && pip install ./BenchPOTS_repo
- pip install .

post_install:
# To fix the exception: This documentation is not using `furo.css` as the stylesheet.
Expand Down
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"

# -- Options for PDF output -------------------------------------------------
latex_engine = "xelatex"

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for a list of builtin themes.
Expand Down
2 changes: 1 addition & 1 deletion pypots/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#
# Dev branch marker is: 'X.Y.dev' or 'X.Y.devN' where N is an integer.
# 'X.Y.dev0' is the canonical version of 'X.Y.dev'
__version__ = "0.6"
__version__ = "0.7"


from . import imputation, classification, clustering, forecasting, optim, data, utils
Expand Down
2 changes: 1 addition & 1 deletion pypots/classification/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def _train_model(

# save the model if necessary
self._auto_save_model_if_necessary(
confirm_saving=mean_loss < self.best_loss,
confirm_saving=self.best_epoch == epoch,
saving_name=f"{self.__class__.__name__}_epoch{epoch}_loss{mean_loss}",
)

Expand Down
2 changes: 1 addition & 1 deletion pypots/clustering/crli/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def _train_model(

# save the model if necessary
self._auto_save_model_if_necessary(
confirm_saving=mean_loss < self.best_loss,
confirm_saving=self.best_epoch == epoch,
saving_name=f"{self.__class__.__name__}_epoch{epoch}_loss{mean_loss:.4f}",
)

Expand Down
2 changes: 1 addition & 1 deletion pypots/clustering/vader/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def _train_model(

# save the model if necessary
self._auto_save_model_if_necessary(
confirm_saving=mean_loss < self.best_loss,
confirm_saving=self.best_epoch == epoch,
saving_name=f"{self.__class__.__name__}_epoch{epoch}_loss{mean_loss}",
)

Expand Down
2 changes: 1 addition & 1 deletion pypots/forecasting/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def _train_model(

# save the model if necessary
self._auto_save_model_if_necessary(
confirm_saving=mean_loss < self.best_loss,
confirm_saving=self.best_epoch == epoch,
saving_name=f"{self.__class__.__name__}_epoch{epoch}_loss{mean_loss}",
)

Expand Down
2 changes: 1 addition & 1 deletion pypots/forecasting/csdi/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def _train_model(

# save the model if necessary
self._auto_save_model_if_necessary(
confirm_saving=mean_loss < self.best_loss,
confirm_saving=self.best_epoch == epoch,
saving_name=f"{self.__class__.__name__}_epoch{epoch}_loss{mean_loss}",
)

Expand Down
2 changes: 1 addition & 1 deletion pypots/imputation/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def _train_model(

# save the model if necessary
self._auto_save_model_if_necessary(
confirm_saving=mean_loss < self.best_loss,
confirm_saving=self.best_epoch == epoch,
saving_name=f"{self.__class__.__name__}_epoch{epoch}_loss{mean_loss}",
)

Expand Down
2 changes: 1 addition & 1 deletion pypots/imputation/csdi/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def _train_model(

# save the model if necessary
self._auto_save_model_if_necessary(
confirm_saving=mean_loss < self.best_loss,
confirm_saving=self.best_epoch == epoch,
saving_name=f"{self.__class__.__name__}_epoch{epoch}_loss{mean_loss}",
)

Expand Down
2 changes: 1 addition & 1 deletion pypots/imputation/gpvae/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def _train_model(

# save the model if necessary
self._auto_save_model_if_necessary(
confirm_saving=mean_loss < self.best_loss,
confirm_saving=self.best_epoch == epoch,
saving_name=f"{self.__class__.__name__}_epoch{epoch}_loss{mean_loss}",
)

Expand Down
2 changes: 1 addition & 1 deletion pypots/imputation/usgan/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def _train_model(

# save the model if necessary
self._auto_save_model_if_necessary(
confirm_saving=mean_loss < self.best_loss,
confirm_saving=self.best_epoch == epoch,
saving_name=f"{self.__class__.__name__}_epoch{epoch}_loss{mean_loss}",
)

Expand Down

0 comments on commit b103df4

Please sign in to comment.