From 8afb6d62f2fa5ec87f094026ea623be6059a0b68 Mon Sep 17 00:00:00 2001 From: Umberto Mignozzetti Date: Mon, 15 Sep 2025 11:29:21 -0700 Subject: [PATCH] Fix typo in average_gradients function call (#2594) --- docs/src/usage/distributed.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/usage/distributed.rst b/docs/src/usage/distributed.rst index 493819c04..f1a1e4e94 100644 --- a/docs/src/usage/distributed.rst +++ b/docs/src/usage/distributed.rst @@ -184,7 +184,7 @@ almost identical to the example above: def step(model, x, y): loss, grads = loss_grad_fn(model, x, y) - grads = mlx.nn.average_gradients(grads) # <---- This line was added + grads = mx.nn.average_gradients(grads) # <---- This line was added optimizer.update(model, grads) return loss