added new merged Trainer test (#11090)
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
import subprocess
|
||||||
import unittest
|
import unittest
|
||||||
from ast import literal_eval
|
from ast import literal_eval
|
||||||
|
|
||||||
@@ -28,10 +29,23 @@ if is_sagemaker_available():
|
|||||||
"instance_type": "ml.p3dn.24xlarge",
|
"instance_type": "ml.p3dn.24xlarge",
|
||||||
"results": {"train_runtime": 700, "eval_accuracy": 0.3, "eval_loss": 1.2},
|
"results": {"train_runtime": 700, "eval_accuracy": 0.3, "eval_loss": 1.2},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"framework": "pytorch",
|
||||||
|
"script": "run_glue.py",
|
||||||
|
"model_name_or_path": "roberta-large",
|
||||||
|
"instance_type": "ml.p3dn.24xlarge",
|
||||||
|
"results": {"train_runtime": 700, "eval_accuracy": 0.3, "eval_loss": 1.2},
|
||||||
|
},
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
class MultiNodeTest(unittest.TestCase):
|
class MultiNodeTest(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
if self.framework == "pytorch":
|
||||||
|
subprocess.run(
|
||||||
|
f"cp ./examples/text-classification/run_glue.py {self.env.test_path}/run_glue.py".split(),
|
||||||
|
encoding="utf-8",
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
assert hasattr(self, "env")
|
assert hasattr(self, "env")
|
||||||
|
|
||||||
def create_estimator(self, instance_count):
|
def create_estimator(self, instance_count):
|
||||||
|
|||||||
Reference in New Issue
Block a user