Skip to content

Commit

Permalink
Merge pull request #15 from maxibor/dev
Browse files Browse the repository at this point in the history
Fix picke protocol issues
  • Loading branch information
maxibor committed Nov 18, 2020
2 parents d987d51 + a142469 commit 5b8c0c9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pydamage/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "0.50"
__version__ = "0.50beta"
from pydamage.main import analyze
8 changes: 5 additions & 3 deletions pydamage/accuracy_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
import pandas as pd
import numpy as np
import pickle
import gzip


def load_model():
"""Returns the pmml model"""
stream = pkg_resources.resource_stream(
__name__, "models/accuracy_model_v2_python.pickle"
model_path = pkg_resources.resource_stream(
__name__, "models/accuracy_model_v2_python.pickle.gz"
)
return pickle.load(stream)
with gzip.open(model_path, 'rb') as mod:
return pickle.load(mod)


def prepare_data(pd_df):
Expand Down
Binary file removed pydamage/models/accuracy_model_v2_python.pickle
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ def get_version(rel_path):
"statsmodels",
"matplotlib",
"tqdm",
"biopython",
"biopython"
],
packages=find_packages(include=["pydamage"]),
entry_points={"console_scripts": ["pydamage = pydamage.cli:cli"]},
include_package_data=True,
package_data={"": ["models/accuracy_model_v2_python.pickle"]},
package_data={"": ["models/accuracy_model_v2_python.pickle.gz"]},
)

0 comments on commit 5b8c0c9

Please sign in to comment.