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

Added unittest setup with a unittest #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

crimson206
Copy link
Contributor

Motivation

It is hard to prove the validation of contributed converter implementations without unit tests.

Added Setup

  • test package : unittest
  • configuration
    • python version : 3.9
    • environment : unittest.sh create a unittest env, and run unittest in the isolated environment
    • workflow : the github workflow for unittest was added, meaning pushing a branch will run unittests automatically

Unittest Design

A single torch operator is wrapped as a module, and tested by nobuco.pytorch_to_keras. The following are tested.

  • If an error causes during conversion, the test fails
  • If the conversion log includes "Max diff", the test fails

Message to the Project Owner

  1. Although I have recently implemented the converters for torch.sign and torch.Tensor.__getattribute__, I didn't include unittests for them in this branch. It is in order to isolate this PR more properly.

  2. Even if you don't agree with the setup or the design or the unittest, I hope you to merge it first, and then you update them later for the following reasons,

    • It functions well anyway. Use it at least as a temporary measure, and upgrade later.
    • You don't need to verify the contributed converters by yourself.
    • It helps the contributors.
  3. If you merge this branch, it would be nice to add Contribution.md in order to encourage contributors the self-validation.

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.

None yet

1 participant