Commit 2ffcc5ac authored by Ananth Subramaniam's avatar Ananth Subramaniam Committed by Facebook GitHub Bot
Browse files

Fix test after optimization tracking

Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/188

Reviewed By: tangbinh, wat3rBro

Differential Revision: D34658350

fbshipit-source-id: 36e8c1e8c5dab97990b1d9a5b1a58667e0e3c455
parent c24d9370
...@@ -222,6 +222,11 @@ class TestLightningTask(unittest.TestCase): ...@@ -222,6 +222,11 @@ class TestLightningTask(unittest.TestCase):
assert batch assert batch
assert opt assert opt
assert manual_backward assert manual_backward
# We take step the optimizer for progress tracking to occur
# This is reflected in the Trainer's global_step property
# which is used to determine when to stop training
# when specifying the loop bounds with Trainer(max_steps=N)
opt.step()
return {"total_loss": 0.4} return {"total_loss": 0.4}
cfg = self._get_cfg(tmp_dir) cfg = self._get_cfg(tmp_dir)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment