Skip to content

fix(schema): align to the tier4_perception_dataset document#249

Open
ktro2828 wants to merge 4 commits into
mainfrom
fix/schema/autolabel-metadata
Open

fix(schema): align to the tier4_perception_dataset document#249
ktro2828 wants to merge 4 commits into
mainfrom
fix/schema/autolabel-metadata

Conversation

@ktro2828
Copy link
Copy Markdown
Collaborator

What

There is a subtle difference in the definition of autolabel_metadata from the document of tier4_perception_dataset.

This pull request introduces a new AutolabelMetadata type to encapsulate metadata about models used for auto-labeling, replacing the previous usage of a raw list of AutolabelModel instances. The change is reflected consistently across the schema, codebase, and tests, improving clarity and extensibility of the auto-labeling metadata representation.

Schema and documentation updates:

  • Introduced the AutolabelMetadata type, which wraps a list of AutolabelModel entries, and updated documentation to describe its structure and usage.
  • Updated all schema tables (sample_annotation, sample_data, object_ann, surface_ann) to use autolabel_metadata: <option[AutolabelMetadata]> instead of a list of AutolabelModel. [1] [2] [3] [4]

Codebase changes:

  • Added the AutolabelMetadata dataclass and its conversion logic in autolabel_metadata.py, and updated the AutolabelMixin and all relevant schema tables to use this new type. [1] [2] [3] [4]
  • Improved docstrings and error handling for type conversion functions. [1] [2]

Test updates:

  • Updated test fixtures and test cases to use the new AutolabelMetadata structure instead of a list of models. [1] [2] [3]
  • Added new tests for AutolabelMetadata conversion and error handling, and updated AutolabelMixin tests to use the new type. [1] [2] [3]

These changes make the handling of auto-labeling metadata more robust and future-proof by introducing a clear, extensible structure.

@github-actions github-actions Bot added bug Something isn't working ci Continuous Integration (CI) processes and testing documentation Improvements or additions to documentation labels Jan 23, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 aligns the autolabel_metadata representation with the tier4_perception_dataset specification by introducing an AutolabelMetadata wrapper type. Previously, autolabel_metadata was represented as a raw list of AutolabelModel instances; now it's encapsulated in a structured AutolabelMetadata object containing a models field.

Changes:

  • Introduced AutolabelMetadata dataclass with a models field to wrap lists of AutolabelModel instances
  • Updated schema tables (SampleData, SampleAnnotation, ObjectAnn, SurfaceAnn) to use AutolabelMetadata instead of list[AutolabelModel]
  • Updated documentation to describe the new AutolabelMetadata structure and its usage

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
t4_devkit/schema/tables/autolabel_metadata.py Added AutolabelMetadata dataclass with conversion logic and updated AutolabelMixin to use the new type
t4_devkit/schema/tables/sample_data.py Updated SampleData table to use AutolabelMetadata type for autolabel_metadata field
docs/schema/table.md Added AutolabelMetadata documentation section and updated all table schemas to reference the new type
tests/schema/conftest.py Updated test fixtures to use the new nested {"models": [...]} structure
tests/schema/tables/test_autolabel_metadata.py Added TestAutolabelMetadata test class and updated existing tests to use AutolabelMetadata

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 23, 2026

☂️ Python Coverage

current status: ❌

Overall Coverage

Lines Covered Coverage Threshold Status
4247 3485 82% 50% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
t4_devkit/schema/tables/autolabel_metadata.py 95% 🟢
t4_devkit/schema/tables/sample_data.py 100% 🟢
t4_devkit/schema/tables/surface_ann.py 75% 🔴
TOTAL 90% 🔴

updated for commit: 2ecedab by action🐍

@ktro2828 ktro2828 force-pushed the fix/schema/autolabel-metadata branch 2 times, most recently from 8e4dcf6 to 8413caf Compare January 23, 2026 09:42
@ktro2828 ktro2828 self-assigned this Jan 29, 2026
@ktro2828 ktro2828 changed the title fix: align to the tier4_perception_dataset document fix(schema): align to the tier4_perception_dataset document Jan 29, 2026
@ktro2828 ktro2828 force-pushed the fix/schema/autolabel-metadata branch from 8413caf to e484f39 Compare January 30, 2026 07:33
Copy link
Copy Markdown
Contributor

@SamratThapa120 SamratThapa120 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I have left a few questions

Comment thread t4_devkit/schema/tables/sample_data.py
Comment thread docs/schema/table.md
"is_valid": <bool> -- Indicates whether this data is valid. Defaults to `true`.
"info_filename": <option[str]> -- Relative path to metadata-blob file.
"autolabel_metadata": <option[[AutolabelModel;N]]> -- List of models used for autolabeling applied to this entire sample_data item (e.g., image or scan).
"autolabel_metadata": <option[AutolabelMetadata]> -- Metadata of models used for auto-labeling applied to this entire sample_data item (e.g., image or scan).
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.

It is not related to this PR, but seems like a good place for discussing the following:
If a sample_data has autolabel_metadata, should all the annotations for that data (lidar scan or image) have the same autolabel_metadata?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good point. Sorry I'm not sure actually, but I guess so.
Seems we should discuss about the fields being developed by CoMLOps team with them, first.

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.

Would you like to merge this PR first, or after discussion with CoMLOps team?

Copy link
Copy Markdown
Collaborator Author

@ktro2828 ktro2828 Feb 4, 2026

Choose a reason for hiding this comment

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

I'd like to merge this PR after discussing with CoMLOps team and reaching an agreement!

ktro2828 added 4 commits April 6, 2026 12:59
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
@ktro2828 ktro2828 force-pushed the fix/schema/autolabel-metadata branch from a50f3b0 to b7ec040 Compare April 6, 2026 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci Continuous Integration (CI) processes and testing documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants