File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1111# ANY KIND, either express or implied. See the License for the specific
1212# language governing permissions and limitations under the License.
1313from __future__ import absolute_import
14+
15+ import os
16+
1417import pytest
1518
1619
20+ def create_sagemaker_local_network ():
21+ """
22+ Docker has a known race condition which allows two parallel processes
23+ to create a duplicated networks with the same name. This function
24+ creates the network sagemaker-local beforehand, avoiding this issue
25+ in CI.
26+ """
27+ os .system ('docker network create sagemaker-local' )
28+
29+
30+ create_sagemaker_local_network ()
31+
32+
1733@pytest .fixture (scope = 'session' , params = ['local' , 'ml.c4.xlarge' ])
1834def instance_type (request ):
1935 return request .param
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ def tf_training_job(sagemaker_session, tf_full_version):
3838 framework_version = tf_full_version ,
3939 training_steps = 1 ,
4040 evaluation_steps = 1 ,
41+ checkpoint_path = '/opt/ml/model' ,
4142 hyperparameters = {'input_tensor_name' : 'inputs' },
4243 train_instance_count = 1 ,
4344 train_instance_type = 'ml.c4.xlarge' ,
@@ -114,6 +115,7 @@ def test_tf_async(sagemaker_session):
114115 role = 'SageMakerRole' ,
115116 training_steps = 1 ,
116117 evaluation_steps = 1 ,
118+ checkpoint_path = '/opt/ml/model' ,
117119 hyperparameters = {'input_tensor_name' : 'inputs' },
118120 train_instance_count = 1 ,
119121 train_instance_type = 'ml.c4.xlarge' ,
You can’t perform that action at this time.
0 commit comments