Skip to content

Commit 77c0b65

Browse files
authored
Merge pull request #11 from basicmachines-co/fix/remove-hardcoded-bm-local-path
fix: replace hardcoded bm_local_path with env var
2 parents 2d87efa + 923275b commit 77c0b65

7 files changed

Lines changed: 37 additions & 22 deletions

File tree

.github/workflows/benchmark-nightly.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313

1414
- uses: astral-sh/setup-uv@v4
1515

16+
- uses: extractions/setup-just@v2
17+
1618
- name: Install dependencies
1719
run: uv sync --group dev --extra judge
1820

.github/workflows/benchmark-smoke.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212

1313
- uses: astral-sh/setup-uv@v4
1414

15+
- uses: extractions/setup-just@v2
16+
1517
- name: Install dependencies
1618
run: uv sync --group dev
1719

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Local override:
8080

8181
```bash
8282
uv run bm-bench run retrieval \
83-
--bm-local-path /Users/phernandez/dev/basicmachines/basic-memory
83+
--bm-local-path /path/to/basic-memory
8484
```
8585

8686
## Mem0 local requirements

docs/benchmarks.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ It covers:
4242

4343
### Repositories and paths
4444

45-
- benchmark repo: `/Users/phernandez/dev/basicmachines/basic-memory-benchmarks`
46-
- BM local repo (default in `justfile`): `/Users/phernandez/dev/basicmachines/basic-memory`
45+
- benchmark repo: clone of `basicmachines-co/basic-memory-benchmarks`
46+
- BM local repo: set `BM_LOCAL_PATH` env var (or in `.env`) to your local `basic-memory` checkout
4747

4848
### Environment
4949

@@ -53,7 +53,7 @@ It covers:
5353
### One-time setup
5454

5555
```bash
56-
cd /Users/phernandez/dev/basicmachines/basic-memory-benchmarks
56+
cd /path/to/basic-memory-benchmarks
5757
just sync
5858
```
5959

@@ -107,7 +107,7 @@ Top-level commands:
107107
### One-command full retrieval run
108108

109109
```bash
110-
cd /Users/phernandez/dev/basicmachines/basic-memory-benchmarks
110+
cd /path/to/basic-memory-benchmarks
111111
just bench-full
112112
```
113113

@@ -119,7 +119,7 @@ This runs:
119119
### One-command full retrieval + judge
120120

121121
```bash
122-
cd /Users/phernandez/dev/basicmachines/basic-memory-benchmarks
122+
cd /path/to/basic-memory-benchmarks
123123
just bench-full-judge
124124
```
125125

@@ -235,8 +235,8 @@ Use this workflow today to compare BM revisions while keeping benchmark tooling
235235
### Step 1: Create BM worktrees for target refs
236236

237237
```bash
238-
BM_REPO=/Users/phernandez/dev/basicmachines/basic-memory
239-
WT_ROOT=/Users/phernandez/dev/basicmachines/basic-memory-benchmarks/benchmarks/worktrees/basic-memory
238+
BM_REPO=/path/to/basic-memory
239+
WT_ROOT=/path/to/basic-memory-benchmarks/benchmarks/worktrees/basic-memory
240240

241241
mkdir -p "$WT_ROOT"
242242

@@ -250,7 +250,7 @@ git -C "$BM_REPO" worktree add "$WT_ROOT/current" HEAD
250250
### Step 2: Prepare benchmark datasets once
251251

252252
```bash
253-
cd /Users/phernandez/dev/basicmachines/basic-memory-benchmarks
253+
cd /path/to/basic-memory-benchmarks
254254
just sync
255255
just bench-prepare-short
256256
just bench-prepare-long
@@ -377,7 +377,7 @@ Planned command shape:
377377

378378
```bash
379379
uv run bm-bench run revision-matrix \
380-
--bm-repo-path /Users/phernandez/dev/basicmachines/basic-memory \
380+
--bm-repo-path /path/to/basic-memory \
381381
--revisions pre_fusion=f5a0e942^ \
382382
--revisions fusion=f5a0e942 \
383383
--revisions context_step1=f9b2a075 \

justfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ set dotenv-load := true
44

55
# --- Paths and defaults ---
66

7-
bm_local_path := "/Users/phernandez/dev/basicmachines/basic-memory"
7+
bm_local_path := env_var_or_default("BM_LOCAL_PATH", "")
8+
bm_local_path_flag := if bm_local_path != "" { "--bm-local-path " + bm_local_path } else { "" }
89
locomo_dataset_path := "benchmarks/datasets/locomo/locomo10.json"
910
locomo_output_dir := "benchmarks/generated/locomo"
1011
locomo_c1_output_dir := "benchmarks/generated/locomo-c1"
@@ -84,7 +85,7 @@ bench-run-short:
8485
--corpus-dir benchmarks/generated/locomo-c1/docs \
8586
--queries-path benchmarks/generated/locomo-c1/queries.quick25.json \
8687
--providers bm-local,mem0-local \
87-
--bm-local-path {{bm_local_path}} \
88+
{{bm_local_path_flag}} \
8889
--allow-provider-skip
8990

9091
bench-run-short-strict:
@@ -94,7 +95,7 @@ bench-run-short-strict:
9495
--corpus-dir benchmarks/generated/locomo-c1/docs \
9596
--queries-path benchmarks/generated/locomo-c1/queries.quick25.json \
9697
--providers bm-local,mem0-local \
97-
--bm-local-path {{bm_local_path}} \
98+
{{bm_local_path_flag}} \
9899
--strict-providers
99100

100101
# Long benchmark: full LoCoMo query set
@@ -105,7 +106,7 @@ bench-run-long:
105106
--corpus-dir benchmarks/generated/locomo/docs \
106107
--queries-path benchmarks/generated/locomo/queries.json \
107108
--providers bm-local,mem0-local \
108-
--bm-local-path {{bm_local_path}} \
109+
{{bm_local_path_flag}} \
109110
--allow-provider-skip
110111

111112
bench-run-long-strict:
@@ -115,7 +116,7 @@ bench-run-long-strict:
115116
--corpus-dir benchmarks/generated/locomo/docs \
116117
--queries-path benchmarks/generated/locomo/queries.json \
117118
--providers bm-local,mem0-local \
118-
--bm-local-path {{bm_local_path}} \
119+
{{bm_local_path_flag}} \
119120
--strict-providers
120121

121122
bench-run-bm-local:
@@ -125,7 +126,7 @@ bench-run-bm-local:
125126
--dataset-path {{locomo_dataset_path}} \
126127
--corpus-dir benchmarks/generated/locomo/docs \
127128
--queries-path benchmarks/generated/locomo/queries.json \
128-
--bm-local-path {{bm_local_path}}
129+
{{bm_local_path_flag}}
129130

130131
bench-run-mem0-local:
131132
uv run bm-bench run retrieval \
@@ -143,7 +144,7 @@ bench-run-full:
143144
--corpus-dir benchmarks/generated/locomo/docs \
144145
--queries-path benchmarks/generated/locomo/queries.json \
145146
--providers bm-local,mem0-local \
146-
--bm-local-path {{bm_local_path}} \
147+
{{bm_local_path_flag}} \
147148
--allow-provider-skip
148149

149150
bench-run-full-judge model="gpt-4o-mini":
@@ -153,7 +154,7 @@ bench-run-full-judge model="gpt-4o-mini":
153154
--corpus-dir benchmarks/generated/locomo/docs \
154155
--queries-path benchmarks/generated/locomo/queries.json \
155156
--providers bm-local,mem0-local \
156-
--bm-local-path {{bm_local_path}} \
157+
{{bm_local_path_flag}} \
157158
--allow-provider-skip \
158159
--judge \
159160
--judge-model "{{model}}"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ authors = [
88
]
99
requires-python = ">=3.12"
1010
dependencies = [
11-
"basic-memory @ git+https://github.com/basicmachines-co/basic-memory@main",
11+
"basic-memory>=0.20.2",
1212
"httpx>=0.28.0",
1313
"mcp>=1.23.1",
1414
"mem0ai==1.0.0",

uv.lock

Lines changed: 13 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)