How to Update Marin to the Latest Version: A Step-by-Step Guide for the Monorepo
To update Marin to the latest version, pull the newest commits from the repository root and run uv sync to refresh all inter-dependent workspace dependencies.
Marin is an open-source monorepo maintained by marin-community that houses multiple interconnected workspaces including marin-iris, marin-levanter, and marin-zephyr. When you need to update Marin to the latest version, you must synchronize both the source code and the Python environment defined in pyproject.toml to maintain compatibility across all sub-packages.
Prerequisites for Updating Marin
Before executing the update, ensure your environment meets these requirements:
- Git access to the
marin-community/marinrepository - The
uvpackage manager installed (the preferred installer for this monorepo) - Current working directory set to the repository root
The Standard Update Workflow
Updating Marin follows a two-phase process: synchronizing the source code and refreshing the workspace environment.
Pull the Latest Commits
First, retrieve the newest code including experiment scripts, library updates, and bug fixes:
git pull origin main
This command updates your local branch with changes from the remote main branch.
Synchronize Dependencies with uv
Run uv sync from the repository root to reinstall all packages declared in pyproject.toml and the workspace members:
uv sync
This ensures you receive the newest versions of marin-iris, marin-levanter, marin-zephyr, and other inter-dependent components simultaneously.
Verify the Update
Confirm the runtime reflects the latest code by inspecting the version attributes:
python -c "import marin, levanter; print(marin.__version__, levanter.__version__)"
If the output shows recent version numbers, the synchronization succeeded.
Alternative Update Methods
Depending on your specific workflow, you might need these alternative approaches.
Using pip for Editable Install
If you prefer pip over uv, reinstall the repository in editable mode to guarantee imports resolve to freshly-checked-out sources:
pip install -e .
This prevents Python from loading stale wheel installations cached in your environment.
Updating a Single Workspace
To update only one component rather than the entire monorepo (for example, just the levanter library):
uv sync -p lib/levanter
This command rebuilds only the specified workspace while maintaining compatibility with the core system.
Post-Update Validation
After updating Marin to the latest version, validate the installation to catch regressions before starting new experiments.
Run the Test Suite
Execute the centralized test runner implemented in infra/ci/run_tests.py:
uv run --no-project infra/ci/run_tests.py
This validates the integrity of the entire workspace. If any tests fail, you can roll back with git checkout <old-sha> or file an issue against the repository.
Updating Containerized Deployments
For users running Marin via Docker or Kubernetes, the update process differs slightly. Simply rebuild or re-pull the container image after pulling the latest code. The Dockerfile in marin-community/marin already installs the workspace in editable mode, so the standard image build process incorporates all updated source files automatically.
Summary
- Execute
git pull origin mainfollowed byuv syncto update Marin to the latest version efficiently - The
pyproject.tomlfile defines workspace members thatuv syncmanages automatically - Verify successful updates by checking package versions and running the test suite via
infra/ci/run_tests.py - For targeted updates, use
uv sync -p <workspace-path>to rebuild individual components - Containerized environments require image rebuilds rather than direct
uv syncexecution
Frequently Asked Questions
What is the fastest way to update Marin to the latest version?
The fastest method is running git pull origin main immediately followed by uv sync from the repository root. According to the marin-community/marin source code, this combination updates both the source code and all inter-dependent workspace packages in seconds without manual dependency resolution.
How do I update only one Marin workspace instead of the entire monorepo?
Use the workspace-specific flag: uv sync -p lib/levanter (replace levanter with your target workspace). This rebuilds only that specific component while maintaining compatibility with the core marin system, saving time when you only need updates from a single library.
Why does Marin use uv instead of pip for updates?
The marin-community/marin repository uses uv because it handles the complex monorepo structure more efficiently than pip. As defined in pyproject.toml, uv synchronizes all workspace members automatically, ensuring that marin-iris, marin-levanter, and marin-zephyr remain version-compatible without manual intervention.
How can I verify that Marin updated correctly?
Run python -c "import marin, levanter; print(marin.__version__)" to check runtime versions, then execute uv run --no-project infra/ci/run_tests.py to validate functionality against the test suite. If both commands succeed without errors, your update to the latest version is complete and stable.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →