-
Notifications
You must be signed in to change notification settings - Fork 162
Set S3 environment variables #112
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
Conversation
import subprocess | ||
import time | ||
|
||
import sagemaker_containers.beta.framework as framework | ||
|
||
import sagemaker_tensorflow_container.s3_utils as s3_utils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just do:
from sagemaker_tensorflow_container import s3_utils
@@ -151,5 +154,6 @@ def main(): | |||
""" | |||
hyperparameters = framework.env.read_hyperparameters() | |||
env = framework.training_env(hyperparameters=hyperparameters) | |||
s3_utils.configure_s3_env(env.hyperparameters['model_dir'], os.environ['SAGEMAKER_REGION']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: based on Python pep8 conventions https://www.python.org/dev/peps/pep-0008/#naming-conventions
s3_utils.configure_s3_env
sounds repetitive, some options could be:
- s3.configure
- s3.configure_env
- s3.configure_env_vars
- s3_utils.configure
...
Consider both the module and the function together for naming.
* Setting S3 environment variables before training starts * Remove S3 environment variable setting in test training script * Add unit tests
* Setting S3 environment variables before training starts * Remove S3 environment variable setting in test training script * Add unit tests
* Setting S3 environment variables before training starts * Remove S3 environment variable setting in test training script * Add unit tests
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.