Skip to content

Commit 50e878e

Browse files
committed
metrics check
Signed-off-by: bg51717 <biguo@nvidia.com>
1 parent 0cccea5 commit 50e878e

6 files changed

Lines changed: 417 additions & 9 deletions

File tree

docs/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Learn about DTensor and Megatron Core training backends, their capabilities, and
6262
:link: about/algorithms/index
6363
:link-type: doc
6464

65-
Discover supported algorithms including GRPO, SFT, DPO, RM, and on-policy distillation with detailed guides and examples.
65+
Discover supported algorithms including GRPO, PPO, SFT, DPO, RM, and on-policy distillation with detailed guides and examples.
6666
:::
6767

6868
:::{grid-item-card} {octicon}`graph` Evaluation
@@ -239,6 +239,7 @@ guides/dpo.md
239239
guides/dapo.md
240240
guides/prorlv2.md
241241
guides/grpo.md
242+
guides/ppo.md
242243
guides/grpo-deepscaler.md
243244
guides/grpo-sliding-puzzle.md
244245
guides/grpo-audio.md

tests/functional/L1_Functional_Tests_GPU.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ run_test uv run --no-sync bash ./tests/functional/grpo_non_colocated.sh
6868
run_test uv run --no-sync bash ./tests/functional/grpo_rm_env.sh
6969
run_test uv run --no-sync bash ./tests/functional/grpo_sglang.sh
7070
run_test fast uv run --no-sync bash ./tests/functional/grpo_topp_topk.sh
71+
run_test uv run --no-sync bash ./tests/functional/ppo_megatron.sh
7172
run_test uv run --no-sync bash ./tests/functional/prorlv2.sh
7273
run_test uv run --no-sync bash ./tests/functional/qa_distillation_megatron.sh
7374
run_test uv run --no-sync bash ./tests/functional/rm.sh

tests/test_suites/llm/ppo-dsr1-7b-math-8n8g-megatron.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ uv run tests/json_dump_tb_logs.py $LOG_DIR --output_path $JSON_METRICS
3434
# Only run metrics if the target step is reached
3535
if [[ $(jq 'to_entries | .[] | select(.key == "train/loss") | .value | keys | map(tonumber) | max' $JSON_METRICS) -ge $MAX_STEPS ]]; then
3636
uv run tests/check_metrics.py $JSON_METRICS \
37-
'median(data["train/token_mult_prob_error"]) < 1.1' \
38-
'data["train/token_mult_prob_error"]["20"] < 1.1' \
39-
'data["train/reward"]["20"] > 0.0'
37+
'data["train/reward"]["40"] > 0.3' \
38+
'data["validation/accuracy"]["40"] > 0.42'
4039

4140
# Clean up checkpoint directory after successful run to save space.
4241
rm -rf "$CKPT_DIR"

tests/test_suites/llm/ppo-qwen2.5-1.5b-gsm8k-1n8g-megatron.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ uv run tests/json_dump_tb_logs.py $LOG_DIR --output_path $JSON_METRICS
3434
# Only run metrics if the target step is reached
3535
if [[ $(jq 'to_entries | .[] | select(.key == "train/loss") | .value | keys | map(tonumber) | max' $JSON_METRICS) -ge $MAX_STEPS ]]; then
3636
uv run tests/check_metrics.py $JSON_METRICS \
37-
'median(data["train/token_mult_prob_error"]) < 1.1' \
38-
'data["train/token_mult_prob_error"]["100"] < 1.1' \
39-
'data["train/reward"]["100"] > 0.5'
37+
'data["train/reward"]["100"] > 0.85' \
38+
'data["validation/accuracy"]["100"] > 0.7'
4039

4140
# Clean up checkpoint directory after successful run to save space.
4241
rm -rf "$CKPT_DIR"

tests/test_suites/nightly.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ tests/test_suites/llm/distillation-qwen3-1.7b-1n8g-megatron-qa-nvfp4.sh
173173
# PPO #
174174
#######
175175

176-
# Megatron PPO with GAE and value model (DeepSeek-7B, GSM8K)
177-
tests/test_suites/llm/ppo-deepseek7b-gsm8k-1n8g-megatron.sh
176+
# Megatron PPO with GAE and value model (Qwen2.5-1.5B, GSM8K)
177+
tests/test_suites/llm/ppo-qwen2.5-1.5b-gsm8k-1n8g-megatron.sh
178178

179179
# Megatron PPO with KL penalty + importance sampling (DeepSeek-R1-7B, DAPOMath)
180180
tests/test_suites/llm/ppo-dsr1-7b-math-8n8g-megatron.sh

0 commit comments

Comments
 (0)