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
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.
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.
If you merge this branch, it would be nice to add Contribution.md in order to encourage contributors the self-validation.
Motivation
It is hard to prove the validation of contributed converter implementations without unit tests.
Added Setup
unittest.sh
create a unittest env, and run unittest in the isolated environmentUnittest Design
A single torch operator is wrapped as a module, and tested by
nobuco.pytorch_to_keras
. The following are tested.Message to the Project Owner
Although I have recently implemented the converters for
torch.sign
andtorch.Tensor.__getattribute__
, I didn't include unittests for them in this branch. It is in order to isolate this PR more properly.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,
If you merge this branch, it would be nice to add Contribution.md in order to encourage contributors the self-validation.