[ENH] Improve deep learning networks test coverage for parameters which can be list#1851
Conversation
Thank you for contributing to
|
|
Thanks for taking care of this, coverage seems great now ! We should open an issue after this getting merged for cases like LITE (still not parametrized as it should with list inputs) |
…r special reasons
hmm good point @MatthewMiddlehurst , maybe we can have a test per network ? test_inception_parameters, test_lite_parameters etc. |
Not sure about this as it's exactly the same test as before but with different types for some parameters.
This is also a valid choice, but which requires a new test to be created for each new network.
The networks do not share the parameters, that's why we check that the network have the parameters or not. So no, this would not fail if a network does not have the parameter. |
|
I do not mind it being a singular test for now instead of going through each file and adding a bunch of tests. Ideally the parameters would be used in more than one network though.
I think it's acceptable to lose a bit of testing efficiency here for readability. You don't have to assert the output etc like the current test. I would like to avoid forming the "omni-test" for all networks which just covers everything in a single function, it was kinda like that before 🙂. |
I added the new test as a new function, Also, is |
thanks for the changes @Cyril-Meyer ! the check for config existence is good solution for now, we should keep in mind removing it once we add the config to all other networks great catch on tensorflow-addons, we dont need it no, we removed its usage before and project no longer depends on it, probably forgot to remove it here |
The check was not necessary, as the base class has it : _config = {
"python_dependencies": ["tensorflow"],
"python_version": "<3.12",
"structure": "encoder",
}I just didn't see this before, but it's cool.
Yeah, I think it will be more clear if we create a new issue and solve it with a new PR (I can handle that). |
|
Looks good to me @MatthewMiddlehurst how about you ? (btw for some reason readthedocs says "pending" for 12 hours now) |
MatthewMiddlehurst
left a comment
There was a problem hiding this comment.
Looks fine for now. Feel free to merge when you think its good.
|
Can ignore the docs, says it has built fine when you click on details. |
hadifawaz1999
left a comment
There was a problem hiding this comment.
LGTM! thanks for taking care of this
Reference Issues/PRs
Improves part of #1233
What does this implement/fix? Explain your changes.
Improve the
test_all_networks_functionalitytests, adding cases when some parameters can be a list.Does your contribution introduce a new dependency? If yes, which one?
No.
Any other comments?
Some tests won't work and are disabled as 'continue exceptions'. I don't know if this is the right way to do it.
In any case, these problems will need to be fixed, and are related to the implementations themselves.
Anyway, we are adding new tests, and these cases are just like before, without the improvement.
PR checklist
For all contributions