Skip to content

Commit

Permalink
Merge pull request #39 from alliander-opensource/bugfix-predictionloop
Browse files Browse the repository at this point in the history
Bugfix predictionloop
  • Loading branch information
JanMaartenvanDoorn authored Mar 9, 2021
2 parents cd83d09 + 0b3cb2f commit c66a7ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions openstf/model/capacity/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ def save(self, directory):
os.makedirs(directory, exist_ok=True)

# save model
pickle.dump(self.model, open(directory / "model.pkl", "wb"))
with open(directory / "model.pkl", "wb") as fh:
pickle.dump(self.model, fh)

# save classes
pickle.dump(self.classes, open(directory / "classes.pkl", "wb"))
with open(directory / "classes.pkl", "wb") as fh:
pickle.dump(self.classes, fh)

def load(self, directory):
# load model
Expand Down
2 changes: 1 addition & 1 deletion openstf/tasks/utils/predictionjobloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _get_prediction_jobs(self):

return prediction_jobs

def _add_missing_info_prediciton_jobs(self, prediction_jobs_input):
def _add_missing_info_prediction_jobs(self, prediction_jobs_input):
prediction_jobs = []

for pj in prediction_jobs_input:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def read_long_description_from_readme():

setup(
name="openstf",
version="1.5.3",
version="1.5.4",
packages=find_packages(include=["openstf", "openstf.*"]),
description="Open short term forcasting",
long_description=read_long_description_from_readme(),
Expand Down

0 comments on commit c66a7ab

Please sign in to comment.