Skip to content

Commit d1c21ed

Browse files
authored
add LeanDojo test and bump external_api toolchain
Add LeanDojo test and bump external_api toolchain
2 parents be13e47 + 5e5f4be commit d1c21ed

File tree

11 files changed

+65
-324
lines changed

11 files changed

+65
-324
lines changed

.github/workflows/pytest.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Pytest
2+
3+
on:
4+
push:
5+
branches: ["*"]
6+
pull_request:
7+
branches: ["*"]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.11"]
15+
name: run pytest (Python ${{ matrix.python-version }})
16+
steps:
17+
- name: Checkout project
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v4
24+
with:
25+
version: "latest"
26+
27+
- name: Set up Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
32+
- name: Create virtual environment
33+
run: |
34+
uv venv
35+
36+
- name: Set up elan
37+
run: |
38+
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y
39+
echo "$HOME/.elan/bin" >> $GITHUB_PATH
40+
41+
- name: Install Pantograph
42+
run: |
43+
uv pip install git+https://github.com/stanford-centaur/PyPantograph
44+
45+
- name: Install project with dev dependencies
46+
run: |
47+
uv pip install -e ".[dev]"
48+
49+
- name: Run pytest
50+
env:
51+
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_ACCESS_TOKEN }}
52+
run: |
53+
source .venv/bin/activate
54+
pytest -vvv
55+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
leanprover/lean4:v4.21.0-rc3
1+
leanprover/lean4:v4.24.0
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
# from .claude_runner import ClaudeRunner
2-
# from .gemini_runner import GeminiRunner
31
from .hf_runner import HFTacticGenerator
4-
5-
# from .oai_runner import OpenAIRunner
6-
# from .vllm_runner import VLLMTacticGenerator

lean_dojo_v2/external_api/python/external_models/claude_runner.py

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

lean_dojo_v2/external_api/python/external_models/gemini_runner.py

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

lean_dojo_v2/external_api/python/external_models/oai_runner.py

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

lean_dojo_v2/external_api/python/external_models/vllm_runner.py

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

lean_dojo_v2/external_api/python/server.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,14 @@
44
import torch
55
from external_models import *
66
from fastapi import FastAPI, HTTPException
7-
from loguru import logger
87
from models import *
98
from pydantic import BaseModel
109

1110
app = FastAPI()
1211

1312
models = {
14-
"kimina": VLLMTacticGenerator(
15-
model="AI-MO/Kimina-Prover-Preview-Distill-7B",
16-
tensor_parallel_size=1,
17-
temperature=0.6,
18-
max_tokens=1024,
19-
top_p=0.9,
20-
length_penalty=0,
21-
n=4,
22-
do_sample=True,
23-
output_scores=True,
24-
output_logits=False,
25-
return_dict_in_generate=True,
26-
device="auto",
27-
),
2813
"deepseek": HFTacticGenerator(
29-
model="deepseek-ai/DeepSeek-Prover-V2-7B",
14+
model="deepseek-ai/DeepSeek-Prover-V2-671B:novita",
3015
temperature=0.6,
3116
max_new_tokens=256,
3217
top_p=0.9,

0 commit comments

Comments
 (0)