Skip to content

Commit

Permalink
Merge pull request deepchem#1776 from deepchem/joblib
Browse files Browse the repository at this point in the history
Removes scikit-learn joblib
  • Loading branch information
Bharath Ramsundar authored Mar 14, 2020
2 parents 200488c + e47d866 commit 273e6af
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions deepchem/utils/save.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
from __future__ import division
from __future__ import unicode_literals

# TODO(rbharath): Use standard joblib once old-data has been regenerated.
import joblib
from sklearn.externals import joblib as old_joblib
import gzip
import json
import pickle
Expand Down Expand Up @@ -219,13 +217,7 @@ def load_from_disk(filename):
if os.path.splitext(name)[1] == ".pkl":
return load_pickle_from_disk(filename)
elif os.path.splitext(name)[1] == ".joblib":
try:
return joblib.load(filename)
except KeyError:
# Try older joblib version for legacy files.
return old_joblib.load(filename)
except ValueError:
return old_joblib.load(filename)
return joblib.load(filename)
elif os.path.splitext(name)[1] == ".csv":
# First line of user-specified CSV *must* be header.
df = pd.read_csv(filename, header=0)
Expand Down

0 comments on commit 273e6af

Please sign in to comment.