Extended error handling when a node fails#143
Conversation
…ction in README.md on how to run the tests.
…manager.py and run_action/utils.py
… into feat/extended-error-handling
… into feat/extended-error-handling
| start_idx = node_frames_after_framework[0] | ||
| else: | ||
| # Fallback: use first node frame | ||
| # (shouldn't happen in normal execution) |
There was a problem hiding this comment.
Here, does it mean that the framework code ran after the users code? if that's the case maybe we could add it as a comment
There was a problem hiding this comment.
This is a weird edge case, and I added this just to be sure. It is because it parses a trace and tries to remove all irrelevant information. But this is not likely to happen.
|
|
||
| @pytest.fixture | ||
| def mock_node(self): | ||
| """Provide a mock QualibrationNode.""" |
There was a problem hiding this comment.
You're absolutely right. I am moving this to conftest.py.
|
|
||
| @pytest.fixture | ||
| def mock_manager(self): | ||
| """Provide a mock ActionManager.""" |
There was a problem hiding this comment.
same as the first mock with some extensions, could we maybe extend the first mock manager and make it to whole file?
There was a problem hiding this comment.
You're absolutely right. I am moving this to conftest.py.
| return Mock() | ||
|
|
||
| @pytest.fixture | ||
| def mock_node(self): |
There was a problem hiding this comment.
we might consider scoping here aswell so nothing override mutable objects this fixture returns
There was a problem hiding this comment.
You're absolutely right. I am moving this to conftest.py.
| class TestRunAction: | ||
| """Tests for the run_action method.""" | ||
|
|
||
| @pytest.fixture |
There was a problem hiding this comment.
same fixture here, maybe we can extract it to conftest, seems like in this file it appears a lot
There was a problem hiding this comment.
You're right! I will do that now.
|
|
||
| @pytest.fixture | ||
| def mock_node(self): | ||
| """Provide a mock QualibrationNode.""" |
There was a problem hiding this comment.
here aswell, maybe we can extract to conftest because we use it a lot
There was a problem hiding this comment.
You're right! I will do that now.
| """Tests for the register_action decorator.""" | ||
|
|
||
| @pytest.fixture | ||
| def manager(self): |
There was a problem hiding this comment.
You're right! I will do that now.
|
|
||
| @pytest.fixture | ||
| def mock_node(self): | ||
| """Provide a mock QualibrationNode.""" |
There was a problem hiding this comment.
pretty similar to previous one, maybe we can extend it here but might declare in conftest
There was a problem hiding this comment.
You're right! I will do that now.
… into feat/extended-error-handling
Part of solving https://quantum-machines.atlassian.net/browse/QUAL-1645
Enhances error reporting for calibration node failures by providing the user with richer debugging context, including source code snippets, simplified tracebacks, and action execution history. This information is displayed by the frontend.
This change also affects qualibrate-core, where the qua-platform/qualibrate-runner#64 needs to be merged before this one is merged, for everything to be working.
Key Changes
Technical Implementation
The error handling for failed nodes now provides:
Testing