d4rl_score_normalization
Compute and audit D4RL normalized returns from raw, random-baseline, and expert-reference scores.
SKILL.mdbasicagent-skill/skill_library/paperbench/fre/skill/d4rl_offline_rl/d4rl_score_normalization/SKILL.md
GitHubD4RL Score Normalization
Use this skill when reporting or checking D4RL-style benchmark scores across tasks with different raw return scales. Do not use it as evidence that offline training was faithful; combine it with dataset and recovery-harness checks.
Inputs
score: raw policy return.random_score: return assigned to the 0-point reference.expert_score: return assigned to the 100-point reference.
Outputs
normalized_scoreusing100 * (score - random_score) / (expert_score - random_score).diagnosticswith denominator, endpoint interpretation, and extrapolation flags.
Workflow
- Parse all values as floats.
- Reject equal random and expert scores because the normalization denominator is zero.
- Compute the normalized score with the D4RL formula.
- Preserve raw inputs in the result for reproducibility.
- Flag scores below random or above expert without clipping them.
Validation
Run python scripts/normalize_score.py --score 5 --random-score 0 --expert-score 10. The tests cover random, expert, midpoint, extrapolated, and degenerate baseline cases.
Limitations
This skill does not choose environment-specific reference scores. The caller must provide the paper, benchmark, or recovery-target baselines.