Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug when checkpoint dir not ends with '/' #479

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions easy_rec/python/utils/estimator_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,8 +885,11 @@ def get_latest_checkpoint_from_checkpoint_path(checkpoint_path,
ignore_ckpt_error):
ckpt_path = None
if checkpoint_path.endswith('/') or gfile.IsDirectory(checkpoint_path + '/'):
if gfile.Exists(checkpoint_path):
ckpt_path = latest_checkpoint(checkpoint_path)
checkpoint_dir = checkpoint_path
if not checkpoint_dir.endswith('/'):
checkpoint_dir = checkpoint_dir + '/'
if gfile.Exists(checkpoint_dir):
ckpt_path = latest_checkpoint(checkpoint_dir)
if ckpt_path:
logging.info(
'fine_tune_checkpoint is directory, will use the latest checkpoint: %s'
Expand Down
Loading