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

Make the PyTorch adapter tests less likely to be disabled by accident #6386

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

SpecLad
Copy link
Contributor

@SpecLad SpecLad commented Jun 27, 2023

Motivation and context

Currently, any kind of import error will disable the tests. This makes it far too easy to disable the tests accidentally by messing up the imports.

Only disable the tests if PyTorch or torchvision are not found.

How has this been tested?

Manual testing with various artificially-introduced errors.

Checklist

  • I submit my changes into the develop branch
  • [ ] I have added a description of my changes into the CHANGELOG file
  • [ ] I have updated the documentation accordingly
  • [ ] I have added tests to cover my changes
  • [ ] I have linked related issues (see GitHub docs)
  • [ ] I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

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.

@SpecLad SpecLad requested a review from azhavoro as a code owner June 27, 2023 16:08
Currently, any kind of import error will disable the tests. This makes it
far too easy to disable the tests accidentally by messing up the imports.

Only disable the tests if PyTorch or torchvision are not found.
@SpecLad SpecLad force-pushed the pytorch-accidental-disable branch from 60936dd to f68d8f0 Compare June 27, 2023 16:10
@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #6386 (f68d8f0) into develop (b415fec) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #6386   +/-   ##
========================================
  Coverage    80.63%   80.63%           
========================================
  Files          332      332           
  Lines        38438    38438           
  Branches      6923     6923           
========================================
  Hits         30994    30994           
  Misses        7128     7128           
  Partials       316      316           
Components Coverage Δ
cvat-ui 74.65% <ø> (ø)
cvat-server 86.17% <ø> (ø)

@SpecLad SpecLad merged commit 1b28162 into cvat-ai:develop Jun 28, 2023
@SpecLad SpecLad deleted the pytorch-accidental-disable branch June 28, 2023 14:41
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.

2 participants