Skip to content

Commit

Permalink
Fix hard coded checkpoint prefix for tensorflow deployer. (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
xunzhang authored and dcrankshaw committed Apr 13, 2018
1 parent 0d89cb2 commit 4e775e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clipper_admin/clipper_admin/deployers/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ def predict(sess, inputs):
raise e
else:
# Check if all the 4 files are present
if glob.glob('data/*.meta') and glob.glob(
'data/*.index') and glob.glob(
"data/checkpoint") and glob.glob("data/*.data*"):
suffixes = [os.path.join(tf_sess_or_saved_model_path, suffix) \
for suffix in ("*.meta", "*.index", "checkpoint", "*.data*")]
if sum([1 for suffix in suffixes if glob.glob(suffix)]) == 4:
try:
shutil.copytree(tf_sess_or_saved_model_path,
os.path.join(serialization_dir,
Expand Down

0 comments on commit 4e775e3

Please sign in to comment.