runledger-cli 0.1.0__py3-none-any.whl

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,13 @@
1
+ cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ cli/guided.py,sha256=1Row9hCkeQIqEr55GNm_vJ5COcjqtIb1PZuEqAj2mgM,19416
3
+ cli/ledger.py,sha256=Ovb5yN90r69aVNI-qZ51K4a3ps-qo8gLkt3nX7MqMAM,53294
4
+ cli/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ cli/tests/test_data_features.py,sha256=LFBBOQBL7FdPfPqV9n23ZxqAlpDxsDFfCZDqfXHlNkA,12046
6
+ cli/tests/test_integration.py,sha256=YN75E5H7gSPU-Epv47ZMIpMsrhB1h76JsLXCHKyL914,7164
7
+ cli/tests/test_ledger.py,sha256=0EszEeoefw_QQRCZ9yzln-W2F6wZj8TBB0PmMqst2Ww,15472
8
+ cli/tests/test_real_results.py,sha256=UYuHA42gFwpFFzOiUPxFJ9nMNQ_xkhnOE6ripPH-378,6948
9
+ runledger_cli-0.1.0.dist-info/METADATA,sha256=LDCQD0cTJNIWsJ-ztf12nIczrs5xuaI01odKHDbsJxU,5373
10
+ runledger_cli-0.1.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
11
+ runledger_cli-0.1.0.dist-info/entry_points.txt,sha256=cz4pMKdBDzocbjhVaRxZQrKLCLkZn5UfBvYqRmMGYJs,46
12
+ runledger_cli-0.1.0.dist-info/top_level.txt,sha256=2ImG917oaVHlm0nP9oJE-Qrgs-fq_fGWgba2H1f8fpE,4
13
+ runledger_cli-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (83.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ runledger = cli.ledger:main
@@ -0,0 +1 @@
1
+ cli