Skip to content

[feature-v3] Remove T_* data entities #4412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

kprokofi
Copy link
Contributor

@kprokofi kprokofi commented Jun 9, 2025

Summary

Remove the rest of the old OTX Data Entities

How to test

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have ran e2e tests and there is no issues.
  • I have added the description of my changes into CHANGELOG in my target branch (e.g., CHANGELOG in develop).​
  • I have updated the documentation in my target branch accordingly (e.g., documentation in develop).
  • I have linked related issues.

License

  • I submit my code changes under the same Apache License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below).
# Copyright (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

@sovrasov sovrasov requested a review from Copilot June 11, 2025 08:58
Copilot

This comment was marked as outdated.

Copy link
Member

@sovrasov sovrasov left a comment

Choose a reason for hiding this comment

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

Please check the copilot stuff

@kprokofi kprokofi requested review from sovrasov and Copilot June 11, 2025 12:37
Copilot

This comment was marked as outdated.

@kprokofi kprokofi requested a review from Copilot June 11, 2025 12:52
Copilot

This comment was marked as outdated.

@kprokofi kprokofi requested a review from Copilot June 11, 2025 13:15
Copilot

This comment was marked as outdated.

@kprokofi kprokofi requested a review from Copilot June 11, 2025 13:19
Copy link

@Copilot 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 removes the legacy T_* data entity types by replacing them with the new OTXDataItem and related types, streamlining and modernizing type annotations and API references across the codebase. Key changes include updating test fixtures and type signatures in unit/integration tests, revising collate functions and error messages in tile-related code, and adapting backend model interfaces accordingly.

Reviewed Changes

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

Show a summary per file
File Description
tests/unit/data/entity/test_utils.py Replaced OTXBatchDataEntity with OTXDataBatch and updated tensor dtypes
tests/unit/data/entity/test_base.py Updated type annotations to use OTXDataItem and adjusted dtype checks
tests/unit/data/entity/conftest.py Modified fixtures to return OTXDataItem instead of OTXDataEntity
tests/integration/api/test_xai.py Removed references to OTXBatchPredEntity, keeping only OTXPredBatch
src/otx/types/types.py Updated DATA type and replaced T_OTXDataEntity with OTXDataItem
src/otx/data/transform_libs/torchvision.py Changed type for results_cache from OTXDataEntity to OTXDataItem
src/otx/data/entity/utils.py Updated pytree registration type to OTXDataItem
src/otx/data/entity/tile.py Revised entity type annotations and error messages in collate and unbind methods
src/otx/data/dataset/tile.py and src/otx/data/dataset/base.py Updated return types and function signatures to use OTXDataItem instead
src/otx/backend/* Adapted backend model methods and type signatures accordingly

@kprokofi kprokofi requested a review from sovrasov June 11, 2025 20:10
@sovrasov sovrasov merged commit 258db4b into open-edge-platform:feature-v3 Jun 12, 2025
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TEST Any changes in tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants