Skip to content

Commit

Permalink
added new merged Trainer test (#11090)
Browse files Browse the repository at this point in the history
  • Loading branch information
philschmid authored Apr 6, 2021
1 parent b219d6b commit 76800fb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/sagemaker/test_multi_node_model_parallel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import subprocess
import unittest
from ast import literal_eval

Expand Down Expand Up @@ -28,10 +29,23 @@
"instance_type": "ml.p3dn.24xlarge",
"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):
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")

def create_estimator(self, instance_count):
Expand Down

0 comments on commit 76800fb

Please sign in to comment.