Skip to content

Commit 76ebe03

Browse files
committed
Update to use uv instead of poetry.
1 parent b4ba736 commit 76ebe03

12 files changed

Lines changed: 6405 additions & 9230 deletions

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "pip" # Confusingly, pip is correct for poetry
3+
- package-ecosystem: "pip" # Dependabot uses pip for uv-managed pyproject files
44
directory: "/" # Location of package manifests
55
schedule:
66
interval: "monthly"

.github/workflows/tests.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,19 @@ jobs:
3131
run: |
3232
./start_services.sh --no-jupyter -d
3333
34-
- name: Install poetry
35-
run: pipx install poetry
34+
- name: Install uv
35+
run: pipx install uv
3636

3737
- name: Verify MLflow versions match
3838
run: ./scripts/check_mlflow_versions.sh
3939

40-
- name: Check poetry lock file
41-
run: poetry check --lock
42-
43-
- name: Remove existing virtual environment
44-
run: |
45-
poetry env remove python || true
46-
4740
- name: Install dependencies
4841
run: |
49-
poetry cache clear --no-interaction --all .
50-
poetry install --with test --no-cache
42+
uv lock --check
43+
uv sync --group test
5144
5245
- name: Run all tests
53-
run: MLFLOW_TRACKING_URI=http://localhost:8080 poetry run pytest
46+
run: MLFLOW_TRACKING_URI=http://localhost:8080 uv run pytest
5447

5548
- name: Stop MLflow server
5649
run: docker compose down
@@ -79,7 +72,7 @@ jobs:
7972
8073
- name: Execute all notebooks
8174
run: |
82-
docker exec modelplane-jupyter-1 poetry run python /app/test_notebooks.py
75+
docker exec modelplane-jupyter-1 uv run python /app/test_notebooks.py
8376
8477
- name: Stop MLflow server
8578
run: docker compose down

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ secrets.toml
1111
*.txt
1212
*.json
1313
*.jsonl
14+
modelplane.egg-info/

Dockerfile.jupyter

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,21 @@ ENV PATH="/root/.local/bin:$PATH"
44
# Used for the notebook server
55
WORKDIR /app
66

7-
# pipx needed for poetry installation
7+
# pipx needed for uv installation script
88
# ssh client needed for installing private modelbench dependencies
99
# git needed dvc
1010
RUN apt-get update && apt-get install -y pipx openssh-client git && \
11-
pipx install poetry
12-
COPY pyproject.toml poetry.lock README.md ./
11+
pipx install uv
12+
COPY pyproject.toml uv.lock README.md ./
1313

1414
RUN mkdir -p /root/.ssh && chmod 700 /root/.ssh
1515
RUN git config --global core.sshCommand "ssh -o UserKnownHostsFile=/root/.ssh/known_hosts -o ForwardAgent=yes"
1616
RUN ssh-keyscan github.com > /root/.ssh/known_hosts
1717

18-
RUN poetry install --no-interaction --no-ansi --no-root
18+
RUN uv sync --frozen --no-install-project
1919

2020
COPY src/ ./src/
21-
RUN echo $(poetry env info --path)
22-
RUN poetry install --no-interaction --no-ansi
21+
RUN uv sync --frozen
2322

2423
EXPOSE 8888
25-
CMD ["poetry", "run", "jupyter", "notebook", "--ip", "0.0.0.0", "--allow-root", "--no-browser", "--ServerApp.root_dir=/app/flightpaths"]
24+
CMD ["uv", "run", "jupyter", "notebook", "--ip", "0.0.0.0", "--allow-root", "--no-browser", "--ServerApp.root_dir=/app/flightpaths"]

Dockerfile.mockvllm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ WORKDIR /app
44

55
COPY tests/notebooks/mock_vllm_server.py .
66

7-
# versions chosen to match whats in poetry.lock as of 2025-07-09
8-
RUN pip install fastapi==0.115.12 uvicorn==0.34.3
7+
# versions chosen to match whats in uv.lock as of 2026-02-18
8+
RUN pip install fastapi==0.129.0 uvicorn==0.41.0
99

1010
EXPOSE ${VLLM_PORT}
1111

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,31 +79,31 @@ Annotator and SUT responses will be cached (locally) unless you pass the
7979

8080
## CLI
8181

82-
You can also interact with modelplane via CLI. Run `poetry run modelplane --help`
82+
You can also interact with modelplane via CLI. Run `uv run modelplane --help`
8383
for more details.
8484

8585
*Important:* You must set the `MLFLOW_TRACKING_URI` environmental variable.
8686
For example, if you've brought up MLFlow using the fully local docker compose process above,
8787
you could run:
8888
```
89-
MLFLOW_TRACKING_URI=http://localhost:8080 poetry run modelplane get-sut-responses --sut_id {sut_id} --prompts tests/data/prompts.csv --experiment expname
89+
MLFLOW_TRACKING_URI=http://localhost:8080 uv run modelplane get-sut-responses --sut_id {sut_id} --prompts tests/data/prompts.csv --experiment expname
9090
```
9191
After running the command, you'd see the `run_id` in the output from mlflow,
9292
or you can get the `run_id` via the MLFlow UI.
9393

9494
### Basic Annotations
9595
```
96-
MLFLOW_TRACKING_URI=http://localhost:8080 poetry run modelplane annotate --annotator_id {annotator_id} --experiment expname --response_run_id {run_id}
96+
MLFLOW_TRACKING_URI=http://localhost:8080 uv run modelplane annotate --annotator_id {annotator_id} --experiment expname --response_run_id {run_id}
9797
```
9898

9999
#### Private Ensemble
100100
If you have access to the private annotator, you can run directly with:
101101
```
102-
MLFLOW_TRACKING_URI=http://localhost:8080 poetry run modelplane annotate --annotator_id safety-v1.1 --experiment expname --response_run_id {run_id}
102+
MLFLOW_TRACKING_URI=http://localhost:8080 uv run modelplane annotate --annotator_id safety-v1.1 --experiment expname --response_run_id {run_id}
103103
```
104104

105105

106106
### Custom Ensembles
107107
```
108-
MLFLOW_TRACKING_URI=http://localhost:8080 poetry run modelplane annotate --annotator_id {annotator_id1} --annotator_id {annotator_id2} --ensemble_strategy {ensemble_strategy} --experiment expname --response_file path/to/response.csv
108+
MLFLOW_TRACKING_URI=http://localhost:8080 uv run modelplane annotate --annotator_id {annotator_id1} --annotator_id {annotator_id2} --ensemble_strategy {ensemble_strategy} --experiment expname --response_file path/to/response.csv
109109
```

0 commit comments

Comments
 (0)