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

Merge branch-22.04 into branch-22.06 #258

Merged
merged 3 commits into from
Apr 1, 2022

Conversation

jakirkham
Copy link
Member

Addresses merge conflict seen in PR ( #257 ).

…apidsai#246)

- Expose typestr property on CuImage object
- Expose DLDataType and DLDataTypeCode under cucim.clara

Without this patch,
DLDataType and DLDataTypecode can be accessible with the below workaround.

```python
>>> from cucim import CuImage
>>> a = CuImage("notebooks/input/image.tif")
>>> b = a.read_region((0,0), (10,10))
>>> import numpy as np
>>> np.dtype(b.__array_interface__["typestr"]) # b would expose `__cuda_array_interface__` if memory is in GPU.
dtype('uint8')
```

With this patch, we can convert data type to NumPy's dtype easily, and also can access cuCIM's DLDataType.

```python
>>> from cucim import CuImage
>>> a = CuImage("notebooks/input/image.tif")
>>> b = a.read_region((0,0), (10,10))
>>> import numpy as np
>>> b.typestr
'|u1'
>>> np.dtype(b.typestr) == np.uint8
True
>>> from cucim.clara import DLDataType, DLDataTypeCode
>>> b.dtype == DLDataType(DLDataTypeCode.DLUInt, 8, 1)
True
```

Fixes rapidsai#243

Authors:
  - Gigon Bae (https://github.com/gigony)

Approvers:
  - https://github.com/jakirkham

URL: rapidsai#246
@jakirkham jakirkham requested review from a team as code owners March 31, 2022 18:49
@jakirkham jakirkham added bug Something isn't working non-breaking Introduces a non-breaking change labels Mar 31, 2022
As per rapidsai#225

Randomness updated to be applied to per image in the batch. Existing functionality of applying randomness on entire batch at once is unchanged.

Authors:
  - https://github.com/shekhardw

Approvers:
  - Gigon Bae (https://github.com/gigony)
  - https://github.com/jakirkham

URL: rapidsai#231
@sevagh
Copy link
Contributor

sevagh commented Mar 31, 2022

I added a do not merge label since this needs a manual merge, but we're still waiting for CI to finish.

@jakirkham jakirkham force-pushed the branch-22.06-merge-22.04 branch from 55c10f7 to 7a11687 Compare March 31, 2022 19:59
@jakirkham
Copy link
Member Author

Sounds good. Actually needed to push an update (now done). So that works out. Anyways should be ready to go once CI completes.

@sevagh sevagh merged commit 4061b7e into rapidsai:branch-22.06 Apr 1, 2022
@jakirkham jakirkham deleted the branch-22.06-merge-22.04 branch April 1, 2022 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working do not merge non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants