Reputation: 7410
Using the Python Sagemaker SDK, one can launch a training job using TensorFlow with the following code specifying the S3 bucket where the results should be placed on the attribute model_dir
:
import sagemaker
from sagemaker.tensorflow import TensorFlow
sess = sagemaker.Session()
tf_estimator = TensorFlow(model_dir='s3://bucket_name', ...)
tf_estimator.fit(...)
However, after training is done, I can see the output on the default Sagemaker bucket but not on the specified bucket, what could be going wrong?
Upvotes: 0
Views: 415
Reputation: 7410
Found an answer thanks to AWS support:
The TensorFlow
estimator has as a base class sagemaker.estimator.Framework
which in turn has as a base class sagemaker.estimator.EstimatorBase
which accepts the parameter output_path
.
So the initialization of the TensorFlow
estimator to pass a custom output bucket would look like:
S3_BUCKET = 's3://xxx'
tf_estimator = TensorFlow(..., output_path=S3_BUCKET)
Upvotes: 2