Skip to content

fix: modify type of size to tuple[int, int]#251

Merged
ktro2828 merged 1 commit into
mainfrom
fix/rlemask/size-type
Jan 23, 2026
Merged

fix: modify type of size to tuple[int, int]#251
ktro2828 merged 1 commit into
mainfrom
fix/rlemask/size-type

Conversation

@ktro2828

Copy link
Copy Markdown
Collaborator

What

This pull request makes a small but important update to the RLEMask dataclass in t4_devkit/schema/tables/object_ann.py. The change ensures that the size attribute is now consistently treated as a tuple instead of a list, improving type consistency and reliability.

  • Changed the type of the size attribute in RLEMask from list[int, int] to tuple[int, int], added a converter to enforce the tuple type, and updated the validator accordingly.

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Copilot AI review requested due to automatic review settings January 23, 2026 09:41
@github-actions github-actions Bot added the bug Something isn't working label Jan 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a type inconsistency in the RLEMask dataclass by changing the size attribute from list[int, int] to tuple[int, int]. This change improves type safety by ensuring immutability and adds a converter to automatically cast the input to a tuple.

Changes:

  • Updated the type annotation for the size attribute from list[int, int] to tuple[int, int]
  • Added a converter=tuple parameter to the field definition to automatically convert inputs to tuples
  • Updated the docstring to reflect the new tuple type

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +31 to +33
size: tuple[int, int] = field(
converter=tuple, validator=validators.deep_iterable(validators.instance_of(int))
)

Copilot AI Jan 23, 2026

Copy link

Choose a reason for hiding this comment

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

Corrected spelling of 'modity' to 'modify' in the PR title.

Copilot uses AI. Check for mistakes.
@github-actions

github-actions Bot commented Jan 23, 2026

Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
4125 3417 83% 50% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
t4_devkit/schema/tables/object_ann.py 86% 🟢
TOTAL 86% 🟢

updated for commit: 6e329fa by action🐍

@ktro2828 ktro2828 changed the title fix: modity type of size to tuple[int, int] fix: modify type of size to tuple[int, int] Jan 23, 2026
@ktro2828 ktro2828 merged commit 31a4dfc into main Jan 23, 2026
4 of 5 checks passed
@ktro2828 ktro2828 deleted the fix/rlemask/size-type branch January 23, 2026 09:42
mojomex added a commit that referenced this pull request Jan 30, 2026
* chore(deps): restrict rerun-sdk to versions >=0.20.0,<0.28.0 (#248)

* Bump version from 0.5.2 to 0.5.3 (#247)

* Bump version from 0.5.2 to 0.5.3

* Pin rerun-sdk dependency to version 0.20.0

* refactor: update custom validator definition (#250)

* refactor: update custom validator definition

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* Update t4_devkit/schema/tables/base.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: modity type of size to tuple[int, int] (#251)

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* fix: abstract away category indexing differences

Semseg and non-semseg datasets behave differently (position-based vs. explicit indexing).
Now computing index field in case position-based indexing is used.

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* fix(rendering): don't fail when map is not present

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* fix(rendering): fix iteration freezing when skipping  a pointcloud without lidarseg file

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* feat(rendering): auto-enable SEGMENTATION coloring when lidarseg is available

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* docs: checkmark for semseg viz

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* fix(rendering): fix wrongly named `color_mode` args

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* refactor(compatibility): move to schema package

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

---------

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
Co-authored-by: Kotaro Uetake <60615504+ktro2828@users.noreply.github.com>
Co-authored-by: Samrat Thapa <38401989+SamratThapa120@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ktro2828 added a commit that referenced this pull request Jan 30, 2026
* chore(deps): restrict rerun-sdk to versions >=0.20.0,<0.28.0 (#248)

* Bump version from 0.5.2 to 0.5.3 (#247)

* Bump version from 0.5.2 to 0.5.3

* Pin rerun-sdk dependency to version 0.20.0

* refactor: update custom validator definition (#250)

* refactor: update custom validator definition

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* Update t4_devkit/schema/tables/base.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: modity type of size to tuple[int, int] (#251)

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* fix: abstract away category indexing differences

Semseg and non-semseg datasets behave differently (position-based vs. explicit indexing).
Now computing index field in case position-based indexing is used.

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* fix(rendering): don't fail when map is not present

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* fix(rendering): fix iteration freezing when skipping  a pointcloud without lidarseg file

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* feat(rendering): auto-enable SEGMENTATION coloring when lidarseg is available

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* docs: checkmark for semseg viz

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* fix(rendering): fix wrongly named `color_mode` args

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* refactor(compatibility): move to schema package

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

---------

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
Co-authored-by: Kotaro Uetake <60615504+ktro2828@users.noreply.github.com>
Co-authored-by: Samrat Thapa <38401989+SamratThapa120@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ktro2828 added a commit that referenced this pull request Jan 30, 2026
* chore(deps): restrict rerun-sdk to versions >=0.20.0,<0.28.0 (#248)

* Bump version from 0.5.2 to 0.5.3 (#247)

* Bump version from 0.5.2 to 0.5.3

* Pin rerun-sdk dependency to version 0.20.0

* refactor: update custom validator definition (#250)

* refactor: update custom validator definition

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* Update t4_devkit/schema/tables/base.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: modity type of size to tuple[int, int] (#251)

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* fix: abstract away category indexing differences

Semseg and non-semseg datasets behave differently (position-based vs. explicit indexing).
Now computing index field in case position-based indexing is used.

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* fix(rendering): don't fail when map is not present

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* fix(rendering): fix iteration freezing when skipping  a pointcloud without lidarseg file

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* feat(rendering): auto-enable SEGMENTATION coloring when lidarseg is available

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* docs: checkmark for semseg viz

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* fix(rendering): fix wrongly named `color_mode` args

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* refactor(compatibility): move to schema package

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

---------

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
Co-authored-by: Kotaro Uetake <60615504+ktro2828@users.noreply.github.com>
Co-authored-by: Samrat Thapa <38401989+SamratThapa120@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ktro2828 added a commit that referenced this pull request Feb 2, 2026
* feat: add support of rendering segmentation pointcloud

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* feat: separate lidarseg method

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* chore(viewer): lidarseg tweaks (#256)

* chore(deps): restrict rerun-sdk to versions >=0.20.0,<0.28.0 (#248)

* Bump version from 0.5.2 to 0.5.3 (#247)

* Bump version from 0.5.2 to 0.5.3

* Pin rerun-sdk dependency to version 0.20.0

* refactor: update custom validator definition (#250)

* refactor: update custom validator definition

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* Update t4_devkit/schema/tables/base.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: modity type of size to tuple[int, int] (#251)

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* fix: abstract away category indexing differences

Semseg and non-semseg datasets behave differently (position-based vs. explicit indexing).
Now computing index field in case position-based indexing is used.

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* fix(rendering): don't fail when map is not present

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* fix(rendering): fix iteration freezing when skipping  a pointcloud without lidarseg file

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* feat(rendering): auto-enable SEGMENTATION coloring when lidarseg is available

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* docs: checkmark for semseg viz

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* fix(rendering): fix wrongly named `color_mode` args

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* refactor(compatibility): move to schema package

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

---------

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
Co-authored-by: Kotaro Uetake <60615504+ktro2828@users.noreply.github.com>
Co-authored-by: Samrat Thapa <38401989+SamratThapa120@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor: remove lidarseg command from t4viz

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* refactor: replace lidarseg existence checke

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* feat: add support of rendering segmentation pointcloud

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* fix: resolve invalid usage of future submitting and enable to raise exceptions

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* docs: add visualization sample

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* refactor: remove RerunViewer.render_pointcloud(...)

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

---------

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
Co-authored-by: Max Schmeller <6088931+mojomex@users.noreply.github.com>
Co-authored-by: Samrat Thapa <38401989+SamratThapa120@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants