Skip to content

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

Merged
merged 5 commits into from
Nov 16, 2018
Merged

Conversation

icywang86rui
Copy link
Contributor

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.

@icywang86rui icywang86rui requested a review from mvsusp November 14, 2018 22:32
import subprocess
import time

import sagemaker_containers.beta.framework as framework

import sagemaker_tensorflow_container.s3_utils as s3_utils
Copy link
Contributor

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'])
Copy link
Contributor

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.

@icywang86rui icywang86rui merged commit a897135 into aws:script-mode Nov 16, 2018
Elizaaaaa pushed a commit to Elizaaaaa/sagemaker-tensorflow-container that referenced this pull request Nov 4, 2019
* Setting S3 environment variables before training starts

* Remove S3 environment variable setting in test training script

* Add unit tests
Elizaaaaa pushed a commit to Elizaaaaa/sagemaker-tensorflow-container that referenced this pull request Nov 4, 2019
* Setting S3 environment variables before training starts

* Remove S3 environment variable setting in test training script

* Add unit tests
Elizaaaaa pushed a commit to Elizaaaaa/sagemaker-tensorflow-container that referenced this pull request Nov 4, 2019
* Setting S3 environment variables before training starts

* Remove S3 environment variable setting in test training script

* Add unit tests
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

Successfully merging this pull request may close these issues.

2 participants