Skip to content

Commit 43fdd48

Browse files
author
Rohit Kumar Srivastava
committed
updating names to trcomp
1 parent 08058f9 commit 43fdd48

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

tests/unit/sagemaker/training_compiler/test_huggingface_pytorch_compiler.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ def test_attach(
462462
"sagemaker_program": '"iris-dnn-classifier.py"',
463463
"sagemaker_s3_uri_training": '"sagemaker-3/integ-test-data/tf_iris"',
464464
"sagemaker_container_log_level": '"logging.INFO"',
465-
"sagemaker_job_name": '"hopper"',
465+
"sagemaker_job_name": '"trcomp"',
466466
"training_steps": "100",
467467
"sagemaker_region": '"us-east-1"',
468468
TrainingCompilerConfig.HP_ENABLE_COMPILER: json.dumps(compiler_enabled),
@@ -475,27 +475,27 @@ def test_attach(
475475
"InstanceType": "ml.p3.2xlarge",
476476
},
477477
"StoppingCondition": {"MaxRuntimeInSeconds": 24 * 60 * 60},
478-
"TrainingJobName": "hopper",
478+
"TrainingJobName": "trcomp",
479479
"TrainingJobStatus": "Completed",
480-
"TrainingJobArn": "arn:aws:sagemaker:us-west-2:336:training-job/hopper",
481-
"OutputDataConfig": {"KmsKeyId": "", "S3OutputPath": "s3://place/output/hopper"},
480+
"TrainingJobArn": "arn:aws:sagemaker:us-west-2:336:training-job/trcomp",
481+
"OutputDataConfig": {"KmsKeyId": "", "S3OutputPath": "s3://place/output/trcomp"},
482482
"TrainingJobOutput": {"S3TrainingJobOutput": "s3://here/output.tar.gz"},
483483
}
484484
sagemaker_session.sagemaker_client.describe_training_job = Mock(
485485
name="describe_training_job", return_value=returned_job_description
486486
)
487487

488-
estimator = HuggingFace.attach(training_job_name="hopper", sagemaker_session=sagemaker_session)
489-
assert estimator.latest_training_job.job_name == "hopper"
488+
estimator = HuggingFace.attach(training_job_name="trcomp", sagemaker_session=sagemaker_session)
489+
assert estimator.latest_training_job.job_name == "trcomp"
490490
assert estimator.py_version == "py38"
491491
assert estimator.framework_version == "4.17.0"
492492
assert estimator.pytorch_version == "1.10.2"
493493
assert estimator.role == "arn:aws:iam::366:role/SageMakerRole"
494494
assert estimator.instance_count == 1
495495
assert estimator.max_run == 24 * 60 * 60
496496
assert estimator.input_mode == "File"
497-
assert estimator.base_job_name == "hopper"
498-
assert estimator.output_path == "s3://place/output/hopper"
497+
assert estimator.base_job_name == "trcomp"
498+
assert estimator.output_path == "s3://place/output/trcomp"
499499
assert estimator.output_kms_key == ""
500500
assert estimator.hyperparameters()["training_steps"] == "100"
501501
assert estimator.hyperparameters()[TrainingCompilerConfig.HP_ENABLE_COMPILER] == json.dumps(

tests/unit/sagemaker/training_compiler/test_huggingface_tensorflow_compiler.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def test_attach(
473473
"sagemaker_program": '"iris-dnn-classifier.py"',
474474
"sagemaker_s3_uri_training": '"sagemaker-3/integ-test-data/tf_iris"',
475475
"sagemaker_container_log_level": '"logging.INFO"',
476-
"sagemaker_job_name": '"hopper"',
476+
"sagemaker_job_name": '"trcomp"',
477477
"training_steps": "100",
478478
"sagemaker_region": '"us-east-1"',
479479
TrainingCompilerConfig.HP_ENABLE_COMPILER: json.dumps(compiler_enabled),
@@ -486,27 +486,27 @@ def test_attach(
486486
"InstanceType": "ml.p3.2xlarge",
487487
},
488488
"StoppingCondition": {"MaxRuntimeInSeconds": 24 * 60 * 60},
489-
"TrainingJobName": "hopper",
489+
"TrainingJobName": "trcomp",
490490
"TrainingJobStatus": "Completed",
491-
"TrainingJobArn": "arn:aws:sagemaker:us-west-2:336:training-job/hopper",
492-
"OutputDataConfig": {"KmsKeyId": "", "S3OutputPath": "s3://place/output/hopper"},
491+
"TrainingJobArn": "arn:aws:sagemaker:us-west-2:336:training-job/trcomp",
492+
"OutputDataConfig": {"KmsKeyId": "", "S3OutputPath": "s3://place/output/trcomp"},
493493
"TrainingJobOutput": {"S3TrainingJobOutput": "s3://here/output.tar.gz"},
494494
}
495495
sagemaker_session.sagemaker_client.describe_training_job = Mock(
496496
name="describe_training_job", return_value=returned_job_description
497497
)
498498

499-
estimator = HuggingFace.attach(training_job_name="hopper", sagemaker_session=sagemaker_session)
500-
assert estimator.latest_training_job.job_name == "hopper"
499+
estimator = HuggingFace.attach(training_job_name="trcomp", sagemaker_session=sagemaker_session)
500+
assert estimator.latest_training_job.job_name == "trcomp"
501501
assert estimator.py_version == huggingface_training_compiler_py_version
502502
assert estimator.framework_version == "4.17.0"
503503
assert estimator.tensorflow_version == "2.6.3"
504504
assert estimator.role == "arn:aws:iam::366:role/SageMakerRole"
505505
assert estimator.instance_count == 1
506506
assert estimator.max_run == 24 * 60 * 60
507507
assert estimator.input_mode == "File"
508-
assert estimator.base_job_name == "hopper"
509-
assert estimator.output_path == "s3://place/output/hopper"
508+
assert estimator.base_job_name == "trcomp"
509+
assert estimator.output_path == "s3://place/output/trcomp"
510510
assert estimator.output_kms_key == ""
511511
assert estimator.hyperparameters()["training_steps"] == "100"
512512
assert estimator.hyperparameters()[TrainingCompilerConfig.HP_ENABLE_COMPILER] == json.dumps(

0 commit comments

Comments
 (0)