Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNIST example error: AttributeError: np.float_ was removed in the NumPy 2.0 release. Use np.float64 instead. #654

Open
MichaelD7911 opened this issue Oct 9, 2024 · 0 comments

Comments

@MichaelD7911
Copy link

When I was running MNIST example I've got following error:

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃        Test metric        ┃       DataLoader 0        ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│         test/acc          │    0.9761999845504761     │
│         test/loss         │    0.08074062317609787    │
└───────────────────────────┴───────────────────────────┘
Testing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79/79 0:00:01 • 0:00:00 57.54it/s  
[2024-10-09 14:27:19,255][__main__][INFO] - [rank: 0] Best ckpt path: /home/michael/lightning-hydra-template/logs/train/runs/2024-10-09_14-25-38/checkpoints/epoch_007.ckpt
[2024-10-09 14:27:19,256][src.utils.utils][INFO] - [rank: 0] Output dir: /home/michael/lightning-hydra-template/logs/train/runs/2024-10-09_14-25-38
Error executing job with overrides: []
Traceback (most recent call last):
  File "/home/michael/lightning-hydra-template/src/train.py", line 120, in main
    metric_dict, _ = train(cfg)
  File "/home/michael/lightning-hydra-template/src/utils/utils.py", line 87, in wrap
    import wandb
  File "/home/michael/miniconda3/envs/env/lib/python3.9/site-packages/wandb/__init__.py", line 27, in <module>
    from wandb import sdk as wandb_sdk
  File "/home/michael/miniconda3/envs/env/lib/python3.9/site-packages/wandb/sdk/__init__.py", line 25, in <module>
    from .artifacts.artifact import Artifact
  File "/home/michael/miniconda3/envs/env/lib/python3.9/site-packages/wandb/sdk/artifacts/artifact.py", line 45, in <module>
    from wandb import data_types, env, util
  File "/home/michael/miniconda3/envs/env/lib/python3.9/site-packages/wandb/data_types.py", line 32, in <module>
    from .sdk.data_types import _dtypes
  File "/home/michael/miniconda3/envs/env/lib/python3.9/site-packages/wandb/sdk/data_types/_dtypes.py", line 393, in <module>
    NumberType.types.append(np.float_)
  File "/home/michael/miniconda3/envs/env/lib/python3.9/site-packages/numpy/__init__.py", line 397, in __getattr__
    raise AttributeError(
AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant