[ENH] better immlib errors#141
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves error handling for immlib/pcollections LazyError exceptions by introducing a centralized unwrapping function, and increases swap space for the nightly reco80 test to address memory constraints.
Changes:
- Introduces
val_from_plan()function to unwrap LazyError exceptions and surface underlying errors - Replaces direct dictionary access and lambda functions with
val_from_plan()for better error reporting - Increases GitHub Actions swap space from 16G to 32G for nightly reco80 test
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| AFQ/api/utils.py | Adds val_from_plan() function and LazyError import to centralize error unwrapping logic |
| AFQ/api/participant.py | Updates export() to use val_from_plan() for better error messages |
| AFQ/api/group.py | Replaces direct dictionary access and lambda with val_from_plan() calls |
| .github/workflows/nightly_reco80_test.yml | Doubles swap space allocation from 16G to 32G |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@arokem this is ready for review/merge |
|
cc @noahbenson: just to let you know that we've found the immlib errors a bit confusing, because the original error appears rather high in the stack-trace. This means that debugging immlib errors can be confusing if you are used to looking at Python stack traces, which usually have their root cause close to the bottom. Ultimately, this might be something that you'd want to integrate into immlib itself (?) |
|
Oh - awesome! Thanks for your help with this. |
This re-orders immlib errors to be easier to read. It also adds more swap for the nightly reco80 test