Skip to content

Commit 8438998

Browse files
groksrcclaude
andcommitted
fix: replace hardcoded bm_local_path with env var in justfile
The justfile had a user-specific path hardcoded for bm_local_path. Now reads from BM_LOCAL_PATH env var (or .env via dotenv-load), defaulting to empty which omits --bm-local-path entirely. Also updates docs and README to use generic placeholder paths. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2d87efa commit 8438998

3 files changed

Lines changed: 19 additions & 18 deletions

File tree

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}}"

0 commit comments

Comments
 (0)