|
29 | 29 | from sagemaker.utils import get_config_value |
30 | 30 | from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT |
31 | 31 |
|
32 | | -LOGGER = logging.getLogger('sagemaker') |
| 32 | +logger = logging.getLogger('sagemaker') |
33 | 33 |
|
34 | 34 |
|
35 | 35 | _FRAMEWORK_MODE_ARGS = ('training_steps', 'evaluation_steps', 'requirements_file', 'checkpoint_path') |
@@ -154,7 +154,7 @@ def run(self): |
154 | 154 | """Run TensorBoard process.""" |
155 | 155 | port, tensorboard_process = self.create_tensorboard_process() |
156 | 156 |
|
157 | | - LOGGER.info('TensorBoard 0.1.7 at http://localhost:{}'.format(port)) |
| 157 | + logger.info('TensorBoard 0.1.7 at http://localhost:{}'.format(port)) |
158 | 158 | while not self.estimator.checkpoint_path: |
159 | 159 | self.event.wait(1) |
160 | 160 | with self._temporary_directory() as aws_sync_dir: |
@@ -231,11 +231,15 @@ def __init__(self, training_steps=None, evaluation_steps=None, checkpoint_path=N |
231 | 231 | **kwargs: Additional kwargs passed to the Framework constructor. |
232 | 232 | """ |
233 | 233 | if framework_version is None: |
234 | | - LOGGER.warning(fw.empty_framework_version_warning(TF_VERSION, self.LATEST_VERSION)) |
| 234 | + logger.warning(fw.empty_framework_version_warning(TF_VERSION, self.LATEST_VERSION)) |
235 | 235 | self.framework_version = framework_version or TF_VERSION |
236 | 236 |
|
237 | 237 | super(TensorFlow, self).__init__(image_name=image_name, **kwargs) |
238 | 238 | self.checkpoint_path = checkpoint_path |
| 239 | + |
| 240 | + if py_version == 'py2': |
| 241 | + logger.warning('tensorflow py2 container will be deprecated soon.') |
| 242 | + |
239 | 243 | self.py_version = py_version |
240 | 244 | self.training_steps = training_steps |
241 | 245 | self.evaluation_steps = evaluation_steps |
@@ -320,7 +324,7 @@ def fit_super(): |
320 | 324 | raise ValueError("Tensorboard is not supported with async fit") |
321 | 325 |
|
322 | 326 | if self._script_mode_enabled() and run_tensorboard_locally: |
323 | | - LOGGER.warning(_SCRIPT_MODE_TENSORBOARD_WARNING.format(self.model_dir)) |
| 327 | + logger.warning(_SCRIPT_MODE_TENSORBOARD_WARNING.format(self.model_dir)) |
324 | 328 | fit_super() |
325 | 329 | elif run_tensorboard_locally: |
326 | 330 | tensorboard = Tensorboard(self) |
|
0 commit comments