SIGN IN SIGN UP

Pretrain, finetune ANY AI model of ANY size on 1 or 10,000+ GPUs with zero code changes.

0 0 0 Python

Fix LearningRateMonitor TypeError on MPS with float64 lr values (#21545)

* Fix LearningRateMonitor TypeError on MPS with float64 lr values

When an optimizer's learning rate is np.float64, the LearningRateMonitor
crashes on MPS because MPS doesn't support float64 tensors. Fix by
converting values to Python float before creating the tensor, which
ensures compatibility with all device backends.

Fixes #20250

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update

* update

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: deependujha <deependujha21@gmail.com>
V
Varun Chawla committed
7983ecbaaf1107a58af21e394f7974ef60e960ba
Parent: 9f074af
Committed by GitHub <noreply@github.com> on 3/20/2026, 1:47:19 PM