Skip to content

[TEST][CODEGEN] Fix the test scripts tries to tell numpy a dtype name that it cannot recognise#18430

Merged
tlopex merged 2 commits intoapache:mainfrom
cchung100m:issue-18394
Nov 11, 2025
Merged

[TEST][CODEGEN] Fix the test scripts tries to tell numpy a dtype name that it cannot recognise#18430
tlopex merged 2 commits intoapache:mainfrom
cchung100m:issue-18394

Conversation

@cchung100m
Copy link
Contributor

@cchung100m cchung100m commented Nov 10, 2025

This PR is trying to fix issues #18394. The root cause was that NumPy doesn't natively understand the float4_e2m1fn dtype. The ml_dtypes package provides NumPy-compatible implementations of these custom dtypes. By importing the actual dtype object from ml_dtypes instead of using a string, NumPy can properly create arrays with the correct dtype.

@cchung100m cchung100m marked this pull request as ready for review November 11, 2025 02:22
Copy link
Member

@tlopex tlopex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks!

@tlopex tlopex merged commit f574031 into apache:main Nov 11, 2025
12 checks passed
@cchung100m cchung100m deleted the issue-18394 branch November 11, 2025 06:53
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.

2 participants