Added unittest setup with a unittest #42
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.