Spaces:
Sleeping
Sleeping
Commit History
-
Log P(W) and std summary plots as MLflow artifacts in transform stepβ
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>2999fae -
Fix mlflow.log_input in all remaining pipeline scriptsβ
Same fix as run_primary.py: mlflow.log_input expects mlflow.data.Dataset, not a raw DatasetInput entity. Use MlflowClient().log_inputs() throughout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>88dbab4
-
Namespace all outputs under experiment_dir, add MLflow run metadataβ
All pipeline outputs and sentinels now live under {output_dir}/{mlflow_experiment}/ instead of scattered across the project root and output_dir. Prevents clobbering across experiments and mirrors the MLflow hierarchy. Changes: - Snakefile: derive config["experiment_dir"], pre-create it, override eval.out dynamically; update all sentinel expand() paths - rules/*: sentinel touch paths and inter-rule deps use experiment_dir; correlations/figures dirs moved under experiment_dir - config.yaml: remove hardcoded eval.out (now derived in Snakefile) - scripts/run_*.py: add mlflow.note.content description, model tag, and DatasetInput (local source β output path) to every run Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>0bf8fb1
-
Add drop_columns option to transform stage for refined dataset reductionβ
- reprocess_metrics(): drop_columns param strips named columns before saving the refined dataset; primary is never touched so columns are always recoverable - run_transform.py: --drop-columns passthrough, logged to MLflow - transform.smk: reads transform.drop_columns from config, builds --drop-columns flag - config.yaml: transform.drop_columns: [] with note on common candidates (P_w, w_bins) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>2f68beb -
Write transform output to separate _refined directoryβ
- reprocess_metrics(): rename out_dirβin_dir, add out_dir for refined output. Defaults to {dataset_path}_refined. Copies metadata.json into refined dir. - run_transform.py: add --out-dir arg (default {dataset-dir}_refined); logs out_dir to MLflow. - transform.smk: passes --out-dir {output_dir}/{run_key}_refined explicitly. - dashboard_utils.py: prefer {ds_name}_refined path when loading locally, fall back to {ds_name}. - run_merge.py: cross_model_merge prefers {dir}_refined over primary dir. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>aaaf91c -
Rename src modules for head/pair symmetry; add pair_figures.smk; split eval_metricsβ
src/transformer_analysis/: weight_analysis β head_pipeline attn_head_analysis β head_analyzer metrics β head_metrics correlation_analysis β pair_pipeline head_correlations β pair_analyzer eval_metrics.py (new β implementation extracted from compute_perplexity.py) scripts/: plot_correlations.py β plot_pair_correlations.py plot_corr_figures.py β plot_pair_correlations_batch.py compute_perplexity.py β deleted (impl in eval_metrics; thin wrapper run_eval.py) run_eval.py (new thin wrapper) rules/: correlations.smk β switched to sentinel output (consistent with other rules) pair_figures.smk (new β regenerate pair figures from .npz without re-running correlations) eval.smk β updated to call run_eval.py Snakefile: added correlations_all, pair_figures_all convenience targets Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a81fd74 -
feat: add Snakemake pipeline, MLflow tracking, metrics refactor, testsβ
Pipeline / workflow: - Snakefile + config.yaml orchestrate primary β transform β merge stages - rules/primary.smk, transform.smk, correlations.smk, merge.smk - Sentinel-file pattern (done/*.done) avoids directory-output conflicts - Incremental cross-model merge: appends new models without clobbering; --refresh flag for explicit replacement after re-transform - Per-model checkpoint merge rule for Pythia step-collapse CLI wrappers (scripts/): - run_primary.py β process_model() + MLflow logging - run_transform.py β reprocess_metrics() + MLflow logging (git sha tagged) - run_correlations.py β thin wrapper for run_multi_circuit_analysis() - run_merge.py β cross-model incremental merge + checkpoint merge Metrics refactor: - src/transformer_analysis/metrics.py: canonical home for all stat functions, bin configs, normality_metrics, singular_value_metrics, and adaptive binning helpers (make_weight_bins, make_sv_bins) - histogram_utils.py: backward-compat re-export shim; no logic cβ¦24e1932