mirror of
https://github.com/wassname/ray.git
synced 2026-07-20 12:40:20 +08:00
[raysgd] Cleanup User API (#7384)
* Init fp16 * fp16 and schedulers * scheduler linking and fp16 * to fp16 * loss scaling and documentation * more documentation * add tests, refactor config * moredocs * more docs * fix logo, add test mode, add fp16 flag * fix tests * fix scheduler * fix apex * improve safety * fix tests * fix tests * remove pin memory default * rm * fix * Update doc/examples/doc_code/raysgd_torch_signatures.py * fix * migrate changes from other PR * ok thanks * pass * signatures * lint' * Update python/ray/experimental/sgd/pytorch/utils.py * Apply suggestions from code review Co-Authored-By: Edward Oakes <ed.nmi.oakes@gmail.com> * should address most comments * comments * fix this ci * first_pass * add overrides * override * fixing up operators * format * sgd * constants * rm * revert * save * failures * fixes * trainer * run test * operator * code * op * ok done * operator * sgd test fixes * ok * trainer * format * Apply suggestions from code review Co-Authored-By: Edward Oakes <ed.nmi.oakes@gmail.com> * Update doc/source/raysgd/raysgd_pytorch.rst * docstring * dcgan * doc * commits * nit * testing * revert * Start renaming pytorch to torch * Rename PyTorchTrainer to TorchTrainer * Rename PyTorch runners to Torch runners * Finish renaming API * Rename to torch in tests * Finish renaming docs + tests * Run format + fix DeprecationWarning * fix * move tests up * benchmarks * rename * remove some args * better metrics output * fix up the benchmark * benchmark-yaml * horovod-benchmark * benchmarks * Remove benchmark code for cleanups * makedatacreator * relax * metrics * autosetsampler * profile * movements * OK * smoothen * fix * nitdocs * loss * comments * fix * fix * runner_tests * codes * example * fix_test * fix * tests Co-authored-by: Edward Oakes <ed.nmi.oakes@gmail.com> Co-authored-by: Maksim Smolin <maximsmol@gmail.com>
This commit is contained in:
co-authored by
Edward Oakes
Maksim Smolin
parent
89ec4adb72
commit
d192ef0611
@@ -61,11 +61,11 @@ class TestTorchRunner(unittest.TestCase):
|
||||
runner.setup()
|
||||
runner.train_epoch()
|
||||
runner.train_epoch()
|
||||
runner.train_epoch()
|
||||
result = runner.train_epoch()
|
||||
self.assertEqual(runner.training_operator.validate.call_count, 0)
|
||||
runner.validate()
|
||||
self.assertTrue(runner.training_operator.validate.called)
|
||||
self.assertEqual(runner.stats()["epoch"], 3)
|
||||
self.assertEqual(result["epoch"], 3)
|
||||
|
||||
def testtrain_epoch(self):
|
||||
class MockOperator(TrainingOperator):
|
||||
@@ -88,7 +88,7 @@ class TestTorchRunner(unittest.TestCase):
|
||||
result = runner.train_epoch()
|
||||
self.assertEqual(runner.training_operator.count, 3)
|
||||
self.assertEqual(result["count"], 3)
|
||||
self.assertEqual(runner.stats()["epoch"], 3)
|
||||
self.assertEqual(result["epoch"], 3)
|
||||
|
||||
def testGivens(self):
|
||||
class MockOperator(TrainingOperator):
|
||||
|
||||
Reference in New Issue
Block a user