Skip to content

Commit

Permalink
Change
Browse files Browse the repository at this point in the history
  • Loading branch information
Bharath Ramsundar authored and Bharath Ramsundar committed Mar 14, 2020
1 parent 200488c commit e47d866
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 e47d866

Please sign in to comment.