MCPcopy Create free account
hub / github.com/ml-explore/mlx / test_optimizer_state

Method test_optimizer_state

python/tests/test_optimizers.py:46–52  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

44
45class TestOptimizers(mlx_tests.MLXTestCase):
46 def test_optimizer_state(self):
47 optim = opt.SGD(0.1)
48 optim.state["hello"] = "world"
49 self.assertEqual(optim.state["hello"], "world")
50
51 optim.state = {0: 1}
52 self.assertEqual(optim.state, {0: 1})
53
54 def test_optimizers(self):
55 params = {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected