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 11
11
# ANY KIND, either express or implied. See the License for the specific
12
12
# language governing permissions and limitations under the License.
13
13
from __future__ import absolute_import
14
+
15
+ import os
16
+
14
17
import pytest
15
18
16
19
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
+
17
33
@pytest .fixture (scope = 'session' , params = ['local' , 'ml.c4.xlarge' ])
18
34
def instance_type (request ):
19
35
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):
38
38
framework_version = tf_full_version ,
39
39
training_steps = 1 ,
40
40
evaluation_steps = 1 ,
41
+ checkpoint_path = '/opt/ml/model' ,
41
42
hyperparameters = {'input_tensor_name' : 'inputs' },
42
43
train_instance_count = 1 ,
43
44
train_instance_type = 'ml.c4.xlarge' ,
@@ -114,6 +115,7 @@ def test_tf_async(sagemaker_session):
114
115
role = 'SageMakerRole' ,
115
116
training_steps = 1 ,
116
117
evaluation_steps = 1 ,
118
+ checkpoint_path = '/opt/ml/model' ,
117
119
hyperparameters = {'input_tensor_name' : 'inputs' },
118
120
train_instance_count = 1 ,
119
121
train_instance_type = 'ml.c4.xlarge' ,
You can’t perform that action at this time.
0 commit comments