Skip to content

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