pytorch / ignite

High-level library to help with training and evaluating neural networks in PyTorch flexibly and transparently.
https://pytorch-ignite.ai
BSD 3-Clause "New" or "Revised" License
4.55k stars 619 forks source link

Improve code coverage #1790

Open vfdev-5 opened 3 years ago

vfdev-5 commented 3 years ago

Our project code coverage start to decrease with new features and reworked tests. We are now ~95% but were 96% recently and around ~98% the last year...

The idea is to identify the uncovered parts of code inspecting here, for example: https://codecov.io/gh/pytorch/ignite/tree/master/ignite and draft a PR with new tests.

Some of new test can be very simple and others could be very sophisticated to enter a particular code line. Let's improve the coverage of all modules, except distributed for instance.

Moh-Yakoub commented 3 years ago

That sounds like a group effort. shall we update the task with a checkbox list of packages so that we make sure that no two people will be working on the same package?

I can start with engine/__init__.py

soma2000-lang commented 2 years ago

@vfdev-5 Can I work on ignite/engine/engine.py?

vfdev-5 commented 2 years ago

@soma2000-lang sure. Do you know how to tackle this issue ? Basically, you can check uncovered lines from https://app.codecov.io/gh/pytorch/ignite/blob/master/ignite/engine/engine.py and write tests in https://github.com/pytorch/ignite/blob/master/tests/ignite/engine/test_engine.py to fix the coverage.

soma2000-lang commented 2 years ago

@vfdev I will try

On Tue, 18 Oct 2022 at 01:01, vfdev @.***> wrote:

@soma2000-lang https://github.com/soma2000-lang sure. Do you know how to tackle this issue ? Basically, you can check uncovered lines from https://app.codecov.io/gh/pytorch/ignite/blob/master/ignite/engine/engine.py and write tests in https://github.com/pytorch/ignite/blob/master/tests/ignite/engine/test_engine.py to fix the coverage.

— Reply to this email directly, view it on GitHub https://github.com/pytorch/ignite/issues/1790#issuecomment-1281372533, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANLS36MHERWU4SGGVDX6MPDWDWSR7ANCNFSM4ZFDCPJQ . You are receiving this because you were mentioned.Message ID: @.***>

soma2000-lang commented 2 years ago

@vfdev-5 https://app.codecov.io/gh/pytorch/ignite/blob/master/ignite/engine/engine.py in this file I see almost everything is covered .Please correct me if I am wrong

vfdev-5 commented 2 years ago

@soma2000-lang yes 97% of the code is covered but we need to cover up to 100% if possible.

soma2000-lang commented 2 years ago

Ok

On Mon, 24 Oct 2022, 13:08 vfdev, @.***> wrote:

@soma2000-lang https://github.com/soma2000-lang yes 97% of the code is covered but we need to cover up to 100% if possible.

— Reply to this email directly, view it on GitHub https://github.com/pytorch/ignite/issues/1790#issuecomment-1288552992, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANLS36ND6UIJ47H7AZODIHLWEY4IZANCNFSM4ZFDCPJQ . You are receiving this because you were mentioned.Message ID: @.***>