Skip to content

[models] Defer backend errors from attn_gym's lazily resolved exports - #5565

Merged
tianyu-l merged 2 commits into
pytorch:mainfrom
mkhilari:attn-gym-lazy-exports
Oct 24, 2026
Merged

tianyu-l merged 2 commits into
pytorch:mainfrom
mkhilari:attn-gym-lazy-exports

Conversation

@mkhilari

Copy link
Copy Markdown
Contributor

Summary

Follow up to #5467 and #5500. attn_gym resolves its backend backed exports on first attribute access (attn_gym.linear._lazy), causal_conv1d, causal_conv1d_decode and paged_causal_conv1d come from attn_gym.linear.short_conv, which imports fine, only the getattr imports attn_gym.linear.short_conv.cute and raises ImportError("causal_conv1d requires the optional CuTeDSL backend: ...") chained from ModuleNotFoundError(name="cutlass"). #5467 only deferred a ModuleNotFoundError raised by the module import itself, so gdn.py / kda.py still failed to import on a machine without cutlass, and with them everything that imports torchtitan.models.common, 18 of the CPU test modules did not collect on macOS.

  • __getattr__ resolves exports through _load_export, an ImportError whose cause is a backend's ModuleNotFoundError is recorded under "<module>.<export>" and the export becomes a placeholder carrying that error, exactly like an export of a module that failed to import. A missing attn_gym module, or an ImportError that is not a missing module, still raises at import.
  • The install hint now names attn gym 0.0.17, the version .ci/docker/requirements.txt pins (noted in the [models] Let the attn_gym facade defer missing-backend import errors #5467 review).
  • No change when every backend imports, getattr succeeds and nothing is recorded.

On a machine without cutlass the models now import, causal_conv1d is a placeholder, so InnerKDA / InnerGDN (which check it in __init__ since #5500) fail at build with the cutlass error instead of at the first forward, and KDAKernel / GDNKernel still build when their own backends import.

Also takes the optional note from the #5500 re review, the build test now breaks one thing per case, so each entry of the require_attn_gym lists is load bearing.

Test plan

tests/unit_tests/cpu/models/common/test_optional_imports.py:

  • New test_attention_gym_lazy_exports_with_missing_backend, a fake attn_gym.linear.short_conv resolves causal_conv1d lazily and fails on cutlass. gdn imports, gdn.causal_conv1d is a placeholder (not _MissingKernel itself), calling it and require_attn_gym(causal_conv1d) raise ModuleNotFoundError(name="cutlass"), an ImportError chained from a missing attn_gym module, and one that is not a missing module, still raise and leave no placeholder. Fails without the facade change (the ImportError escapes at import), passes with it.
  • test_attention_modules_report_their_own_backend_at_build is reparametrized over 11 cases, each breaking exactly one thing on a backend of its own, the attn_gym.linear.short_conv module, or one of the 10 exports the require_attn_gym lists name (causal_conv1d, chunk_kda, bound_gate, l2norm, chunk_gdn, recurrent_gdn, context_parallel_kda, context_parallel_gdn, context_parallel_conv_history, ContextParallelRouting), broken through the lazy export path. Each case asserts the placeholder is named after what failed and exactly which of KDAKernel, GDNKernel, InnerKDA, InnerGDN, ContextParallelInnerKDA, ContextParallelInnerGDN fail at build. Dropping ContextParallelRouting from the cp_kda.py list fails only the [ContextParallelRouting] case, without the facade change the 10 export cases fail and the module case passes.
  • The two install hint asserts updated to 0.0.17.

On macOS 15 (attn-gym 0.0.17, no cutlass/triton), rebased on a4a62b3, pytest tests/unit_tests/cpu --collect-only goes from 1371 tests collected / 23 errors to 1640 / 5. The 18 errors fixed were all the causal_conv1d ImportError, the 5 that remain are experiments/graph_trainer/paged_stash_memory_policy.py importing triton at module level (3) and an older renderers in my env (2), neither touched here. Of the 18 modules, 16 run standalone, 210 passed, 2 fail for platform reasons (qwen3_8 builds a model whose inner modules need cutlass and gets the deferred cutlass error at build, test_lora_forward runs torch.compile on CPU), the other 2 (kimi_k3/test_kimi_k3_config.py, recipes/test_debug_config_defaults.py) hit the graph_trainer triton import when run on their own. test_optional_imports.py 25 passed, pre commit on both files passes every hook except pyrefly, which reports the same pre existing diagnostics as main.

@pytorch-bot pytorch-bot Bot added ciflow/fake-pg Run 1-GPU Fake PG integration tests ciflow/rl labels Oct 20, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 20, 2026
@pytorch-bot

pytorch-bot Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@pytorch-bot

pytorch-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

The following ciflow label(s) have been added but CI has not been triggered yet because the workflows are awaiting approval:

  • ciflow/rl
  • ciflow/fake-pg

Once a maintainer approves the workflows (scroll to the bottom of the PR page), the corresponding CI jobs will be triggered automatically. Please ping one of the reviewers if you do not have access to approve and run workflows.

@tianyu-l

Copy link
Copy Markdown
Contributor

@claude review

@claude

claude Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @tianyu-l's task in 1m 24s —— View job


Review: Defer backend errors from attn_gym's lazily resolved exports

  • Gather context (diff, facade, tests)
  • Review torchtitan/models/common/attn_gym.py
  • Review tests/unit_tests/cpu/models/common/test_optional_imports.py
  • Post review

The root cause is right. #5467 only caught a ModuleNotFoundError from import_module, but attn_gym.linear._lazy raises a wrapping ImportError later, from getattr. Handling that in _load_export is the right layer for the fix. The change is small, _is_backend_error now holds the logic both paths share, and the success path is the same as before (getattr still returns directly). Below is one UX regression worth fixing, plus a few nits.

I wasn't able to run the tests or pre-commit in this environment because the commands need approval, so everything here comes from reading the code. I did check every entry in _BUILD_FAILURE_CASES against the require_attn_gym(...) calls in kda.py, gdn.py, cp_kda.py and cp_gdn.py, and they all match.


1. attn_gym's install hint is dropped from the deferred error (attn_gym.py:228-233)

_load_export records cause, the inner ModuleNotFoundError("No module named 'cutlass'"). _raise_for then re-raises only str(cause) and chains from cause. The outer ImportError ("causal_conv1d requires the optional CuTeDSL backend: ...") is discarded, and that's the one with the guidance the user can act on. It doesn't appear in the message or anywhere in the traceback chain. So a user building InnerKDA on a machine without cutlass gets a bare No module named 'cutlass'. The new test even pins this: assert str(error) == "No module named 'cutlass'".

For a module-level failure, the recorded MNFE is the whole story. For a lazy export, attn_gym has deliberately written a better message, and we should keep it. One option, which keeps _BACKEND_ERRORS: dict[str, ModuleNotFoundError] and the name= contract:

key = f"{module.__name__}.{name}"
recorded = ModuleNotFoundError(str(error), name=cause.name, path=cause.path)
recorded.__cause__ = error
_BACKEND_ERRORS.setdefault(key, recorded)

The test assert would then become "CuTeDSL backend" in str(error) (or similar), with error.name == "cutlass" unchanged.

Fix this →

2. Only explicit chaining is recognized (attn_gym.py:228)

error.__cause__ or error covers raise ImportError(...) from mnfe, which is what attn_gym 0.0.17 does. If a later release uses implicit chaining instead (raise ImportError(...) inside an except, with no from), only __context__ is set. The error then escapes at import and the 18 collection failures come back. Keeping this narrow is reasonable (CLAUDE.md #7), so I'm not asking for a change. I'd mention in the docstring that this relies on attn_gym using from, so the next person to see the failure knows where to look.

3. Nits

  • _raise_for docstring (attn_gym.py:134): "the backend error recorded for the export's module". Since a key can now be "<module>.<export>", this should say "for the export or its module".
  • _missing_backend_kernel(module_name) (attn_gym.py:177): the parameter now also receives "<module>.<export>" keys. Renaming it to key would match how _BACKEND_ERRORS is now described.
  • _is_backend_error doesn't defer error.name is None, same as the old inline check. Good, the behavior hasn't changed.

Tests

  • Reparametrizing the build test so each case breaks exactly one thing works well. Every require_attn_gym entry is now covered by a case that fails if the entry is dropped. The placeholder-name assert (_MissingKernel[<module>.<export>] vs _MissingKernel[<module>]) also checks which path recorded the error.
  • In the module case ("attn_gym.linear.short_conv"), the export is found with next(... if module == broken), which depends on _EXPORTS dict order (it currently picks causal_conv1d). Any export of that module works for the assert, so this is fine. Just flagging the order dependence.
  • test_attention_gym_lazy_exports_with_missing_backend covers both negative paths (an attn_gym submodule as the cause, and an ImportError with no MNFE cause), including the check that no placeholder gets cached (name not in facade.__dict__). Monkeypatching facade.import_module relies on the facade's local name for it, but it runs in a subprocess, so it can't leak into other tests.
  • The version bump to 0.0.17 matches .ci/docker/requirements.txt:13, and the sync comment is a useful addition.

Summary

The change is correct and well-scoped. Fixing #1 before merge would give users attn_gym's actionable message instead of a bare No module named 'cutlass'. The rest is optional.

@mkhilari

Copy link
Copy Markdown
Contributor Author

@claude review

Thanks @tianyu-l for the review. Pushed a follow up commit addressing it:

  1. The deferred error keeps attn_gym's message, _load_export records ModuleNotFoundError(str(error), name=cause.name, path=cause.path) chained from the ImportError, so on a machine without cutlass InnerKDA.Config(...).build() now raises causal_conv1d requires the optional CuTeDSL backend: pip install attn-gym[linear] with error.name == "cutlass", and the backend's own error stays in the chain. test_attention_gym_lazy_exports_with_missing_backend asserts the message and the chain, the build test expects attn_gym's message for the 10 export cases and the backend's for the module case.
  2. The _load_export docstring now says only from chaining (__cause__) is recognized.
  3. _raise_for docstring updated, _missing_backend_kernel(key) renamed.

Verified on macOS 15 with attn-gym 0.0.17 and no cutlass/triton, test_optional_imports.py 25 passed, and the real package's CuTeDSL message surfaces at build. pre commit passes every hook except pyrefly, which reports the same pre existing diagnostics as main in the TYPE_CHECKING imports.

@tianyu-l

Copy link
Copy Markdown
Contributor

@claude review again

@claude

claude Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @tianyu-l's task in 46s —— View job


Re-review: Defer backend errors from attn_gym's lazily resolved exports

  • Gather context (diff of d990ef5 and the full PR)
  • Check the fixes for the previous review
  • Look for new issues
  • Post review

The follow-up commit (d990ef5) fixes everything from the last review. I didn't find any new issues, so this looks ready to merge to me.

I couldn't run pytest or pre-commit here because those commands need approval in this environment. Everything below comes from reading the code. If you want CI to back this up, a maintainer still has to approve the ciflow/rl / ciflow/fake-pg workflows.


Previous findings

# Finding Status
1 attn_gym's install hint dropped from the deferred error ✅ Fixed. _load_export (attn_gym.py:233-240) records ModuleNotFoundError(str(error), name=cause.name, path=cause.path) with __cause__ = error. The user now sees attn_gym's CuTeDSL message, and error.name == "cutlass" still holds. When _raise_for raises, the chain is fresh MNFE → recorded MNFE → attn_gym's ImportError → No module named 'cutlass', so the backend's own error is still in the traceback.
2 Only from chaining is recognized ✅ The docstring now says so (attn_gym.py:225-227).
3 _raise_for docstring and _missing_backend_kernel parameter name ✅ Both updated. The _BACKEND_ERRORS comment now also describes the "<module>.<export>" key form.

Fresh pass on the facade

  • Success path: unchanged. getattr returns directly, nothing is recorded, and __getattr__ caches the value in globals() as before.
  • Fallback when __cause__ is missing: cause = error.__cause__ or error also covers a lazy getattr that raises a bare ModuleNotFoundError. In that case recorded repeats the same message and chains to the original. That's harmless, so no change needed.
  • What still raises at import: _is_backend_error keeps the old rule. A missing attn_gym.* module, or an MNFE with name=None, raises at import. An ImportError that isn't caused by an MNFE also re-raises unchanged. The test covers all of these.
  • setdefault: each export has its own key and is cached in globals() after its first access, so setdefault never sees a second write in practice. It's still a reasonable guard.

Tests

  • expected_message in the build test (broken in facade._EXPORTS → attn_gym's message, otherwise the backend's) checks each of the 11 cases against the error path it should go through. With fix Add profiler #1 in place, the export cases also check that the outer message is kept.
  • test_attention_gym_lazy_exports_with_missing_backend checks the recorded message, recorded.__cause__.__cause__, and the message raised both by calling the placeholder and by require_attn_gym. That covers the whole chain.

Nit (optional)

  • assert str(recorded.__cause__.__cause__) == ... depends on the fake's exact two-level chain. That's fine for a fake, but error.name == "cutlass" on the outermost error is the actual contract callers rely on, and that's already asserted.

Summary

LGTM. The fixes are minimal, they match the suggestions, and the tests have been updated to cover them.

@tianyu-l
tianyu-l merged commit 3ed5aa9 into pytorch:main Oct 24, 2026
24 of 25 checks passed
SherlockNoMad pushed a commit that referenced this pull request Nov 6, 2026
### Summary

`paged_stash_memory_policy.py` imported `triton` at module level, and
`graph_trainer.trainer` imports it through `graph_pp/pipeline.py ->
graph_builder.py -> graph_builder_utils.py`. On a platform without
Triton wheels (macOS, CPU only) `GraphTrainer` therefore did not import,
and three CPU test modules did not collect:
`tests/unit_tests/cpu/test_trainer.py`,
`config/test_config_validation.py`,
`config/test_cuda_graph_validation_config.py` (noted as the remaining
collection errors in #5565, now merged).

- The two Megatron Core kernels (`paged_stash_copy_kernel`,
`paged_stash_pop_kernel`) and `GLOBAL_BLOCK_SIZE` move verbatim, with
their "copied from Megatron Core 0.19.0, do not clean up" header, into
`paged_stash_kernels.py`. Nothing outside `PagedStashBuffer.launch_copy`
/ `launch_pop` referenced them (they were in `__all__`, which no longer
lists them).
- `launch_copy` and `launch_pop` import the kernel module at launch. The
policy module imports everywhere, a launch on a machine without Triton
raises Python's own `ModuleNotFoundError: No module named 'triton'`, and
the kernels can only run on CUDA anyway.
- No change where Triton is installed: the same kernels run from the
same launch sites, imported once from `sys.modules` after the first
launch.

### Test plan

New
`torchtitan/experiments/graph_trainer/tests/test_optional_imports.py`,
in a subprocess that blocks `triton` on `sys.meta_path`, `GraphTrainer`
and `paged_stash_memory_policy` import with `triton` never loaded,
importing `paged_stash_kernels` and calling
`PagedStashBuffer.launch_copy` raise `ModuleNotFoundError` with `name ==
"triton"`. Fails on main (the policy import raises), passes with this
change.

On macOS 15 (no Triton), torch 2.16.0.dev20261022 CPU,
torch_checkpointing 0.1.1, on main 3ed5aa9 (with #5565 merged):
- `pytest tests/unit_tests/cpu --collect-only`, 3 errors / 1847 tests
collected on main (`test_trainer.py`,
`config/test_config_validation.py`,
`config/test_cuda_graph_validation_config.py`, all the Triton import) ->
0 errors / 1926 tests collected with this change.
- `tests/unit_tests/cpu/test_trainer.py`,
`config/test_config_validation.py`,
`config/test_cuda_graph_validation_config.py`, 79 passed.
- The new test, 1 passed.
- pre commit on the three files passes every hook except pyrefly, which
reports the `import triton` lines of the new module (no Triton locally)
and diagnostics that pre date this change in
`paged_stash_memory_policy.py`.

The GPU paged stash tests
(`torchtitan/experiments/graph_trainer/tests/test_paged_stash.py`)
import only the policy module's public names, which are unchanged, I
could not run them here (no CUDA).
saforem2 added a commit to saforem2/torchtitan that referenced this pull request Nov 9, 2026
Branch was 124 commits behind main; attn_gym.py predated
3ed5aa9 which defers cutlass/triton ImportError from
attn_gym.linear._lazy (causal_conv1d via cute.py:26) to a
_MissingKernel placeholder. Without it, any import of
torchtitan.models.common — including
torchtitan.experiments.ezpz.agpt.config_registry via
agpt/__init__.py:36 — hard-fails on macOS where attn-gym
0.0.17 is installed but cutlass is not. Aurora never hit it
(cutlass available on compute). Bring file verbatim from
origin/main.
saforem2 added a commit to saforem2/torchtitan that referenced this pull request Nov 9, 2026
Branch was 124 commits behind main; attn_gym.py predated
3ed5aa9 which defers backend ImportError from
attn_gym.linear._lazy (causal_conv1d via cute.py:26 import
cutlass) to a _MissingKernel placeholder. Without it, any
import of torchtitan.models.common — including
torchtitan.experiments.ezpz.agpt.config_registry via
agpt/__init__.py:36 — hard-fails on macOS where attn-gym
0.0.17 is installed but cutlass is absent. Aurora (Intel XPU
via aurora_frameworks-2026.1.0 / oneAPI, no CUDA) was never
affected — its XPU path does not hit cutlass the same way and
all 4B/10B jobs reached Training starts at step 1. Bring file
verbatim from origin/main.
saforem2 added a commit to saforem2/torchtitan that referenced this pull request Nov 9, 2026
30B 8N selective (9053611, E 143) hits the same
_set_storage_data_ptr_access_error_msg bomb as full:

  _placeholder.py:101 torch._C._set_storage_data_ptr_access_error_msg
  AttributeError: module torch._C has no attribute ...

Both DefaultActivationRematConfig and FullActivationRematConfig
go through torch_remat 0.2.0 on aurora_frameworks-2026.1.0
(torch 2.13). 30B stays infeasible until frameworks pins a
compatible torch_remat. Keep 30B on none and document the
failure; keep attn_gym pytorch#5565 sync.
saforem2 added a commit to saforem2/torchtitan that referenced this pull request Nov 9, 2026
…is_missing_kernel in callers

Sourcery flagged that only attn_gym.py was synced from main (pytorch#5565);
its callers still did bare require_attn_gym()/identity checks that
TypeError'd or leaked placeholders into SPMD registration when
cutlass/triton absent. Pull the companion 4 files from main and add a
compat shim for the renamed prepare_cp_linear_attention_metadata.

Co-Authored-By: internal-model
saforem2 added a commit to saforem2/torchtitan that referenced this pull request Nov 12, 2026
…30B infeasible on current frameworks (#76)

* fix(ezpz): gate 30B v2 4K to selective remat

Full (torch_remat 0.2.0 on aurora_frameworks-2026.1.0) hits
_set_storage_data_ptr_access_error_msg bomb; none OOMs at 30B
even at 8N (9053526 CCL scaleout_device_buf malloc fail).
Selective (DefaultActivationRematConfig, model-declared regions)
uses a different torch_remat path and may fit within XPU
memory. 4B/10B stay on none (already finite-loss).

* fix(ezpz): sync attn_gym lazy-export deferral from main (pytorch#5565)

Branch was 124 commits behind main; attn_gym.py predated
3ed5aa9 which defers backend ImportError from
attn_gym.linear._lazy (causal_conv1d via cute.py:26 import
cutlass) to a _MissingKernel placeholder. Without it, any
import of torchtitan.models.common — including
torchtitan.experiments.ezpz.agpt.config_registry via
agpt/__init__.py:36 — hard-fails on macOS where attn-gym
0.0.17 is installed but cutlass is absent. Aurora (Intel XPU
via aurora_frameworks-2026.1.0 / oneAPI, no CUDA) was never
affected — its XPU path does not hit cutlass the same way and
all 4B/10B jobs reached Training starts at step 1. Bring file
verbatim from origin/main.

* Revert "fix(ezpz): gate 30B v2 4K to selective remat"

30B 8N selective (9053611, E 143) hits the same
_set_storage_data_ptr_access_error_msg bomb as full:

  _placeholder.py:101 torch._C._set_storage_data_ptr_access_error_msg
  AttributeError: module torch._C has no attribute ...

Both DefaultActivationRematConfig and FullActivationRematConfig
go through torch_remat 0.2.0 on aurora_frameworks-2026.1.0
(torch 2.13). 30B stays infeasible until frameworks pins a
compatible torch_remat. Keep 30B on none and document the
failure; keep attn_gym pytorch#5565 sync.

* feat(ezpz): agpt-v2 4B/10B 4K configs streaming full raw olmo-mix-1124

Add agpt_v2_{4b,10b}_4k_olmo_mix, which stream the raw olmo-mix-1124 JSON
shards listed in $AGPT_V2_DATA_MANIFEST through the Grain HF streaming
source, and build_olmo_mix_manifest.py, which sizes that list to a multiple
of the DP world size so split_dataset_by_node assigns whole files per rank.

* fix(ezpz): complete attn_gym deferral sync — wire require_attn_gym + is_missing_kernel in callers

Sourcery flagged that only attn_gym.py was synced from main (pytorch#5565);
its callers still did bare require_attn_gym()/identity checks that
TypeError'd or leaked placeholders into SPMD registration when
cutlass/triton absent. Pull the companion 4 files from main and add a
compat shim for the renamed prepare_cp_linear_attention_metadata.

Co-Authored-By: internal-model

* docs(ezpz): 60/40 corpus kind-shift + MMLU letter-prior gating notes

Subagent fanout: FineWeb-Edu 60/40 kind-shift proposal (SmolLM2
33.6% @38B vs current 94.8% DCLM monoculture) + MMLU letter-prior
gating appendix (constant-D 0.2689 > all 2B 0.2413-0.2655 is harness
prior). 5 files (2 new + 3 updated indexes), no compute.

Co-Authored-By: internal-model

* fix(ezpz): CPT-FWE 4N to PPN=8 + 60/40 kind-shift config

12483035 failed: world_size 60 (5xPPN12) 11008%60!=0 FSDP uneven sharding
plus missing MDS_ANNEAL_BASE on Sunspot (~/torchtitan has no outputs/,
lives on TEGU at .../projects/saforem2/.../step-0). Fix: select=4
PPN=8 -> 32r (11008%32==0), export MDS_ANNEAL_BASE to TEGU path.
Adds agpt_2b_mds_mix_owm_edu_6040 (SmolLM2 60/40 FWE/DCLM stage-1).

Co-Authored-By: internal-model

* fix(ezpz): port _agpt_2b_mds_mix_blend to Grain DatasetMix + 60/40

HFDataSource/InterleavedHuggingFaceTextDataLoader deleted in pytorch#4088;
previous mix builders always crashed. Port to GrainDataLoader
(DatasetMix after ConcatThenSplitPacking) so weights count packed
8192-token rows (token-weighted). Adds agpt_2b_mds_mix_owm_edu_6040
(SmolLM2 60/40). CPT script already switched to PPN=8 and
MDS_ANNEAL_BASE TEGU path (prior 12483035 failed on both).

Co-Authored-By: internal-model

* fix(ezpz): re-add agpt_debugmodel_gsm8k_plus_distill_streaming (clobbered by CPT push)

* docs(ezpz): 2088N umbrella post-mortem + per-seat resubmit

Placeholder 9053470 (select=2088, 24h) ran 4h26m — a single GPU fatal
error (grf_fatal_singlesubslice_error on x4415c5s5b0n0, 10B slice) made
PBS kill the whole 2088N job and all four seats. 20B-512 hung after
10854 (watchdog restart, no new ckpt), 20B-256 saved step-21100, 4B
saved step-2600, 10B at 768N never trained (step-1 loss 17788+).

Resubmitted as one PBS job per seat (seat-autoretry-20261111.pbs +
submit-seats-20261111.sh): 10B moved 768N->512N, HF cache on /tmp.
Umbrella PBS retained for provenance. Journal + PROD/README updated.

Co-Authored-By: internal-model

* style(ezpz): lint grain-sft-cot

ufmt on config_registry and cp_linear_attention, license header on
build_olmo_mix_manifest, spell out FW-Edu and 'reused' for codespell.

* docs(ezpz): fix broken journal links in production README

* fix(ezpz): shuffle olmo-mix manifests so the v2 mix is not a curriculum

split_dataset_by_node gives rank r files r, r+dp, ..., so a sorted manifest
feeds the subsets in path order. The builder now writes a seed-0 shuffle by
default. The 10B seat defaults to olmo-mix-dp6144-shuf0.txt; the 4B stays on
the sorted file it resumes from.

* fix(models): CP KDA/GDN check their attn_gym exports at build

Port upstream's require_attn_gym calls for ContextParallelInnerKDA and
ContextParallelInnerGDN. Without them the four context-parallel cases in
test_optional_imports.py (copied from upstream on this branch) built
successfully with a missing backend and failed.

* SFT script: CKPT_DIR respect -v override so CPT-17000 lane writes agpt2b-cpt17000-gsm8k-3ep not default ep3 (avoids clobbering ckpt93 B2)

---------

Co-authored-by: sim <sim@localhost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/fake-pg Run 1-GPU Fake PG integration tests ciflow/rl CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants