Skip to content

Tensorboard logging breaks with certain scalar values with numpy >= 2.4.0 #21503

@pganssle-google

Description

@pganssle-google

Bug description

As of Numpy 2.4.0, converting an 0-dimensional array to a scalar is now a TypeError, following the expiration of a lengthy deprecation period.

This is triggered in src/lightning/fabric/loggers/tensorboard.py in several tests when we run with numpy >= 2.4. It is not clear to me why the CI is not picking this up, though, since the requirements/fabric/test.txt file does seem to allow more recent versions of numpy.

What version are you seeing the problem on?

master

Reproduced in studio

No response

How to reproduce the bug

Error messages and logs

# Error messages and logs here please

Environment

Current environment
#- PyTorch Lightning Version (e.g., 2.5.0):
#- PyTorch Version (e.g., 2.5):
#- Python version (e.g., 3.12):
#- OS (e.g., Linux):
#- CUDA/cuDNN version:
#- GPU models and configuration:
#- How you installed Lightning(`conda`, `pip`, source):

More info

No response

cc @ethanwharris @lantiga

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions