runledger-cli 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,198 @@
1
+ Metadata-Version: 2.4
2
+ Name: runledger-cli
3
+ Version: 0.1.0
4
+ Summary: Zero‑instrumentation experiment registry CLI
5
+ Requires-Python: >=3.10
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: requests
8
+ Requires-Dist: rich
9
+
10
+ # RunLedger
11
+
12
+ **Zero-instrumentation experiment registry and search engine.**
13
+ Point to a folder of JSON experiment files and instantly search, filter, aggregate, diff, and export your results—no SDK, no code changes.
14
+
15
+ ## Quick Start
16
+
17
+ ```bash
18
+ # 1. Start the backend
19
+ docker compose up -d
20
+
21
+ # 2. Ingest your experiment files
22
+ runledger scan ~/experiments --batch my-sweep
23
+
24
+ # 3. Search
25
+ runledger search --metric accuracy --op gt --value 0.9 --batch my-sweep
26
+
27
+ # 4. Aggregate
28
+ runledger aggregate --metric accuracy --agg AVG --group-by experiment --batch my-sweep
29
+ ```
30
+
31
+ New to the tool? Try the guided wizard:
32
+
33
+ ```bash
34
+ runledger guided
35
+ ```
36
+
37
+ ## Key Features
38
+
39
+ ### 🔍 Search any JSON field, no schema required
40
+ - Structured numeric/text comparisons on arbitrary dot-paths (`metrics.accuracy`, `config.optimizer.learning_rate`).
41
+ - Full-text phrase search with stemming.
42
+ - Fuzzy trigram search for typos.
43
+ - Compound AND/OR queries: combine multiple conditions.
44
+ - Batch isolation: group runs by folder and filter within a batch.
45
+
46
+ ### 📊 Aggregates & group-by
47
+ Answer research questions directly:
48
+
49
+ ```bash
50
+ runledger aggregate --metric accuracy --agg AVG --group-by experiment --batch sweep
51
+ ```
52
+
53
+ Supported functions: `AVG`, `MAX`, `MIN`, `SUM`, `COUNT`. Group by any scalar field.
54
+
55
+ ### 🎯 Exact match pointers (“JSON line numbers”)
56
+ For array searches (`results[].sst2_cacc < 0.8`), the CLI shows exactly which array elements matched:
57
+
58
+ ```text
59
+ Matches:
60
+ • results[0].sst2_cacc = 0.924312
61
+ • results[3].sst2_cacc = 0.933486
62
+ ```
63
+
64
+ Works for scalar, array, and compound conditions.
65
+
66
+ ### 🔬 Block-depth control
67
+ Limit output to the relevant part of a large JSON payload with `--block 0` (tightest match), `--block 1` (parent), etc.
68
+
69
+ ### 📁 JSONL ingestion
70
+ Ingest one-JSON-object-per-line logs (common in training scripts) with `--jsonl`.
71
+
72
+ ### 🔎 Run diff
73
+ Compare any two runs side-by-side:
74
+
75
+ ```bash
76
+ runledger diff 12 15
77
+ ```
78
+
79
+ Or see every version of a re-scanned run with `--history`.
80
+
81
+ ### 💾 Saved searches
82
+ Save frequent queries and re-run them with a single command:
83
+
84
+ ```bash
85
+ runledger search --metric accuracy --op gt --value 0.9 --batch sweep --save best-accuracy
86
+ runledger search --saved best-accuracy
87
+ ```
88
+
89
+ ### 🧭 Interactive & guided modes
90
+ - Filter-as-you-type interactive search (`runledger interactive`).
91
+ - Step-by-step wizard for first-time users (`runledger guided`).
92
+
93
+ ### 🔒 Self-hosted, local-first
94
+ Runs in Docker with a single `docker compose up -d`.
95
+ All data stays on your machine. No internet, no accounts, no vendor lock-in.
96
+
97
+ ## Installation
98
+
99
+ ### From PyPI (CLI only)
100
+
101
+ ```bash
102
+ pip install runledger-cli
103
+ ```
104
+
105
+ ### From source
106
+
107
+ ```bash
108
+ git clone https://github.com/yourusername/run-ledger.git
109
+ cd run-ledger
110
+ docker compose up -d # starts PostgreSQL + Spring Boot
111
+ pip install -e . # installs the CLI
112
+ ```
113
+
114
+ ## Quick Tour
115
+
116
+ ### Scan & Discover
117
+
118
+ ```bash
119
+ runledger scan experiments/ --batch my-sweep
120
+ ```
121
+
122
+ The CLI prints a schema summary showing every metric found, its full dot-path, and depth. Array keys are shown with `[]` notation (e.g., `results[].cacc`).
123
+
124
+ ### Search
125
+
126
+ ```bash
127
+ # Single condition
128
+ runledger search --metric loss --op lt --value 0.2 --batch my-sweep --summary
129
+
130
+ # Compound AND
131
+ runledger search --metric accuracy --op gt --value 0.9 --metric loss --op lt --value 0.2 --combine and
132
+
133
+ # Full-text
134
+ runledger search --q "weighted averaging"
135
+
136
+ # Fuzzy
137
+ runledger search --q "weighted avaraging" --fuzzy
138
+ ```
139
+
140
+ ### Aggregate
141
+
142
+ ```bash
143
+ runledger aggregate --metric accuracy --agg AVG --group-by config.learning_rate --batch my-sweep
144
+ ```
145
+
146
+ ### Diff
147
+
148
+ ```bash
149
+ runledger diff 12 15
150
+ runledger diff --history 12 --batch my-sweep
151
+ ```
152
+
153
+ ### Export
154
+
155
+ ```bash
156
+ runledger export --metric accuracy --op gt --value 0.9 --batch my-sweep --block 0 --output results.txt
157
+ ```
158
+
159
+ ### Saved searches
160
+
161
+ ```bash
162
+ runledger search --metric accuracy --op gt --value 0.9 --batch sweep --save best-accuracy
163
+ runledger search --saved best-accuracy
164
+ runledger saved list
165
+ runledger saved delete best-accuracy
166
+ ```
167
+
168
+ ## Metrics-Path Convention
169
+
170
+ RunLedger uses **dot-separated paths** to address any value in a JSON payload.
171
+
172
+ | Example | Meaning |
173
+ | -------- | ------- |
174
+ | `accuracy` | Top-level field |
175
+ | `metrics.loss` | Nested field |
176
+ | `results[].sst2_cacc` | Field inside each element of an array |
177
+ | `phases[].metrics.loss` | Nested field inside array elements |
178
+
179
+ **Shorthand keys:** After scanning a batch, the CLI shows a shorthand key for every leaf field. Typing `cacc` will automatically resolve to `client.results[].cacc` if that’s the only (or shallowest) occurrence. Use the full path when there’s ambiguity.
180
+
181
+ Discover available metrics with:
182
+
183
+ ```bash
184
+ runledger metrics --batch my-sweep
185
+ runledger metrics --batch my-sweep --verbose # shows full paths
186
+ ```
187
+
188
+ ## API
189
+
190
+ See [`docs/api.md`](docs/api.md) for the complete REST API reference.
191
+
192
+ ## Usage Examples
193
+
194
+ See [`docs/examples.md`](docs/examples.md) for real-world workflows.
195
+
196
+ ## License
197
+
198
+ MIT
@@ -0,0 +1,189 @@
1
+ # RunLedger
2
+
3
+ **Zero-instrumentation experiment registry and search engine.**
4
+ Point to a folder of JSON experiment files and instantly search, filter, aggregate, diff, and export your results—no SDK, no code changes.
5
+
6
+ ## Quick Start
7
+
8
+ ```bash
9
+ # 1. Start the backend
10
+ docker compose up -d
11
+
12
+ # 2. Ingest your experiment files
13
+ runledger scan ~/experiments --batch my-sweep
14
+
15
+ # 3. Search
16
+ runledger search --metric accuracy --op gt --value 0.9 --batch my-sweep
17
+
18
+ # 4. Aggregate
19
+ runledger aggregate --metric accuracy --agg AVG --group-by experiment --batch my-sweep
20
+ ```
21
+
22
+ New to the tool? Try the guided wizard:
23
+
24
+ ```bash
25
+ runledger guided
26
+ ```
27
+
28
+ ## Key Features
29
+
30
+ ### 🔍 Search any JSON field, no schema required
31
+ - Structured numeric/text comparisons on arbitrary dot-paths (`metrics.accuracy`, `config.optimizer.learning_rate`).
32
+ - Full-text phrase search with stemming.
33
+ - Fuzzy trigram search for typos.
34
+ - Compound AND/OR queries: combine multiple conditions.
35
+ - Batch isolation: group runs by folder and filter within a batch.
36
+
37
+ ### 📊 Aggregates & group-by
38
+ Answer research questions directly:
39
+
40
+ ```bash
41
+ runledger aggregate --metric accuracy --agg AVG --group-by experiment --batch sweep
42
+ ```
43
+
44
+ Supported functions: `AVG`, `MAX`, `MIN`, `SUM`, `COUNT`. Group by any scalar field.
45
+
46
+ ### 🎯 Exact match pointers (“JSON line numbers”)
47
+ For array searches (`results[].sst2_cacc < 0.8`), the CLI shows exactly which array elements matched:
48
+
49
+ ```text
50
+ Matches:
51
+ • results[0].sst2_cacc = 0.924312
52
+ • results[3].sst2_cacc = 0.933486
53
+ ```
54
+
55
+ Works for scalar, array, and compound conditions.
56
+
57
+ ### 🔬 Block-depth control
58
+ Limit output to the relevant part of a large JSON payload with `--block 0` (tightest match), `--block 1` (parent), etc.
59
+
60
+ ### 📁 JSONL ingestion
61
+ Ingest one-JSON-object-per-line logs (common in training scripts) with `--jsonl`.
62
+
63
+ ### 🔎 Run diff
64
+ Compare any two runs side-by-side:
65
+
66
+ ```bash
67
+ runledger diff 12 15
68
+ ```
69
+
70
+ Or see every version of a re-scanned run with `--history`.
71
+
72
+ ### 💾 Saved searches
73
+ Save frequent queries and re-run them with a single command:
74
+
75
+ ```bash
76
+ runledger search --metric accuracy --op gt --value 0.9 --batch sweep --save best-accuracy
77
+ runledger search --saved best-accuracy
78
+ ```
79
+
80
+ ### 🧭 Interactive & guided modes
81
+ - Filter-as-you-type interactive search (`runledger interactive`).
82
+ - Step-by-step wizard for first-time users (`runledger guided`).
83
+
84
+ ### 🔒 Self-hosted, local-first
85
+ Runs in Docker with a single `docker compose up -d`.
86
+ All data stays on your machine. No internet, no accounts, no vendor lock-in.
87
+
88
+ ## Installation
89
+
90
+ ### From PyPI (CLI only)
91
+
92
+ ```bash
93
+ pip install runledger-cli
94
+ ```
95
+
96
+ ### From source
97
+
98
+ ```bash
99
+ git clone https://github.com/yourusername/run-ledger.git
100
+ cd run-ledger
101
+ docker compose up -d # starts PostgreSQL + Spring Boot
102
+ pip install -e . # installs the CLI
103
+ ```
104
+
105
+ ## Quick Tour
106
+
107
+ ### Scan & Discover
108
+
109
+ ```bash
110
+ runledger scan experiments/ --batch my-sweep
111
+ ```
112
+
113
+ The CLI prints a schema summary showing every metric found, its full dot-path, and depth. Array keys are shown with `[]` notation (e.g., `results[].cacc`).
114
+
115
+ ### Search
116
+
117
+ ```bash
118
+ # Single condition
119
+ runledger search --metric loss --op lt --value 0.2 --batch my-sweep --summary
120
+
121
+ # Compound AND
122
+ runledger search --metric accuracy --op gt --value 0.9 --metric loss --op lt --value 0.2 --combine and
123
+
124
+ # Full-text
125
+ runledger search --q "weighted averaging"
126
+
127
+ # Fuzzy
128
+ runledger search --q "weighted avaraging" --fuzzy
129
+ ```
130
+
131
+ ### Aggregate
132
+
133
+ ```bash
134
+ runledger aggregate --metric accuracy --agg AVG --group-by config.learning_rate --batch my-sweep
135
+ ```
136
+
137
+ ### Diff
138
+
139
+ ```bash
140
+ runledger diff 12 15
141
+ runledger diff --history 12 --batch my-sweep
142
+ ```
143
+
144
+ ### Export
145
+
146
+ ```bash
147
+ runledger export --metric accuracy --op gt --value 0.9 --batch my-sweep --block 0 --output results.txt
148
+ ```
149
+
150
+ ### Saved searches
151
+
152
+ ```bash
153
+ runledger search --metric accuracy --op gt --value 0.9 --batch sweep --save best-accuracy
154
+ runledger search --saved best-accuracy
155
+ runledger saved list
156
+ runledger saved delete best-accuracy
157
+ ```
158
+
159
+ ## Metrics-Path Convention
160
+
161
+ RunLedger uses **dot-separated paths** to address any value in a JSON payload.
162
+
163
+ | Example | Meaning |
164
+ | -------- | ------- |
165
+ | `accuracy` | Top-level field |
166
+ | `metrics.loss` | Nested field |
167
+ | `results[].sst2_cacc` | Field inside each element of an array |
168
+ | `phases[].metrics.loss` | Nested field inside array elements |
169
+
170
+ **Shorthand keys:** After scanning a batch, the CLI shows a shorthand key for every leaf field. Typing `cacc` will automatically resolve to `client.results[].cacc` if that’s the only (or shallowest) occurrence. Use the full path when there’s ambiguity.
171
+
172
+ Discover available metrics with:
173
+
174
+ ```bash
175
+ runledger metrics --batch my-sweep
176
+ runledger metrics --batch my-sweep --verbose # shows full paths
177
+ ```
178
+
179
+ ## API
180
+
181
+ See [`docs/api.md`](docs/api.md) for the complete REST API reference.
182
+
183
+ ## Usage Examples
184
+
185
+ See [`docs/examples.md`](docs/examples.md) for real-world workflows.
186
+
187
+ ## License
188
+
189
+ MIT
File without changes