Skip to content

Commit 76800fb

Browse files
authored
added new merged Trainer test (#11090)
1 parent b219d6b commit 76800fb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/sagemaker/test_multi_node_model_parallel.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import subprocess
23
import unittest
34
from ast import literal_eval
45

@@ -28,10 +29,23 @@
2829
"instance_type": "ml.p3dn.24xlarge",
2930
"results": {"train_runtime": 700, "eval_accuracy": 0.3, "eval_loss": 1.2},
3031
},
32+
{
33+
"framework": "pytorch",
34+
"script": "run_glue.py",
35+
"model_name_or_path": "roberta-large",
36+
"instance_type": "ml.p3dn.24xlarge",
37+
"results": {"train_runtime": 700, "eval_accuracy": 0.3, "eval_loss": 1.2},
38+
},
3139
]
3240
)
3341
class MultiNodeTest(unittest.TestCase):
3442
def setUp(self):
43+
if self.framework == "pytorch":
44+
subprocess.run(
45+
f"cp ./examples/text-classification/run_glue.py {self.env.test_path}/run_glue.py".split(),
46+
encoding="utf-8",
47+
check=True,
48+
)
3549
assert hasattr(self, "env")
3650

3751
def create_estimator(self, instance_count):

0 commit comments

Comments
 (0)