-
Notifications
You must be signed in to change notification settings - Fork 74k
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
Wrong path separator in error message when saved model does not exist (in keras.models.load_model) #44739
Comments
Was able to reproduce your issue in Tf Nightly 2.6.0-dev20210530, please find the gist here. Thanks! |
@spopovru Looks like this was resolved by your PR. Can we close this issue? Thanks! Error with
Error with
|
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you. |
Yes, this issue may be closed. |
System information
Current behavior
When I use function
keras.models.load_model
with incorrect path, I catch IOError:OSError: SavedModel file does not exist at: C:\IncorrectPathToSavedModel/{saved_model.pbtxt|saved_model.pb}
Because I use Windows, path separator "/" is incorrect, and when I view code of
parse_saved_model
in "\tensorflow\python\saved_model\loader_impl.py" I see hardcoded symbol in error text definition.Expected behavior
Path separator should be recived from
os.path.sep
, for example in Windows this error message must be:OSError: SavedModel file does not exist at: C:\IncorrectPathToSavedModel\{saved_model.pbtxt|saved_model.pb}
in Linux:
OSError: SavedModel file does not exist at: ~/IncorrectPathToSavedModel/{saved_model.pbtxt|saved_model.pb}
Standalone code to reproduce the issue
The text was updated successfully, but these errors were encountered: