-
Notifications
You must be signed in to change notification settings - Fork 240
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
mypy checks for common graph #2600
Conversation
Co-authored-by: Daniil Lyakhov <[email protected]>
…ining_state_switcher
Actually, 3 mypy errors are remaining. I wanted to discuss them with you. |
In this function, the parameter |
Here |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2600 +/- ##
===========================================
- Coverage 91.16% 84.91% -6.26%
===========================================
Files 494 494
Lines 45350 45390 +40
===========================================
- Hits 41342 38541 -2801
- Misses 4008 6849 +2841
... and 60 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Thanks for your find. This is exactly what we expect from a mypy task. model_type can has None value nncf/nncf/quantization/quantize_model.py Line 101 in c79111b
_get_full_pattern_graph and _filter_patterns should be modified.
|
It looks like the return typing of _get_edge_boundaries is wrong, nncf/nncf/common/graph/graph.py Line 297 in b7ba5ad
More information is here https://networkx.org/documentation/stable/reference/classes/generated/networkx.MultiGraph.edges.html |
Thank you @alexsu52 for the clarification. All the mypy checks pass now, so the PR is ready to be reviewed. |
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.
Thanks for the contribution!
Changes
This PR closes issue #2495 by addressing various mypy checks and enhancing type safety in the codebase.
# type:ignore
for cases requiring significant refactoring due to untyped packages likenetworkx
.nncf/common/graph
to.mypy.ini
to include additional files for type checking.Related Tickets
N/A
Tests
Pytests were run to ensure that the changes did not modify the common logic and that the codebase remained functional.