Skip to content

Commit 7e58438

Browse files
Merge pull request #320 from MLSysOps/exp-cli-clean
[MRG] 🍱 [deps] Clean CLI for exp command
2 parents 65a2cad + 27919e5 commit 7e58438

File tree

5 files changed

+552
-1373
lines changed

5 files changed

+552
-1373
lines changed

exp/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ GIT_LFS_SKIP_SMUDGE=1 pip install -e .[bench]
1212

1313
Then run the following command to set up the MLE-Bench:
1414
```shell
15-
mle-exp init
15+
mle bench init
1616
```
1717

1818
## Benchmarking (Lite)
@@ -26,11 +26,11 @@ The dataset will be downloaded to the system default cache directory.
2626
Prepare the lite dataset ([15 smaller datasets](https://github.com/openai/mle-bench?tab=readme-ov-file#lite-evaluation)):
2727
```shell
2828
# Prepare lite dataset (smaller version of the dataset)
29-
mle-exp prepare --lite
29+
mle bench prepare --lite
3030
```
3131
Alternatively, you can prepare the dataset for a specific competition:
3232
```shell
33-
mle-exp prepare -c <competition-id>
33+
mle bench prepare -c <competition-id>
3434
```
3535
### Run MLE Agent (WIP)
3636
```shell
@@ -39,7 +39,7 @@ mle kaggle <competition-id>
3939

4040
### Grade submission
4141
```shell
42-
mle-exp grade-sample <PATH_TO_SUBMISSION> <competition-id>
42+
mle bench grade-sample <PATH_TO_SUBMISSION> <competition-id>
4343
```
4444

4545
## Advance (Run MLE-Agent on the Full Dataset)
@@ -48,7 +48,7 @@ mle-exp grade-sample <PATH_TO_SUBMISSION> <competition-id>
4848

4949
### Prepare full 75 datasets
5050
```shell
51-
mle-exp prepare --all
51+
mle bench prepare --all
5252
```
5353
### Run MLE Agent (WIP)
5454
```shell
@@ -57,5 +57,5 @@ mle kaggle <competition-id>
5757

5858
### Grade submission
5959
```shell
60-
mle-exp grade-sample <PATH_TO_SUBMISSION> <competition-id>
60+
mle bench grade-sample <PATH_TO_SUBMISSION> <competition-id>
6161
```

exp/cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ def wrapper(ctx, *args, **kwargs):
6060
)
6161
@click.pass_context
6262
@click.version_option(version=mle.__version__)
63-
def cli(ctx: click.Context):
63+
def bench(ctx: click.Context):
6464
"""
6565
MLE-Exp: The Experimental CLI tool for MLE-agent.
6666
"""
6767
ctx.obj = {"registry": registry}
6868

6969

70-
@cli.command(
70+
@bench.command(
7171
name="init",
7272
short_help="Initialize MLE-bench",
7373
)
@@ -86,7 +86,7 @@ def init(force: bool):
8686
sys.exit(init_api(force))
8787

8888

89-
@cli.command("prepare", help="Download and prepare one or more competitions.")
89+
@bench.command("prepare", help="Download and prepare one or more competitions.")
9090
@click.option(
9191
"-c",
9292
"--competition-id",
@@ -182,7 +182,7 @@ def _read_text_utf8(self, *args, **kwargs): # type: ignore[override]
182182
sys.exit(1)
183183

184184

185-
@cli.command(
185+
@bench.command(
186186
"grade",
187187
help="Grade a submission covering *all* eval competitions (JSONL format).",
188188
)
@@ -256,7 +256,7 @@ def grade(
256256
sys.exit(1)
257257

258258

259-
@cli.command(
259+
@bench.command(
260260
"grade-sample",
261261
help="Grade a *single* competition CSV submission inside the eval.",
262262
)

mle/cli.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,3 +553,12 @@ def traces(component, limit, full_output):
553553
console.print("[yellow]Tip: Use --full-output flag to see complete trace data[/yellow]")
554554

555555
memory.close()
556+
557+
558+
# Experimental commands
559+
try:
560+
from exp.cli import bench
561+
562+
cli.add_command(bench, name='bench')
563+
except ImportError:
564+
exp = None

pyproject.toml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "mle-agent"
77
version = "0.4.3"
88
description = "MLE-agent: An agent to automate your MLE processes"
99
readme = "README.md"
10-
requires-python = ">=3.8.1"
10+
requires-python = ">=3.9"
1111
license = {text = "Apache-2.0"}
1212
authors = [
1313
{ name = "Yizheng Huang", email = "huangyz0918@gmail.com" },
@@ -28,8 +28,7 @@ dependencies = [
2828
"rich>=13.6.0",
2929
"click>=7.1.1",
3030
"tantivy==0.24.0",
31-
"py7zr~=1.0 ; python_version >= '3.9'",
32-
"py7zr<0.20 ; python_version < '3.9'",
31+
"py7zr~=1.0",
3332
"openai~=1.70.0",
3433
"pyyaml~=6.0",
3534
"kaggle>=1.5.12",
@@ -38,16 +37,14 @@ dependencies = [
3837
"requests~=2.32.3",
3938
"GitPython~=3.1",
4039
"questionary~=1.10.0",
41-
"pandas>=2.2.2 ; python_version >= '3.9'",
42-
"pandas==2.0.3 ; python_version < '3.9'",
40+
"pandas>=2.2.2",
4341
"tavily-python~=0.6.0",
4442
"langfuse~=2.36.2",
4543
"google-api-python-client~=2.143.0",
4644
"google-auth-httplib2~=0.2.0",
4745
"google-auth-oauthlib~=1.2.1",
4846
"google-genai~=1.25.0",
49-
"lancedb==0.15.0 ; python_version >= '3.9'",
50-
"lancedb==0.6.13 ; python_version < '3.9'",
47+
"lancedb==0.15.0",
5148
"tree-sitter>=0.21.3",
5249
"mem0ai~=0.1.114",
5350
"pip>=23.3.1",
@@ -66,7 +63,6 @@ Download = "https://github.com/MLSysOps/MLE-agent/archive/refs/heads/main.zip"
6663
[project.scripts]
6764
mle-agent = "mle.cli:cli"
6865
mle = "mle.cli:cli"
69-
mle-exp = "exp.cli:cli"
7066

7167
[tool.setuptools.packages.find]
7268
include = ["mle*", "exp*"]

0 commit comments

Comments
 (0)