Skip to content

Conversation

scottXchoo
Copy link

@scottXchoo scottXchoo commented Aug 2, 2025

What does this PR do?

This PR replaces the deprecated usage of np.Inf with np.inf to ensure compatibility with NumPy 2.0 and above.

Why is this change necessary?

The current code fails under NumPy 2.0 with the following error:

AttributeError: np.Inf was removed in the NumPy 2.0 release. Use np.inf instead.

This breaks the training pipeline for users on the latest NumPy version.

What files are affected?

  • utils/tools.py — line initializing self.val_loss_min

Additional Notes

This is a minimal fix that does not change any model behavior or logic. It simply restores compatibility with newer environments (e.g., Colab or Python 3.11+ with NumPy ≥ 2.0).

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

Successfully merging this pull request may close these issues.

1 participant