Skip to content

Commit d191301

Browse files
committed
fix: new trcomp-pt test to install HF packages using requirements.txt
1 parent d8d507a commit d191301

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

tests/integ/test_training_compiler.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ def imagenet_val_set(request, sagemaker_session, tmpdir_factory):
5050
key_prefix="Imagenet/TFRecords/validation",
5151
)
5252
train_input = sagemaker_session.upload_data(
53-
path=local_path,
54-
key_prefix="integ-test-data/trcomp/tensorflow/imagenet/val",
53+
path=local_path, key_prefix="integ-test-data/trcomp/tensorflow/imagenet/val"
5554
)
5655
return train_input
5756

@@ -149,11 +148,11 @@ def test_pytorch(
149148
Test the PyTorch estimator
150149
"""
151150
with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
152-
data_path = os.path.join(DATA_DIR, "huggingface_byoc")
153151

154152
hf = PyTorch(
155153
py_version="py38",
156-
entry_point=os.path.join(data_path, "run_glue.py"),
154+
source_dir=os.path.join(DATA_DIR, "huggingface_byoc"),
155+
entry_point="run_glue.py",
157156
role="SageMakerRole",
158157
framework_version=pytorch_training_compiler_latest_version,
159158
instance_count=instance_count,
@@ -217,10 +216,7 @@ def test_huggingface_tensorflow(
217216

218217
@pytest.mark.release
219218
def test_tensorflow(
220-
sagemaker_session,
221-
gpu_instance_type,
222-
tensorflow_training_latest_version,
223-
imagenet_val_set,
219+
sagemaker_session, gpu_instance_type, tensorflow_training_latest_version, imagenet_val_set
224220
):
225221
"""
226222
Test the TensorFlow estimator
@@ -272,8 +268,4 @@ def test_tensorflow(
272268
compiler_config=TFTrainingCompilerConfig(),
273269
)
274270

275-
tf.fit(
276-
inputs=imagenet_val_set,
277-
logs=True,
278-
wait=True,
279-
)
271+
tf.fit(inputs=imagenet_val_set, logs=True, wait=True)

0 commit comments

Comments
 (0)