Skip to content
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

cvat-ui: simplify code related to model label types #9074

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

SpecLad
Copy link
Contributor

@SpecLad SpecLad commented Feb 7, 2025

Motivation and context

Recent changes to the Enterprise version make the following simplifications possible:

  • A label type may no longer be unknown, which means that the type of MLModelLabel.type can be changed to LabelType, and all special handling for unknown can be removed.

  • Roboflow and Hugging Face models now correctly report their label types, which makes the dedicated return_type field unnecessary. The ModelReturnType enum is unnecessary as well, as it's just an arbitrary subset of LabelType.

How has this been tested?

Manual testing.

Checklist

  • I submit my changes into the develop branch
  • [ ] I have created a changelog fragment
  • [ ] I have updated the documentation accordingly
  • [ ] I have added tests to cover my changes
  • [ ] I have linked related issues (see GitHub docs)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

Recent changes to the Enterprise version make the following simplifications
possible:

* A label type may no longer be `unknown`, which means that the type of
  `MLModelLabel.type` can be changed to `LabelType`, and all special
  handling for `unknown` can be removed.

* Roboflow and Hugging Face models now correctly report their label types,
  which makes the dedicated `return_type` field unnecessary. The
  `ModelReturnType` enum is unnecessary as well, as it's just an arbitrary
  subset of `LabelType`.
@SpecLad SpecLad requested a review from bsekachev as a code owner February 7, 2025 11:33
Copy link

sonarqubecloud bot commented Feb 7, 2025

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 73.73%. Comparing base (fec040d) to head (38fbd4e).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9074      +/-   ##
===========================================
- Coverage    73.75%   73.73%   -0.02%     
===========================================
  Files          428      428              
  Lines        44514    44519       +5     
  Branches      3881     3883       +2     
===========================================
- Hits         32830    32825       -5     
- Misses       11684    11694      +10     
Components Coverage Δ
cvat-ui 77.42% <0.00%> (-0.05%) ⬇️
cvat-server 70.68% <ø> (ø)

@SpecLad SpecLad merged commit 90417f9 into cvat-ai:develop Feb 14, 2025
34 checks passed
@SpecLad SpecLad deleted the simplify-model-types branch February 14, 2025 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants