Skip to content

Feat/norm stats compatibility report - #1026

Open
TheRealBaoBao wants to merge 1 commit into
Physical-Intelligence:mainfrom
TheRealBaoBao:feat/norm-stats-compatibility-report
Open

Feat/norm stats compatibility report#1026
TheRealBaoBao wants to merge 1 commit into
Physical-Intelligence:mainfrom
TheRealBaoBao:feat/norm-stats-compatibility-report

Conversation

@TheRealBaoBao

@TheRealBaoBao TheRealBaoBao commented Aug 27, 2026

Copy link
Copy Markdown

Summary

Adds a read-only CLI that compares post-transform training samples with the normalization statistics selected by an OpenPI training config.

The report identifies:

  • Data/stat dimension mismatches
  • NaN and Inf values
  • Near-constant dimensions
  • The fraction of values outside configured q01–q99 bounds
  • The dimension with the largest mismatch

Example:

uv run scripts/check_norm_stats.py \
  --config-name pi05_droid_finetune \
  --max-frames 5000

The command reuses the existing config and normalization-stat data loaders. It does not modify the dataset, statistics, model, configuration, or training path.

Motivation

When adapting π0 or π0.5 to a custom robot dataset, reused checkpoint statistics can be structurally valid but poorly matched to the transformed state/action distribution. This report makes that mismatch visible before a long fine-tuning run.

This is related to the normalization questions and failures discussed in #773, #814, and #832.

Tests

  • uv run pytest -q src/openpi/training/norm_stats_report_test.py — 7 passed
  • uv run ruff check scripts/check_norm_stats.py src/openpi/training/norm_stats_report.py src/openpi/training/norm_stats_report_test.py
  • uv run pre-commit run --files scripts/check_norm_stats.py src/openpi/training/norm_stats_report.py src/openpi/training/norm_stats_report_test.py
  • uv run scripts/check_norm_stats.py --help

Scope

This intentionally excludes dataset mutation, automatic normalization-stat selection, general dataset-quality checks, and changes to normalization or training behavior.

I would appreciate feedback on whether maintainers prefer this as a separate CLI or as an optional mode of compute_norm_stats.py.

@TheRealBaoBao
TheRealBaoBao force-pushed the feat/norm-stats-compatibility-report branch from 7a6d6a6 to 1bcc9fc Compare August 27, 2026 02:49
@jimmyt857
jimmyt857 removed their request for review August 29, 2026 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant