Use new proposed AttributionTargets API for circuit-tracer, misc infra improvements#187
Merged
speediedan merged 2 commits intomainfrom Nov 7, 2025
Merged
Use new proposed AttributionTargets API for circuit-tracer, misc infra improvements#187speediedan merged 2 commits intomainfrom
AttributionTargets API for circuit-tracer, misc infra improvements#187speediedan merged 2 commits intomainfrom
Conversation
…and minor test expected result adjustment for pt 2.9
|
No CI pin file changes detected by regen-ci-req-check. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the circuit-tracer dependency to a newer commit and implements package name normalization according to PEP 503 to better handle packages with different naming conventions (hyphens vs underscores).
Key Changes:
- Updates circuit-tracer commit pin from
b228bf1...to004f1b2...across all dependency files and notebooks - Implements PEP 503 package name normalization in
PackageVersionManagerto canonicalize package names (converting underscores, dots to hyphens) - Refactors circuit-tracer API usage to use
attribution_targetsparameter instead ofanalysis_target_indices
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/it_examples/utils/analysis_injection/version_manager.py |
Added _normalize_package_name() method for PEP 503 normalization; removed duplicate GIT_FALLBACK_URLS entry; updated circuit-tracer commit pin |
tests/examples/test_version_manager.py |
Added tests for package name normalization functionality |
src/interpretune/adapters/circuit_tracer.py |
Renamed _get_analysis_target_indices() to _get_attribution_targets() and updated to use new attribution_targets parameter |
src/it_examples/notebooks/publish/attribution_analysis/analysis_points.py |
Updated to use targets object instead of separate logit_idx and logit_p variables; simplified annotation text |
src/it_examples/notebooks/dev/attribution_analysis/analysis_points.py |
Same changes as publish version |
src/it_examples/notebooks/publish/circuit_tracer_examples/circuit_tracer_adapter_example_basic_clt.ipynb |
Formatting improvements to split long f-strings and updated default parameter value |
src/it_examples/notebooks/dev/circuit_tracer_examples/circuit_tracer_adapter_example_basic_clt.ipynb |
Same changes as publish version |
src/it_examples/notebooks/publish/attribution_analysis/attribution_analysis.ipynb |
Updated circuit-tracer commit pin |
src/it_examples/notebooks/dev/attribution_analysis/attribution_analysis.ipynb |
Updated circuit-tracer commit pin |
src/it_examples/notebooks/publish/.notebook_hashes.json |
Updated hashes for modified notebooks |
scripts/infra_utils.sh |
Simplified maybe_deactivate() to use deactivate 2>/dev/null || true for more robust error handling |
scripts/build_it_env.sh |
Added 2>/dev/null to suppress pip show errors |
requirements/ci/requirements.txt |
Updated circuit-tracer commit pin |
requirements/ci/requirements.in |
Updated circuit-tracer commit pin |
requirements/ci/circuit_tracer_pin.txt |
Updated circuit-tracer commit pin |
pyproject.toml |
Updated circuit-tracer commit pin in commented dependency |
tests/parity_acceptance/expected.py |
Updated expected loss value for train_cuda_bf16 test to reflect new circuit-tracer behavior |
src/it_examples/notebooks/publish/attribution_analysis/analysis_points.py
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the circuit-tracer integration to use the new proposed
AttributionTargetsAPI, switches basic examples to use CLT by default, improves infrastructure utilities, and includes minor test adjustments for PyTorch 2.9 compatibility. Changes span the circuit_tracer adapter, attribution analysis notebooks, example scripts, version management, and CI requirements.pending circuit-tracer PRs used:
Attribution Targets Encapsulation
Allow
offload_modulesto handle single module and container offloading casesExpand Range of GPUs Capable of Running Full Test Suite