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 cupy_to_tensor to also infer uint8 and int8 dtypes #1621

Merged
merged 9 commits into from
Apr 23, 2024

Conversation

efajardo-nv
Copy link
Contributor

@efajardo-nv efajardo-nv commented Apr 11, 2024

Description

  • Update to DType::from_numpy to handle strings that identify uint8 and int8 dtypes
  • Add unit tests for DType
  • Update to throw invalid argument exceptions on invalid numpy typestr's.

Closes #1619

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

@efajardo-nv efajardo-nv added the bug Something isn't working label Apr 11, 2024
@efajardo-nv efajardo-nv self-assigned this Apr 11, 2024
@efajardo-nv efajardo-nv requested a review from a team as a code owner April 11, 2024 21:18
@efajardo-nv efajardo-nv added the non-breaking Non-breaking change label Apr 11, 2024
@efajardo-nv efajardo-nv changed the title Fix cupy_to_tensor to infer uint8 and int8 dtypes Fix cupy_to_tensor to also infer uint8 and int8 dtypes Apr 11, 2024
Copy link
Contributor

@mdemoret-nv mdemoret-nv left a comment

Choose a reason for hiding this comment

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

This is a great opportunity to add some testing here on the DType object. Lets add tests which check for correct functionality for all supported numpy types (within reason)

Copy link
Contributor

@mdemoret-nv mdemoret-nv left a comment

Choose a reason for hiding this comment

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

Great new tests! These are perfect examples of unit testing.

@mdemoret-nv
Copy link
Contributor

/merge

@rapids-bot rapids-bot bot merged commit cbfea7d into nv-morpheus:branch-24.06 Apr 23, 2024
12 checks passed
@mdemoret-nv mdemoret-nv deleted the from-numpy-dtype-fix branch April 23, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG]: TensoryMemory does not work with uint arrays
2 participants