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

[Datumaro] Use attrs for model declaration #2000

Merged
merged 9 commits into from
Aug 7, 2020
Merged

Conversation

zhiltsov-max
Copy link
Contributor

@zhiltsov-max zhiltsov-max commented Aug 7, 2020

Motivation and context

This patch refactors Datumaro definitions using datatypes to simplify and reduce code.

  • Refactored annotation types
  • Annotations can be copied and printed
  • DatasetItems can be copied and printed
  • LabelRemap transform is no more in-place (as intended)
  • Fixed few bandit warnings

How has this been tested?

Unit tests

Checklist

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.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6835

  • 113 of 115 (98.26%) changed or added relevant lines in 7 files are covered.
  • 4 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.08%) to 68.848%

Changes Missing Coverage Covered Lines Changed/Added Lines %
datumaro/datumaro/components/extractor.py 89 90 98.89%
datumaro/datumaro/util/attrs_util.py 16 17 94.12%
Files with Coverage Reduction New Missed Lines %
datumaro/datumaro/components/extractor.py 1 91.99%
datumaro/datumaro/components/launcher.py 1 80.36%
datumaro/datumaro/plugins/coco_format/converter.py 2 89.24%
Totals Coverage Status
Change from base Build 6817: -0.08%
Covered Lines: 11072
Relevant Lines: 15585

💛 - Coveralls

Copy link
Contributor

@nmanovic nmanovic left a comment

Choose a reason for hiding this comment

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

attrs looks nice!

@nmanovic nmanovic merged commit 000e9c4 into develop Aug 7, 2020
@nmanovic nmanovic deleted the zm/extractor-with-attrs branch August 7, 2020 19:29
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