Repository navigation
[OMNIML-6180] Run only the fsdp2 llm_qat training cases on PRs #2925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ | |
|
|
||
|
|
||
| import json | ||
| import os | ||
|
|
||
| import pytest | ||
| import torch | ||
|
|
@@ -32,6 +33,14 @@ | |
| # Backends that need gradient checkpointing | ||
| GRADIENT_CHECKPOINTING_BACKENDS = {"ddp", "deepspeed"} | ||
|
|
||
| # PR runners have one GPU, so a backend case only exercises the wrapper and ModelOpt's patches, not | ||
| # sharding. PRs run fsdp2 (the default, with the most ModelOpt-specific code); the other backends run | ||
| # in the scheduled CI. QLoRA still trains on ddp on PRs. | ||
| _PR_CI = os.environ.get("GITHUB_REF", "").startswith("refs/heads/pull-request/") | ||
| _NIGHTLY_ONLY = pytest.mark.skipif( | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not directly, for now. The example workflow never passes |
||
| _PR_CI, reason="Only fsdp2 runs on PRs; runs in the scheduled CI" | ||
| ) | ||
|
|
||
| # Fast training overrides (short runs with frequent eval) | ||
| FAST_TRAIN_ARGS = [ | ||
| "--model_max_length", | ||
|
|
@@ -152,8 +161,8 @@ def test_dataset_utils_pretokenize(tiny_qwen3_path, tmp_path): | |
|
|
||
| @pytest.mark.parametrize("backend", [ | ||
| "fsdp2", | ||
| "deepspeed", | ||
| "ddp", | ||
| pytest.param("deepspeed", marks=_NIGHTLY_ONLY), | ||
| pytest.param("ddp", marks=_NIGHTLY_ONLY), | ||
| ]) | ||
| def test_qwen3_qat_nvfp4(nvfp4_ptq_dir, dataset_cache_dir, tmp_path, backend): | ||
| qat_output_dir = tmp_path / "qat" | ||
|
|
@@ -227,7 +236,7 @@ def test_qwen3_lora_qat_nvfp4(tiny_qwen3_path, tmp_path): | |
|
|
||
| @pytest.mark.parametrize("backend", [ | ||
| "fsdp2", | ||
| "deepspeed", | ||
| pytest.param("deepspeed", marks=_NIGHTLY_ONLY), | ||
| ]) | ||
| def test_qwen3_qad_nvfp4(tiny_qwen3_path, nvfp4_ptq_dir, dataset_cache_dir, tmp_path, backend): | ||
| qad_output_dir = tmp_path / "qad" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.