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

Add static type checking to FINN #3

Open
bwintermann opened this issue Jan 15, 2025 · 1 comment
Open

Add static type checking to FINN #3

bwintermann opened this issue Jan 15, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@bwintermann
Copy link

We talked and came to the conclusion that we would like to add static type checking as a GHA to this repository. This would depend on #2 due to some missing type annotations. I ran some type checking efforts a while back, and while there are some errors, most of the files are fine. Apart from having to generate some stubs, it would be a fairly easy thing to implement. I'd propose using mypy since it is the most commonly used framework for type checking.

@bwintermann bwintermann added the enhancement New feature or request label Jan 15, 2025
@fpjentzsch fpjentzsch moved this to In Progress in FINN+ Feature Tracker Jan 16, 2025
@fpjentzsch fpjentzsch moved this from In Progress to Planned in FINN+ Feature Tracker Jan 16, 2025
@bwintermann
Copy link
Author

Depending on how strictly you lint your code, there can be an typing error when overriding Transformation.apply(). Since the abstract class in QONNX has no typing annotations, its return type is assigned None and thus clashes with the actual type used in FINN: tuple[ModelWrapper, bool]. We could either submit a PR to QONNX (probably not a good idea, since other projects aside from FINN may return different objects) or generate stubs or force the linter to ignore the line.

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
Status: Planned
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant