Conversation
Contributor
Reviewer's GuideThis PR bundles maintenance updates across benchmark scripts, packaging requirements, CI configurations, scheduler settings, and core code comments, and introduces a new test harness for benchmark statistics. Entity relationship diagram for TASKS dictionary reordering in get_stats.pyerDiagram
TASKS {
string gpt2_cache
string integrated_gradients
string lrp
string mlp_intervene
}
gpt2_cache ||--o{ tdhook : uses
gpt2_cache ||--o{ nnsight : uses
gpt2_cache ||--o{ transformer_lens : uses
integrated_gradients ||--o{ tdhook : uses
integrated_gradients ||--o{ captum_add : uses
integrated_gradients ||--o{ captum : uses
lrp ||--o{ tdhook : uses
lrp ||--o{ zennit : uses
mlp_intervene ||--o{ tdhook : uses
mlp_intervene ||--o{ nnsight : uses
Class diagram for impact_parameters and default_parameters changes in gpt2_cache and integrated_gradientsclassDiagram
class GPT2CacheParameters {
+model_size: ["gpt2", "gpt2-medium", "gpt2-large"]
+batch_size: [10, 50, 100, 500]
+variation: ["all"]
}
class GPT2CacheDefaults {
+model_size: "gpt2"
+batch_size: 50
+variation: "all"
}
class IntegratedGradientsParameters {
+width: [100, 1000, 5000, 10000]
+height: [5, 10, 20, 50]
+batch_size: [10, 100, 1000, 5000]
+variation: ["multiply", "no-multiply"]
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- SEEDS and TASKS are duplicated in get_stats.py and test_stats.py—consider centralizing these constants to reduce maintenance overhead.
- The numeric literals "10_00" and "50_00" in the integrated_gradients impact_parameters are unconventional—prefer standard grouping like 1_000 and 5_000 for clarity.
- There are lingering TODOs for version metadata and init_target kwargs in tdhook—address these or track them as issues to prevent accumulating technical debt.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- SEEDS and TASKS are duplicated in get_stats.py and test_stats.py—consider centralizing these constants to reduce maintenance overhead.
- The numeric literals "10_00" and "50_00" in the integrated_gradients impact_parameters are unconventional—prefer standard grouping like 1_000 and 5_000 for clarity.
- There are lingering TODOs for version metadata and init_target kwargs in tdhook—address these or track them as issues to prevent accumulating technical debt.
## Individual Comments
### Comment 1
<location> `scripts/bench/tasks/integrated_gradients/__init__.py:11` </location>
<code_context>
impact_parameters = {
- "model_size": ["gpt2", "gpt2-medium", "gpt2-large", "gpt2-xl"],
- "batch_size": [100, 1000, 10_000, 100_000],
- "variations": ["all", "specific"],
+ "model_size": ["gpt2", "gpt2-medium", "gpt2-large"],
</code_context>
<issue_to_address>
Possible typo in batch_size values: '10_00' and '50_00' should likely be '1000' and '5000'.
Please update the batch size values to '1000' and '5000' to avoid confusion and ensure consistency.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
What does this PR do?
Various chores.
Linked Issues
Summary by Sourcery
Revise benchmark configurations, broaden Python compatibility, and introduce a benchmark testing harness
Enhancements:
Build:
CI:
Tests:
Chores: