Skip to content

Add AnalysisPass base class - #242

Open
bwintermann wants to merge 1 commit into
fastmachinelearning:mainfrom
bwintermann:feature/analysis_pass
Open

Add AnalysisPass base class#242
bwintermann wants to merge 1 commit into
fastmachinelearning:mainfrom
bwintermann:feature/analysis_pass

Conversation

@bwintermann

@bwintermann bwintermann commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

While documenting our code (@LinusJungemann) stumbled over the fact that analysis passes are simply functions that should implicitly adhere to a calling convention. Mirroring the Transformation base class, this PR introduces an AnalysisPass base class, which one can implement. This defines a nicer interface and additionally enables stateful analysis passes.

The matching ModelWrapper.analysis method stays backwards compatible, checking the type of the analysis function before executing it.

The qonnx/analysis/base.py module docstring was adjusted and an additional test was introduced. All existing analysis-related tests pass.

(There are some unrelated edits made by the pre-commit hook.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant