Skip to content

fix: change model_dir to training job name if it is for tuning. #179

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
Apr 12, 2019
Merged

fix: change model_dir to training job name if it is for tuning. #179

merged 5 commits into from
Apr 12, 2019

Conversation

chuyang-deng
Copy link
Contributor

Issue #, if available:

Description of changes:
Change model_dir to training job name if this training job is part of tuning job.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@@ -192,6 +192,10 @@ def main():
"""
hyperparameters = framework.env.read_hyperparameters()
env = framework.training_env(hyperparameters=hyperparameters)

if '_tuning_objective_metric' in hyperparameters:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@@ -192,6 +192,10 @@ def main():
"""
hyperparameters = framework.env.read_hyperparameters()
env = framework.training_env(hyperparameters=hyperparameters)

if '_tuning_objective_metric' in hyperparameters:
env.hyperparameters['model_dir'] = env.job_name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should probably append env.job_name to the original model_dir rather than replacing the original value entirely. (the old version appended to checkpoint_path)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@icywang86rui icywang86rui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship!

@chuyang-deng chuyang-deng merged commit 00a7a0b into aws:script-mode Apr 12, 2019
Elizaaaaa pushed a commit to Elizaaaaa/sagemaker-tensorflow-container that referenced this pull request Nov 4, 2019
)

* Change model_dir to training job if the training job is for tuning.
Elizaaaaa pushed a commit to Elizaaaaa/sagemaker-tensorflow-container that referenced this pull request Nov 4, 2019
)

* Change model_dir to training job if the training job is for tuning.
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.

3 participants