Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cpnota committed Jan 26, 2024
1 parent 0ba62f8 commit 0ccd4c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion all/presets/builder_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def setUp(self):
"lr": 1e-4,
"gamma": 0.99
}

class MockPreset():
def __init__(self, env, name, device, **hyperparameters):
self.env = env
Expand Down Expand Up @@ -48,7 +49,7 @@ def test_override_device(self):

def test_no_side_effects(self):
self.builder.device('cpu').hyperparameters(lr=0.01).device('cpu').env(Mock).build()
my_env = Mock
my_env = Mock
agent = self.builder.env(Mock).build()
self.assertEqual(agent.name, self.name)
self.assertEqual(agent.hyperparameters, self.default_hyperparameters)
Expand All @@ -61,5 +62,6 @@ def test_call_api(self):
self.assertEqual(agent.hyperparameters, {**self.default_hyperparameters, "lr": 0.01})
self.assertEqual(agent.device, 'cpu')


if __name__ == "__main__":
unittest.main()

0 comments on commit 0ccd4c4

Please sign in to comment.