marin-community/marin#1773 "Workspace" monorepo plan
(Versioned write-up here, synced via ghpr)
- ✅ #1690 (step 1): Init workspace, move
marintolib/marin/ - ✅ #1723 (step 2): Ingest Levanter as
lib/levanter/
flowchart LR
experiments[experiments]
marin[lib/marin]
levanter[lib/levanter]
data_browser
experiments --> marin
experiments --> levanter
marin --> levanter
(data_browser stays independent, not a workspace member)
Marin and Levanter repos contain components that depend on one another in ways that the current repo split doesn't reflect well, and makes awkward for co-development.
Proposed solution: uv workspaces
"Workspaces" provide a way to colocate distinct libraries in one repo, such that they can be published and depended on independently (by external users), but naturally depend on each others' HEAD commits (and can easily be updated in lockstep, during common internal / co-development cases).
Below is a rough sequence of steps to get there, with the goal of minimizing disruption along the way.
Workspace migration scripts provide hermetic replay of the steps below on top of arbitrary Marin/Levanter main commits, which helps avoid conflicts while developing, and is more legible for review than the huge PR patches it generates.
Step 1: init workspace, marin member (#1690)
marin/
pyproject.toml # Workspace root (experiments/ become workspace root member)
experiments/ # Becomes part of workspace root member
- src/ # Move to lib/marin/
+ lib/
+ marin/
+ pyproject.toml
+ src/Note: data_browser stays independent (separate deps/venv, excluded from workspace).
marin/
pyproject.toml
experiments/
lib/
marin/
pyproject.toml
src/
+ levanter/
+ pyproject.toml
+ src/Additional notes:
- This will require namespacing GHA
.ymls withlevanter-andmarin-prefixes, to distinguish them. - We'll also want to path-restrict GHAs to only run on relevant changes.
Thalas was an attempt at factoring Marin's executor code out as a separate library (and repo).
The new plan is to make it a workspace member in the new workspace repo, instead:
marin/
pyproject.toml
experiments/
lib/
marin/
pyproject.toml
src/
levanter/
pyproject.toml
src/
+ thalas/
+ pyproject.toml
+ src/Step 4: Haliax member
marin/
pyproject.toml
experiments/
lib/
marin/
pyproject.toml
src/
+ haliax/
+ pyproject.toml
+ src/
levanter/
pyproject.toml
src/
thalas/
pyproject.toml
src/ marin/
pyproject.toml
experiments/
+ hero_runs/
+ pyproject.toml
+ expXXX_tootsie8b.py
+ compel/
+ pyproject.toml
+ expXXX_compel_v0.py
lib/
- marin/
- pyproject.toml
- src/
+ marin-core/
+ pyproject.toml
+ src/
haliax/
pyproject.toml
src/
levanter/
pyproject.toml
src/
+ marin-crawl/
+ pyproject.toml
+ src/
+ ray_tpu/
+ pyproject.toml
+ src/
+ rl/
+ pyproject.toml
+ src/
thalas/
pyproject.toml
src/
