Repository navigation
Add proper pytesting - #51
Draft
juraph-dev wants to merge 5 commits into
Draft
juraph-dev wants to merge 5 commits into
juraph-dev wants to merge 5 commits into
Conversation
First pass for unit testing of our current architecture. These tests are sort of naive, there should be more rigor put into them, however as a first draft they server fairly well. Adding more tests will be fairly trivial. Of note, two currently reported failures: XFAIL tests/jax_tests/test_plnet_lbdn.py::test_lbdn_init_output_zero - init_output_zero documents a zero output at init, but the output is non-zero (see PR notes) XFAIL tests/torch_tests/test_lipnets.py::test_unitary_no_bias_explicit - Unitary.direct_to_explicit assumes a bias exists
Treating these as bugs. Resolve before merging.
Each network type should have it's own dedicated file. This allows for easily adding additional tests. Further, expected inputs/outputs have been moved into their own *.json file, which has removed the requirement of the dedicated parity testing, as input/outputs are shared between them
No longer have separate jax/torch testing files. I wasn't happy with the likelihood of someone writing a test for one of the models, and forgetting to implement it for the other. By having this unified schema, one writes the test once, and both versions of the network are compared against it. A few notes: 1. Not all networks have been implemented in torch. Their files state this explicitly, and they will need to be added to this testing once implemented. 2. There are often API differences between the two network backends that definitely do not need to exist. We will address this with the refactor. This is where the single backends.py is surprisingly useful.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
First pass for unit testing of our current architecture. These tests are sort of naive, there should be more rigor put into them, however as a first draft they server fairly well. Adding more tests will be fairly trivial.
Of note, two currently expected failures:
XFAIL tests/jax_tests/test_plnet_lbdn.py::test_lbdn_init_output_zero - init_output_zero documents a zero output at init, but the output is non-zero (see PR notes)
XFAIL tests/torch_tests/test_lipnets.py::test_unitary_no_bias_explicit - Unitary.direct_to_explicit assumes a bias exists
I'm going to treat these as bugs that we should resolve and unmark as xfail.
Resolves #36