Commit 196a605
authored
## Summary
Stage 3i (final code-side stage) of the Ray removal (parent #4453). With
v1 gone (#5137) and the Ray backend gone (#5138), `fray.v2` is the only
surviving version — drop the `v2` suffix and move the modules up to the
`fray` root.
## What this PR does
- `git mv
lib/fray/src/fray/v2/{actor,client,device_flops,iris_backend,local_backend,types}.py`
→ `lib/fray/src/fray/` (6 files, history preserved)
- Collapse the `fray.v2/__init__.py` content into `fray/__init__.py`;
delete the v2 shim
- Rewrite `fray.v2.X` → `fray.X` across 76 files (code, tests, docs,
`AGENTS.md`, `.pyrefly-baseline.json`)
- Rename `lib/fray/tests/test_v2_*.py` → `lib/fray/tests/test_*.py` (4
files)
- No runtime behavior changes — this is a pure rename
## What stays unchanged
- `fray.cluster` public API — `from fray.cluster import ResourceConfig`
still works for the ~60 external call sites; the shim now re-exports
from `fray.types` instead of `fray.v2.types`
- Top-level `fray` exports (already the canonical public interface
before this PR)
- `lib/fray/pyproject.toml` `[tool.hatch.build.targets.wheel]` (already
`packages = ["src/fray"]`)
## Post-rename doc + CI cleanup
Follow-up commit on this PR scrubs stale Ray references that the three
prior stage-3 PRs left behind and simplifies the levanter CI matrix. No
runtime behavior changes.
Comment/docstring updates (6):
1. `lib/levanter/src/levanter/infra/docker.py` — "(if set by ray runtime
env vars)" → "(set by the orchestrator, e.g. Iris/Fray)"
2. `lib/levanter/src/levanter/main/train_lm.py` — "(as happens w/ ray)"
→ "(as happens under Iris/Fray)"
3. `lib/levanter/src/levanter/main/eval_lm.py` — drop ray-specific
framing from the manual-`finish()` comment
4. `lib/levanter/src/levanter/data/sharded_datasource.py` —
`num_cpus`/`num_gpus` docstring no longer says "passed to ray" (params
remain — still wired through `_BatchMapTransform`); nearby comment about
HF dataset multiprocessing rephrased to drop Ray mention
5.
`lib/marin/src/marin/processing/classification/deduplication/connected_components.py`
— `zephyr/ray/pyarrow` → `zephyr/pyarrow`
6. `lib/marin/src/marin/training/training.py` — `run_levanter_train_lm`
docstring rewritten to describe Fray submission (was describing
`auto-ray-start`/`auto-worker-start` flags that no longer exist)
Function rename (1):
7. `lib/marin/src/marin/tokenize/slice_cache.py` — `_slice_cache_in_ray`
→ `_slice_cache_entrypoint` (only caller is the `ExecutorStep.fn=`
reference in the same module)
CI simplification (1):
8. `.github/workflows/levanter-tests.yaml` — drop the
`levanter-ray-tests` job and the `-m "not ray"` filter on the main + TPU
levanter jobs; remove the `ray` pytest marker registration in
`lib/levanter/pyproject.toml` and the two `@pytest.mark.ray` decorators.
Only one live ray-marked test remained
(`test_chat_dataset_build_and_pack`, ~9s, not slow — folded into the
main suite). The other (`test_hf_audio_ray_pipeline`) is
`@pytest.mark.skip` anyway. Also scrubs leftover `not ray` filters from
`lib/levanter/AGENTS.md` and `lib/levanter/scripts/launch_tpu_tests.sh`.
## Verification
- [x] `./infra/pre-commit.py --all-files --fix` → OK
- [x] `uv run --with pyrefly pyrefly check` → 150 errors / 152
suppressed (identical to `origin/main`, no regressions; the two
`fray/types.py` entries are already baselined at the new path)
- [x] `uv run --directory lib/fray --group fray_test pytest tests -x
--timeout=60` → 57 passed (matches post-3g count)
- [x] `uv lock --check` → clean
- [x] `test_chat_dataset_build_and_pack` passes standalone in ~9s
(confirming the CI fold-in is cheap)
- [x] No remaining `fray.v2` references outside `.agents/projects/`
(historical design docs; left untouched, matching stage 3f's handling)
## Scope
- 11 file renames + 76 content edits = 87 files total. 155 insertions /
155 deletions on content plus 73 deletions from the collapsed v2 shim.
- Cleanup commit: 13 files, +19/-51.
## Next steps
Per parent #4453:
- §2 (RAY_* secrets) + §3 (`marin_cluster*` digest cleanup) are parked
on the `marin-big-run` Ray cluster retirement
- Close #4453 when those two land
---------
Co-authored-by: Romain Yon <1596570+yonromai@users.noreply.github.com>
1 parent e828084 commit 196a605
94 files changed
Lines changed: 196 additions & 301 deletions
File tree
- .github/workflows
- docs
- references
- experiments
- dedup
- grug
- pretraining_datasets
- rollout_data
- swe_rebench_trace
- tokenize
- tutorials
- lib
- fray
- src/fray
- cluster
- v2
- tests
- iris/tests/e2e
- levanter
- scripts
- src/levanter
- callbacks
- data
- infra
- main
- store
- tests
- marin/src/marin
- datakit
- download
- evaluation
- execution
- export
- inference
- processing
- classification/deduplication
- tokenize
- rl
- tokenize
- training
- zephyr
- src/zephyr
- tests
- tests
- datakit
- execution
- integration/iris
- processing/classification/deduplication
- rl
- integration
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 61 | + | |
91 | 62 | | |
92 | 63 | | |
93 | 64 | | |
| |||
241 | 212 | | |
242 | 213 | | |
243 | 214 | | |
244 | | - | |
| 215 | + | |
245 | 216 | | |
246 | 217 | | |
247 | 218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
0 commit comments