tensorflow: `files_io.get_matching_files` fails for valid filenames that contain globs
the function files_io.get_matching_files says it takes a “filepath”, but actually it takes a glob
this means that if you save your checkpoints to a folder like x=[abc], then you can’t load the previous checkpoint using something like:
def load_checkpoint(sess, checkpoint_path):
saver = tf.train.Saver(tf.global_variables())
ckpt = tf.train.get_checkpoint_state(checkpoint_path)
tf.logging.info('Loading model %s.', ckpt.model_checkpoint_path)
saver.restore(sess, ckpt.model_checkpoint_path)
where checkpoint_path="./logs/x=[abc]".
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (6 by maintainers)
Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The Tensorflow team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow space.
@Venkat6871 this kind of automated response is not appreciated on such an old issue.
Seems to be a bug in the checkpoint reading code: it assumes end of path is a glob but doesn’t check that no globbing characters are used in the path before that.
I have a roadmap to fix all of these filesystem issues but they are pending on modularizing the filesystem support so it will be a while until I get here.
If you have a PR that fixes the behavior at the beginning of this comment, I’d be happy to review ahead of roadmap.
Sorry it takes too long to get to a fix on my side.