Skip to content

Conversation

@ktro2828
Copy link
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
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
Contributor

github-actions bot commented Jan 23, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
4139 3429 83% 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% 🟢
TOTAL 97% 🟢

updated for commit: 8413caf by action🐍

@ktro2828 ktro2828 force-pushed the fix/schema/autolabel-metadata branch from 5ecbcdb to 8e4dcf6 Compare January 23, 2026 09:38
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
@ktro2828 ktro2828 force-pushed the fix/schema/autolabel-metadata branch 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
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.

2 participants