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

Fix auto-tz casting bug #905

Merged
merged 1 commit into from
Dec 15, 2022
Merged

Conversation

bozhonghu
Copy link
Collaborator

Description

Fix auto-tz casting bug. The original code was unable to handle primitive arrays, i.e. int[] and would throw an error Caused by: java.lang.ClassCastException: [I cannot be cast to [Ljava.lang.Object; when encountering int[]. This specifically can cause an issue when trying to use auto-tz to convert from an array of floats to

 type: {
        type: TENSOR
        tensorCategory: SPARSE
        dimensionType: [INT]
        valType: FLOAT
      }

Changing it to use toArray resolves this issue.

How was this PR tested?

Added a new test case within integ test

Does this PR introduce any user-facing changes?

No

@bozhonghu bozhonghu merged commit 8c8f667 into feathr-ai:main Dec 15, 2022
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.

4 participants