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

Environment for better unit testing #323

Closed
TheSlimvReal opened this issue Jul 3, 2019 · 0 comments
Closed

Environment for better unit testing #323

TheSlimvReal opened this issue Jul 3, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@TheSlimvReal
Copy link
Contributor

Currently a lot of our test cases represent only some very basic input matrices (e.g. using torch.ones or torch.arange). This is good for asserting the result afterwards but many edge cases are undiscovered and we miss our chance to test with big input data for what heat is actually made for.
Therefore it would be good to create a test environment, where we can create tests in a random manner.
One way to achieve this would be to first choose a implementation of the algorithm we want to test against (in our case probably numpy).
Now we only have to specify a shape of the input tensor. This tensor will then be created with random values, split along one (random?) axis, the heat implementation of the algorithm to be tested is applied to the tensor and afterwards the tensor is resplit to None. This way we can assert the result to be close to the numpy result. This would not need much user input for creating a test and will eventually cover many different test cases. The downside is that we can't check if the tensor is correctly distributed after the calculation and before the resplit to None and we are dependent on the random number generation.

@TheSlimvReal TheSlimvReal added the enhancement New feature or request label Jul 3, 2019
@TheSlimvReal TheSlimvReal self-assigned this Aug 2, 2019
@TheSlimvReal TheSlimvReal mentioned this issue Aug 29, 2019
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant