Skip to content

Commit 37b7d1f

Browse files
committed
fray: delete legacy v1 package (#4453)
The legacy Ray-backed fray.v1 execution layer is orphaned: all in-repo consumers moved to fray.v2 in earlier stages (#5131, #5132), and stage 7 teardown on 2026-04-23 retired the remaining Ray head VMs and firewall rules so no live target remains. Deletes: - lib/fray/src/fray/v1/** (package + cluster/ray subtree) - lib/fray/tests/{conftest,test_cluster,test_queue,test_isolated_env,test_job_context,test_device_flops}.py - [project.scripts] fray = "fray.v1.cli:main" entrypoint - v1 entries in .pyrefly-baseline.json - v1 references in fray __init__ docstrings and AGENTS.md The ray optional dep stays for 3g; fray.v2.ray_backend still builds.
1 parent 03e0b6e commit 37b7d1f

35 files changed

Lines changed: 5 additions & 6938 deletions

.pyrefly-baseline.json

Lines changed: 1 addition & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,125 +1,5 @@
11
{
22
"errors": [
3-
{
4-
"line": 126,
5-
"column": 5,
6-
"stop_line": 126,
7-
"stop_column": 16,
8-
"path": "lib/fray/src/fray/v1/cluster/__init__.py",
9-
"code": -2,
10-
"name": "bad-dunder-all",
11-
"description": "Name `TPUConfig` is listed in `__all__` but is not defined in the module",
12-
"concise_description": "Name `TPUConfig` is listed in `__all__` but is not defined in the module",
13-
"severity": "error"
14-
},
15-
{
16-
"line": 435,
17-
"column": 9,
18-
"stop_line": 435,
19-
"stop_column": 22,
20-
"path": "lib/fray/src/fray/v1/cluster/base.py",
21-
"code": -2,
22-
"name": "invalid-annotation",
23-
"description": "`Self` cannot be used in a static method",
24-
"concise_description": "`Self` cannot be used in a static method",
25-
"severity": "error"
26-
},
27-
{
28-
"line": 443,
29-
"column": 9,
30-
"stop_line": 443,
31-
"stop_column": 20,
32-
"path": "lib/fray/src/fray/v1/cluster/base.py",
33-
"code": -2,
34-
"name": "invalid-annotation",
35-
"description": "`Self` cannot be used in a static method",
36-
"concise_description": "`Self` cannot be used in a static method",
37-
"severity": "error"
38-
},
39-
{
40-
"line": 482,
41-
"column": 9,
42-
"stop_line": 482,
43-
"stop_column": 17,
44-
"path": "lib/fray/src/fray/v1/cluster/base.py",
45-
"code": -2,
46-
"name": "invalid-annotation",
47-
"description": "`Self` cannot be used in a static method",
48-
"concise_description": "`Self` cannot be used in a static method",
49-
"severity": "error"
50-
},
51-
{
52-
"line": 30,
53-
"column": 5,
54-
"stop_line": 30,
55-
"stop_column": 18,
56-
"path": "lib/fray/src/fray/v1/cluster/ray/tpu/__init__.py",
57-
"code": -2,
58-
"name": "bad-dunder-all",
59-
"description": "Name `TPU_CONFIGS` is listed in `__all__` but is not defined in the module",
60-
"concise_description": "Name `TPU_CONFIGS` is listed in `__all__` but is not defined in the module",
61-
"severity": "error"
62-
},
63-
{
64-
"line": 36,
65-
"column": 5,
66-
"stop_line": 36,
67-
"stop_column": 16,
68-
"path": "lib/fray/src/fray/v1/cluster/ray/tpu/__init__.py",
69-
"code": -2,
70-
"name": "bad-dunder-all",
71-
"description": "Name `TPUConfig` is listed in `__all__` but is not defined in the module",
72-
"concise_description": "Name `TPUConfig` is listed in `__all__` but is not defined in the module",
73-
"severity": "error"
74-
},
75-
{
76-
"line": 45,
77-
"column": 5,
78-
"stop_line": 45,
79-
"stop_column": 21,
80-
"path": "lib/fray/src/fray/v1/cluster/ray/tpu/__init__.py",
81-
"code": -2,
82-
"name": "bad-dunder-all",
83-
"description": "Name `get_tpu_config` is listed in `__all__` but is not defined in the module",
84-
"concise_description": "Name `get_tpu_config` is listed in `__all__` but is not defined in the module",
85-
"severity": "error"
86-
},
87-
{
88-
"line": 358,
89-
"column": 37,
90-
"stop_line": 358,
91-
"stop_column": 38,
92-
"path": "lib/fray/src/fray/v1/job/context.py",
93-
"code": -2,
94-
"name": "unsupported-operation",
95-
"description": "Cannot set item in `dict[Future[Unknown], GeneratorFuture]`\n Argument `Future[Unknown]` is not assignable to parameter `value` with type `GeneratorFuture` in function `dict.__setitem__`",
96-
"concise_description": "Cannot set item in `dict[Future[Unknown], GeneratorFuture]`",
97-
"severity": "error"
98-
},
99-
{
100-
"line": 35,
101-
"column": 9,
102-
"stop_line": 35,
103-
"stop_column": 13,
104-
"path": "lib/fray/src/fray/v1/queue/base.py",
105-
"code": -2,
106-
"name": "invalid-variance",
107-
"description": "Type variable `T_co` is Covariant but is used in contravariant position",
108-
"concise_description": "Type variable `T_co` is Covariant but is used in contravariant position",
109-
"severity": "error"
110-
},
111-
{
112-
"line": 61,
113-
"column": 9,
114-
"stop_line": 61,
115-
"stop_column": 13,
116-
"path": "lib/fray/src/fray/v1/queue/base.py",
117-
"code": -2,
118-
"name": "invalid-variance",
119-
"description": "Type variable `T_co` is Covariant but is used in contravariant position",
120-
"concise_description": "Type variable `T_co` is Covariant but is used in contravariant position",
121-
"severity": "error"
122-
},
1233
{
1244
"line": 508,
1255
"column": 9,
@@ -2029,4 +1909,4 @@
20291909
"severity": "error"
20301910
}
20311911
]
2032-
}
1912+
}

lib/fray/AGENTS.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@ Distributed execution abstraction layer. Start with the shared instructions in `
1616
- `src/fray/v2/iris_backend.py` — Iris backend
1717
- `src/fray/v2/local_backend.py` — Local/thread backend (testing)
1818
- `src/fray/v2/device_flops.py` — TPU/GPU flops calculation
19-
- `src/fray/v1/` — Legacy API (Cluster, JobContext, Queue) — do not extend
20-
- `src/fray/cluster/` — Shared TPU orchestration (`run_on_pod`, gang scheduling)
19+
- `src/fray/cluster/` — v2 type re-exports (back-compat shim for `from fray.cluster import ResourceConfig`)
2120

2221
## Conventions
2322

24-
- **v2 is the production API.** All new code should use `fray.v2`. Do not add features to v1.
23+
- **v2 is the production API.** All new code should use `fray.v2`.
2524
- Always use the `Client` protocol, not concrete backend implementations.
2625
- Actor resources: set `num_cpus=0` on actors to avoid head-node resource contention.
2726
- Testing: use `LocalClient` for unit tests. Only use Ray/Iris backends for integration tests.
28-
- No backward compatibility shims between v1 and v2 — migrate callers directly.

lib/fray/pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ dependencies = [
2424
"zstandard>=0.22.0",
2525
]
2626

27-
[project.scripts]
28-
fray = "fray.v1.cli:main"
29-
3027
[project.optional-dependencies]
3128
ray = ["ray==2.54.0"]
3229

lib/fray/src/fray/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
# Copyright The Marin Authors
22
# SPDX-License-Identifier: Apache-2.0
33

4-
"""Fray: Execution contexts for distributed and parallel computing.
5-
6-
Top-level fray exports are v2 APIs. For legacy v1 APIs, use ``fray.v1``.
7-
"""
4+
"""Fray: Execution contexts for distributed and parallel computing."""
85

96
from fray.v2 import (
107
ActorContext,

lib/fray/src/fray/cluster/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
# Copyright The Marin Authors
22
# SPDX-License-Identifier: Apache-2.0
33

4-
"""fray.cluster now re-exports v2 types.
5-
6-
For v1 cluster APIs (Cluster, current_cluster, create_cluster, etc.),
7-
use ``fray.v1.cluster`` instead.
8-
"""
4+
"""fray.cluster re-exports v2 types."""
95

106
from fray.v2.types import (
117
CpuConfig,

lib/fray/src/fray/v1/__init__.py

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)