-
Notifications
You must be signed in to change notification settings - Fork 0
Track NNsight tracing interference with coverage.py #208
Copy link
Copy link
Closed as duplicate of#207
Labels
area: testsTesting codeTesting codemodule: adaptersAdapter systemAdapter systemmodule: analysisAnalysis functionalityAnalysis functionalitymodule: baseBase classes and core logicBase classes and core logicmodule: runnersRunner implementationsRunner implementations
Description
Summary
We have a documented coverage interference issue when nnsight tracing is exercised under coverage.py.
The current note in distributed-insight/project_admin/interpretune/adapter_reference/NNsight/tracing_coverage_issue.md points to nnsight calling sys.settrace(None) inside its tracing implementation, which likely wipes out coverage's trace function during with model.trace(...) execution.
Current evidence
- The issue appears to be tied to tests that execute actual NNsight tracing contexts.
- The local note identifies these known trigger cases:
TestNNsightTracing::test_nnsight_trace_contextTestNNsightRemoteExecution::test_remote_local_consistency
- The likely upstream touchpoint is
nnsight/intervention/tracing/base.pywhere trace handling resets the interpreter trace function.
Why track this
- This can undercount coverage for adapter and analysis code paths that are actually exercised.
- It makes coverage interpretation less reliable exactly where we are adding NNsight-backed functionality.
- We should decide whether to work around it locally, isolate affected coverage expectations, or push for an upstream fix.
Follow-up
- Reproduce the coverage drop with a minimized
pytest --covcase. - Confirm the exact
nnsightversion and upstream line(s) involved. - Open or link an upstream
nnsightissue once the repro is reduced. - Decide whether affected tests should remain in standalone/optional buckets until the coverage interaction is understood.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: testsTesting codeTesting codemodule: adaptersAdapter systemAdapter systemmodule: analysisAnalysis functionalityAnalysis functionalitymodule: baseBase classes and core logicBase classes and core logicmodule: runnersRunner implementationsRunner implementations