Coder Social home page Coder Social logo

[JIT] Unit test for torch script about kornia HOT 6 CLOSED

kornia avatar kornia commented on July 29, 2024
[JIT] Unit test for torch script

from kornia.

Comments (6)

edgarriba avatar edgarriba commented on July 29, 2024

@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.

carlosb1 avatar carlosb1 commented on July 29, 2024

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.

edgarriba avatar edgarriba commented on July 29, 2024

@Wizaron could you investigate this ? #45
@carlosb1 could you share the snippet for testing you mention ?

from kornia.

edgarriba avatar edgarriba commented on July 29, 2024

@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.

carlosb1 avatar carlosb1 commented on July 29, 2024

@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.

edgarriba avatar edgarriba commented on July 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.