-
Notifications
You must be signed in to change notification settings - Fork 181
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
[MNT] Enhance networks module testing suite #1631
Conversation
Thank you for contributing to
|
@MatthewMiddlehurst let's check if this improves coverage or not. |
You will have to push another commit for the test to run unfortunately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can put this in without testing coverage, seems a good thing to do!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taking a look, I don't think this is needed anymore actually, see line 33 of the new file where it skips individual estimators if there is a missing module.
Honestly, this test could be improved a lot though, the skip list and try/catch are a bit hacky. Should try to integrate _check_soft_dependencies
without skipping the whole test.
I think we could skip the complete test if the |
Ideally we shouldnt skip anything other than the base class, the only good reason to skip currently is it has a dependency which is not installed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be good to remove the current skipped classes and replace the except with one using the _check_soft_dependencies(soft_dependencies)
and _check_python_version(python_version)
methods. You may have to edit the new base class a bit to get the correct inputs.
If you can think of anything else we would want to add to this test, that would be good. Currently it does not check anything from the output.
Could you please elaborate on this? I didn't quite understand. Thanks :) |
How does this look? @MatthewMiddlehurst |
Do we skip this using |
Got it 👍 , shall update it once we take a decision. Thanks :)) |
I have updated my recommendation above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Still some minor issues but does not need to be done here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! would be good to check coverage now too
test_all_networks.py
to create a more robust testing Mechanism._config
dict to keep track of library dependencies and compatible python versions and the network structure.build_network
returns correct return type, that is, KerasTensor if structure is encoder, Model object otherwise.