Closed dtch1997 closed 3 months ago
[!WARNING]
Rate limit exceeded
@dtch1997 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 9 seconds before requesting another review.
How to resolve this issue?
After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.How do rate limits work?
CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://coderabbit.ai/docs/faq) for further information.Commits
Files that changed from the base of the PR and between b8cedeb9d2f7f1b74e61e184cc46307049000f98 and 73f321dcf15d4f2857bab5bbb55670df3ab1ce4e.
This update introduces significant enhancements and new functionalities to the sae_eap
project. Key additions include new dependencies (tensordict
and networkx
), extension of graph and node management capabilities, new classes and methods for pruning and visualization, and expansion of unit tests. These changes together aim to improve model configuration, graph manipulation, and visualization support within the computational framework.
File(s) | Description of Changes |
---|---|
pyproject.toml |
Added tensordict and networkx dependencies. |
sae_eap/core/constants.py |
Added new imports and GPT_2_SMALL_MODEL_CONFIG initialization; removed redundant code. |
sae_eap/core/types.py |
Refactored type definitions and removed node name utility functions. |
sae_eap/eap/graph.py |
Introduced classes SAEReconstructionNode and SAEErrorNode ; added methods to Graph . |
sae_eap/graph/build.py |
Added functions for building graphs from models/configurations. |
sae_eap/graph/edge.py |
Defined Edge class and related functionalities. |
sae_eap/graph/graph.py |
Enhanced Graph class with new attributes, constructors, and methods for graph management. |
sae_eap/graph/node.py |
Added various node classes (Node , LogitNode , MLPNode , AttentionNode , etc.). |
sae_eap/graph/prune.py |
Introduced pruning classes and methods (ThresholdPruner , TopNPruner , GreedyPruner ). |
sae_eap/graph/viz.py |
Added visualization utilities and conversion functions for Graphviz. |
tests/unit/conftest.py |
Added pytest fixture ts_model for model caching. |
tests/unit/graph/test_build.py |
Introduced test for verifying graph structure from a model. |
tests/unit/helpers.py |
Added load_model_cached function for model caching. |
.github/workflows/release.yaml |
Added Graphviz setup step in workflow. |
.github/workflows/tests.yaml |
Added Graphviz setup step in workflow. |
sequenceDiagram
participant Dev as Developer
participant BuildGraph as build_graph()
participant Graph as Graph
participant Config as HookedTransformerConfig
Note over Dev: Initiate graph building with new functions
Dev ->>+ BuildGraph: Call build_graph(model_or_config)
BuildGraph ->> Config: Parse model_or_config
Note over BuildGraph, Graph: Add nodes and edges as per configuration
BuildGraph ->>+ Graph: Call add_layer_nodes_and_edges for each layer
loop For each layer
Graph ->>+ Graph: Add nodes and edges
end
BuildGraph -->>- Dev: Return built Graph
In code's realm, enhancements spread wide,
With types and nodes, we take the ride.
Graphs now glow with vivid hue,
Builders and pruners, all brand new.
Dependencies grow, our tools refine,
Amidst the logic, our models shine.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Refactor the graph used in EAP, in preparation for supporting SAEs.
Summary by CodeRabbit
New Features
Dependencies
tensordict
version0.4.0
andnetworkx
version3.3
.Tests
Chores
These updates significantly enhance the graph construction and visualization capabilities, offering more robust and efficient tools for end-users.