Skip to content

Tensorflow script mode saves model in different directory #521

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

Closed
harusametime opened this issue Dec 1, 2018 · 3 comments
Closed

Tensorflow script mode saves model in different directory #521

harusametime opened this issue Dec 1, 2018 · 3 comments

Comments

@harusametime
Copy link
Contributor

harusametime commented Dec 1, 2018

System Information

  • Framework (e.g. TensorFlow) / Algorithm (e.g. KMeans): Tensorflow
  • Framework Version: 1.11.0
  • Python Version: 3.6.6
  • CPU or GPU: CPU
  • Python SDK Version: 1.16.0
  • Are you using a custom image: No

Describe the problem

When calling fit(), Tensorflow script mode does not save a trained model to s3://(default-bucket)/(default-job-name)/output/model.tar.gz, but to s3://(default-bucket)/(default-job-name)/model/ (see a picture below). However, the estimator assumes that the model is saved as model.tar.gz, estimator.deploy fails without explicitly compressing the model files and specifying the directory. I think the trained model should be saved asmodel.tar.gz in the directory output as well as other SageMaker containers do.

screenshot

Minimal repro / logs

Notebook: https://gist.github.com/harusametime/ffaee7c96cfc2a50279923391dff435f
entry point: https://gist.github.com/harusametime/d0a92d715fe0610b4b8fbd11f6d42359

@harusametime
Copy link
Contributor Author

Related to this issue? aws/sagemaker-tensorflow-training-toolkit#130

@harusametime
Copy link
Contributor Author

Find my mistake to read model_dir. Let me check it again.

@harusametime
Copy link
Contributor Author

Fixing a bug related to model_dir path resolves the issue. thanks.
https://gist.github.com/harusametime/d0a92d715fe0610b4b8fbd11f6d42359/revisions

metrizable pushed a commit to metrizable/sagemaker-python-sdk that referenced this issue Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant