Skip to content

Conversation

@zhenrongliew
Copy link
Contributor

Add _validation_error field to InterpreterABC.

_validation_errors: dict[ir.IRNode, set[ir.ValidationError]] = field(
    default_factory=dict, init=False
)
"""The validation errors collected during interpretation."""

With 2 API:

def add_validation_error(self, node: ir.IRNode, error: ir.ValidationError) -> None:
    """Add a ValidationError for a given IR node.

    If the node is not present in the _validation_errors dict, create a new set.
    Otherwise append to the existing set of errors.
    """

def get_validation_errors(
    self, keys: set[ir.IRNode] | None = None
) -> list[ir.ValidationError]:
    """Get the validation errors collected during interpretation.

    If keys is provided, only return errors for the given nodes.
    Otherwise return all errors.
    """

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/kirin/interp/abc.py 50.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Contributor

github-actions bot commented Nov 12, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
11624 10357 89% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/kirin/interp/abc.py 87% 🟢
src/kirin/ir/exception.py 94% 🟢
TOTAL 90% 🟢

updated for commit: dcf9c3d by action🐍

@github-actions
Copy link
Contributor

github-actions bot commented Nov 12, 2025

PR Preview Action v1.6.2
Preview removed because the pull request was closed.
2025-11-17 19:31 UTC

@Roger-luo Roger-luo merged commit 955771e into main Nov 17, 2025
12 of 13 checks passed
@Roger-luo Roger-luo deleted the dl/validation-framework branch November 17, 2025 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants