Skip to content

fbcode/spdl/tests/cuda/nvjpeg_decode_test.py#1355

Open
meta-codesync[bot] wants to merge 1 commit intomainfrom
export-D101346101
Open

fbcode/spdl/tests/cuda/nvjpeg_decode_test.py#1355
meta-codesync[bot] wants to merge 1 commit intomainfrom
export-D101346101

Conversation

@meta-codesync
Copy link
Copy Markdown
Contributor

@meta-codesync meta-codesync Bot commented Apr 17, 2026

Reviewed By: hanle11

Differential Revision: D101346101

Reviewed By: hanle11

Differential Revision: D101346101
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 17, 2026
Copy link
Copy Markdown

@JiwaniZakir JiwaniZakir left a comment

Choose a reason for hiding this comment

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

The type annotation on _test's data parameter looks incorrect — it's typed as str, but JPEG image data is binary, so it should almost be bytes. This is inconsistent with _is_all_zero, which is correctly annotated as arr: bytes. Since the whole point of adding # pyre-strict is to get accurate static analysis, a wrong annotation here undermines that goal and could suppress real type errors in callers. It's worth checking what get_sample actually returns to confirm, and then fixing _test's signature accordingly. Additionally, the declared return type torch.Tensor for _test should be verified against the actual return path in the full function body, since the diff only shows the signature change.

@mthrok
Copy link
Copy Markdown
Collaborator

mthrok commented Apr 19, 2026

Hi @JiwaniZakir

Thanks for the review. Indeed this one is incorrect. I forwarded the feedback to the author.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants