@@ -312,7 +312,8 @@ def test_run_tensorboard_locally_without_awscli_binary(time, strftime, popen, ca
312
312
@patch ('subprocess.Popen' )
313
313
@patch ('time.strftime' , return_value = TIMESTAMP )
314
314
@patch ('time.time' , return_value = TIME )
315
- def test_run_tensorboard_locally (time , strftime , popen , call , access , rmtree , mkdtemp , sync , sagemaker_session ):
315
+ @patch ('time.sleep' )
316
+ def test_run_tensorboard_locally (sleep , time , strftime , popen , call , access , rmtree , mkdtemp , sync , sagemaker_session ):
316
317
tf = TensorFlow (entry_point = SCRIPT_PATH , role = ROLE , sagemaker_session = sagemaker_session ,
317
318
train_instance_count = INSTANCE_COUNT , train_instance_type = INSTANCE_TYPE )
318
319
@@ -322,8 +323,7 @@ def test_run_tensorboard_locally(time, strftime, popen, call, access, rmtree, mk
322
323
323
324
popen .assert_called_with (['tensorboard' , '--logdir' , '/my/temp/folder' , '--host' , 'localhost' , '--port' , '6006' ],
324
325
stderr = - 1 ,
325
- stdout = - 1
326
- )
326
+ stdout = - 1 )
327
327
328
328
329
329
@patch ('sagemaker.tensorflow.estimator.Tensorboard._sync_directories' )
@@ -335,7 +335,8 @@ def test_run_tensorboard_locally(time, strftime, popen, call, access, rmtree, mk
335
335
@patch ('subprocess.Popen' )
336
336
@patch ('time.strftime' , return_value = TIMESTAMP )
337
337
@patch ('time.time' , return_value = TIME )
338
- def test_run_tensorboard_locally_port_in_use (time , strftime , popen , call , access , socket , rmtree , mkdtemp , sync ,
338
+ @patch ('time.sleep' )
339
+ def test_run_tensorboard_locally_port_in_use (sleep , time , strftime , popen , call , access , socket , rmtree , mkdtemp , sync ,
339
340
sagemaker_session ):
340
341
tf = TensorFlow (entry_point = SCRIPT_PATH , role = ROLE , sagemaker_session = sagemaker_session ,
341
342
train_instance_count = INSTANCE_COUNT , train_instance_type = INSTANCE_TYPE )
0 commit comments