-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Background
Currently ActivationTracker._scalar_history stores individual scalar values:
{
"pca/layer_0_cumvar_1": [(step, value), ...],
"pca/layer_0_cumvar_2": [(step, value), ...],
...
}For visualization purposes (e.g., CEV over training plots), it's more convenient to store the full cumulative variance array per step rather than individual components.
Proposed Enhancement
Add a parallel _array_history storage:
{
"pca/layer_0_cumvar": [(step, np.array([...])), ...],
}Or extend the existing API:
tracker.log_array(key, step, array)
tracker.get_array_history(pattern) -> dict[str, list[tuple[int, np.ndarray]]]Use Case
This would allow visualization functions to directly receive the cumulative variance curve without needing to reassemble it from individual scalar components.
Workaround
For now, we're maintaining a separate in-memory dict in the training loop:
cve_history[layer].append({"step": step, "cumvar": cumvar_array})🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
No labels