Skip to content

Commit

Permalink
Fix flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sublee committed Jul 29, 2020
1 parent 235b93e commit fca5d65
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions tests/test_balance.py
Expand Up @@ -141,8 +141,8 @@ def test_layerwise_sandbox(device):
assert layer.training
assert all(p.device.type == device for p in layer.parameters())

assert all(not l.training for l in model)
assert all(p.device.type == 'cpu' for p in model.parameters())
assert all(not layer.training for layer in model)
assert all(param.device.type == 'cpu' for param in model.parameters())


@pytest.mark.parametrize('device', devices)
Expand Down
20 changes: 10 additions & 10 deletions tests/test_pipeline.py
Expand Up @@ -13,19 +13,19 @@ def test_clock_cycles():
assert list(clock_cycles(3, 1)) == [[(0, 0)], [(1, 0)], [(2, 0)]]

assert list(clock_cycles(3, 3)) == [ # noqa
[(0, 0)],
[(1, 0), (0, 1)],
[(2, 0), (1, 1), (0, 2)],
[(2, 1), (1, 2)],
[(2, 2)],
[(0, 0)], # noqa
[(1, 0), (0, 1)], # noqa
[(2, 0), (1, 1), (0, 2)], # noqa
[(2, 1), (1, 2)], # noqa
[(2, 2)], # noqa
]

assert list(clock_cycles(4, 2)) == [ # noqa
[(0, 0)],
[(1, 0), (0, 1)],
[(2, 0), (1, 1)],
[(3, 0), (2, 1)],
[(3, 1)],
[(0, 0)], # noqa
[(1, 0), (0, 1)], # noqa
[(2, 0), (1, 1)], # noqa
[(3, 0), (2, 1)], # noqa
[(3, 1)], # noqa
]


Expand Down

0 comments on commit fca5d65

Please sign in to comment.