Skip to content

Commit

Permalink
Fix caching
Browse files Browse the repository at this point in the history
The cache was not restoring overwritten parameters
  • Loading branch information
gmrukwa committed Feb 20, 2021
1 parent 6d85b20 commit 0b9414f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions divik/core/_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def fit(self, X, y=None):
memory = joblib.Memory(location=cache_path())
cached = memory.cache(_fit)
output = cached(self, X, y)
self.set_params(**output.get_params())
computed_fields = [f for f in dir(output) if _is_computed(f)]
for field in computed_fields:
setattr(self, field, getattr(output, field))
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "divik"
version = "3.0.8"
version = "3.0.9"
description = "Divisive iK-means algorithm implementation"
authors = ["Grzegorz Mrukwa <g.mrukwa@gmail.com>"]
license = "Apache-2.0"
Expand Down

0 comments on commit 0b9414f

Please sign in to comment.