Comments (6)
@Wizaron cool that you want to go ahead with this ! there's one thing that I'm not quite sure yet - I see to many assertions, and usually that's an anti-pattern for test design :D
I would go for something more modular by provding proper test classes to cover the different needs.
Maybe @carlosb1 could give us an intuition to proceed with this since he's working on the mypy
test integration.
from kornia.
Some ideas to discuss. First, It is added an assert for "case" to test, for this reason it should be a bad design has multiple asserts in a test.. it is better split for every case. Also, it would be good to split tests that they are testing feature / functionality or if it is checking the function (unitary test). For this last case, we can split them in different files, and when the set of number of tests increase too much, It would be move directly to different folders. One idea could be move tests in three main types: stress or system tests (to check performance), functional tests (to check functionality and to analyse if the functions are working well) and finally unitary tests (to check outputs for each function).
from kornia.
@Wizaron could you investigate this ? #45
@carlosb1 could you share the snippet for testing you mention ?
from kornia.
@Wizaron @carlosb1 In my last two PR I've been adopting this pattern for test. Let me know your thoughts about how you can adapt it to JIT and others.
https://github.com/arraiyopensource/torchgeometry/blob/master/test/test_transformations.py#L11
from kornia.
@edgarriba @Wizaron . From my side, it seems enough, I was checking different options for splitting the test and I couldn't find anything better.
from kornia.
unit tests with JIT are already included in latest cointributions, check: https://github.com/arraiyopensource/kornia/blob/master/test/filters/test_filters.py#L52
closing this.
from kornia.
Related Issues (20)
- Cannot compile `torch.jit.script(kornia.geometry.warp_perspective)` because of `KORNIA_CHECK_IS_TENSOR` HOT 2
- Move WunschLineMatcher to kornia.feature.matching Module HOT 2
- find_essential and run_5point are not working correctly with batch size>1 HOT 5
- Update pytorch to 2.3.0 on CI
- Refactor `SOLD2Net` to Support Dataclasses for Configuration HOT 1
- AttributeError: 'list' object has no attribute 'ndim' with RandomTransplantation and batch with keys HOT 2
- Including Steerers HOT 2
- mypy error: Argument 4 to "AugmentationSequential" has incompatible type "RandomTransplantation"; expected "_AugmentationBase | ImageSequential"
- NaN values returned during backward pass in axis_angle_to_rotation_matrix function HOT 2
- No LAFS returns cpu tensor not on same device as input HOT 2
- RandomMosaic not working with masks? HOT 2
- implement a deterministic two view scene
- kornia.geometry.transform.warp_image_tps() returning black image HOT 2
- how do u set kornia? HOT 2
- [CI] collector job failling
- [CI/Testing] Ensure support to numpy >= 2.0
- Changing dtype of keypoints could cause them to shift
- Unreasonable high GPU usage when using erosion HOT 2
- Understanding `kornia.geometry.homography_warp` coordinate system HOT 2
- Update CONTRIBUTING.md to improve setup process and documentation building
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kornia.