fix(schema): align to the tier4_perception_dataset document#249
fix(schema): align to the tier4_perception_dataset document#249ktro2828 wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
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
AutolabelMetadatadataclass with amodelsfield to wrap lists ofAutolabelModelinstances - Updated schema tables (
SampleData,SampleAnnotation,ObjectAnn,SurfaceAnn) to useAutolabelMetadatainstead oflist[AutolabelModel] - Updated documentation to describe the new
AutolabelMetadatastructure 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.
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
8e4dcf6 to
8413caf
Compare
8413caf to
e484f39
Compare
SamratThapa120
left a comment
There was a problem hiding this comment.
Thanks for the PR. I have left a few questions
| "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). |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Would you like to merge this PR first, or after discussion with CoMLOps team?
There was a problem hiding this comment.
I'd like to merge this PR after discussing with CoMLOps team and reaching an agreement!
e484f39 to
2ecedab
Compare
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>
a50f3b0 to
b7ec040
Compare
What
There is a subtle difference in the definition of
autolabel_metadatafrom the document oftier4_perception_dataset.This pull request introduces a new
AutolabelMetadatatype to encapsulate metadata about models used for auto-labeling, replacing the previous usage of a raw list ofAutolabelModelinstances. 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:
AutolabelMetadatatype, which wraps a list ofAutolabelModelentries, and updated documentation to describe its structure and usage.sample_annotation,sample_data,object_ann,surface_ann) to useautolabel_metadata: <option[AutolabelMetadata]>instead of a list ofAutolabelModel. [1] [2] [3] [4]Codebase changes:
AutolabelMetadatadataclass and its conversion logic inautolabel_metadata.py, and updated theAutolabelMixinand all relevant schema tables to use this new type. [1] [2] [3] [4]Test updates:
AutolabelMetadatastructure instead of a list of models. [1] [2] [3]AutolabelMetadataconversion and error handling, and updatedAutolabelMixintests 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.