synth-ai 0.2.4.dev7__py3-none-any.whl → 0.2.4.dev8__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.
- synth_ai/__init__.py +1 -1
- synth_ai/cli/balance.py +3 -15
- synth_ai/config/base_url.py +47 -0
- synth_ai/http.py +102 -0
- synth_ai/inference/__init__.py +7 -0
- synth_ai/inference/client.py +20 -0
- synth_ai/jobs/client.py +246 -0
- synth_ai/learning/__init__.py +24 -0
- synth_ai/learning/client.py +149 -0
- synth_ai/learning/config.py +43 -0
- synth_ai/learning/constants.py +29 -0
- synth_ai/learning/ft_client.py +59 -0
- synth_ai/learning/health.py +43 -0
- synth_ai/learning/jobs.py +205 -0
- synth_ai/learning/rl_client.py +256 -0
- synth_ai/learning/sse.py +58 -0
- synth_ai/learning/validators.py +48 -0
- synth_ai/lm/core/main_v3.py +13 -0
- synth_ai/lm/core/synth_models.py +48 -0
- synth_ai/lm/core/vendor_clients.py +9 -6
- synth_ai/lm/vendors/core/openai_api.py +31 -3
- synth_ai/lm/vendors/openai_standard.py +45 -14
- synth_ai/lm/vendors/supported/custom_endpoint.py +12 -2
- synth_ai/lm/vendors/synth_client.py +372 -28
- synth_ai/rl/__init__.py +30 -0
- synth_ai/rl/contracts.py +32 -0
- synth_ai/rl/env_keys.py +137 -0
- synth_ai/rl/secrets.py +19 -0
- synth_ai/scripts/verify_rewards.py +100 -0
- synth_ai/task/__init__.py +10 -0
- synth_ai/task/contracts.py +120 -0
- synth_ai/task/health.py +28 -0
- synth_ai/task/validators.py +12 -0
- synth_ai/tracing_v3/hooks.py +3 -1
- synth_ai/tracing_v3/session_tracer.py +123 -2
- synth_ai/tracing_v3/turso/manager.py +218 -0
- synth_ai/tracing_v3/turso/models.py +53 -0
- synth_ai-0.2.4.dev8.dist-info/METADATA +635 -0
- {synth_ai-0.2.4.dev7.dist-info → synth_ai-0.2.4.dev8.dist-info}/RECORD +43 -25
- synth_ai/tui/__init__.py +0 -1
- synth_ai/tui/__main__.py +0 -13
- synth_ai/tui/cli/__init__.py +0 -1
- synth_ai/tui/cli/query_experiments.py +0 -164
- synth_ai/tui/cli/query_experiments_v3.py +0 -164
- synth_ai/tui/dashboard.py +0 -340
- synth_ai-0.2.4.dev7.dist-info/METADATA +0 -193
- {synth_ai-0.2.4.dev7.dist-info → synth_ai-0.2.4.dev8.dist-info}/WHEEL +0 -0
- {synth_ai-0.2.4.dev7.dist-info → synth_ai-0.2.4.dev8.dist-info}/entry_points.txt +0 -0
- {synth_ai-0.2.4.dev7.dist-info → synth_ai-0.2.4.dev8.dist-info}/licenses/LICENSE +0 -0
- {synth_ai-0.2.4.dev7.dist-info → synth_ai-0.2.4.dev8.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,8 @@
|
|
1
|
-
synth_ai/__init__.py,sha256=
|
1
|
+
synth_ai/__init__.py,sha256=u8sOAEzlDIPKIpXgDIItSUIphvhr4RsQ55Us_Sx5Ywk,1354
|
2
2
|
synth_ai/__main__.py,sha256=Kh1xBKkTE5Vs2qNMtDuuOXerHUptMcOiF3YziOpC6DA,146
|
3
|
+
synth_ai/http.py,sha256=aKIGsGwMBi7S0Tg57Q1Nxdoxjh2sn9xzNziLYhfSA3c,4427
|
3
4
|
synth_ai/cli/__init__.py,sha256=Zp845vrQ4PXxTSnToGTQXzYIX7IOKu2mj6qLmdW64yw,1461
|
4
|
-
synth_ai/cli/balance.py,sha256=
|
5
|
+
synth_ai/cli/balance.py,sha256=dlxGKCZ2kDeuHMZ5m8n5SHRWW-2CIWs3JcY5xpnWRVA,7798
|
5
6
|
synth_ai/cli/calc.py,sha256=RJyQJ41e02xn-V0vRRCAVkL59UHDqyz8XpYGsenfdm4,2085
|
6
7
|
synth_ai/cli/demo.py,sha256=Md37HDSPsaJcsIybw-vVA7H6YbnMBLcwK2twz5IM7pk,2474
|
7
8
|
synth_ai/cli/legacy_root_backup.py,sha256=KSMADyJ2g5OVpsq_CeBzqIeDC2Um-9GyINzsJH-75uw,15872
|
@@ -12,7 +13,7 @@ synth_ai/cli/status.py,sha256=M_bt7U58Ubi-q-ZlrIpgCASKq9_k6uMjpx926f6kLLA,4591
|
|
12
13
|
synth_ai/cli/traces.py,sha256=_QBdCR92u0Gv51U4DH0Ws1d5yCrbJRpaYKe7pmcHrHs,6484
|
13
14
|
synth_ai/cli/watch.py,sha256=HBKbAcpUkkPhGvsPRofckbu8oILiVqp35NXHkIEpTTc,17808
|
14
15
|
synth_ai/compound/cais.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
|
-
synth_ai/config/base_url.py,sha256=
|
16
|
+
synth_ai/config/base_url.py,sha256=Bk7Bd9jKJP-LF0SW--WE01JhMfvOB6NUkFMRgPMnJuQ,3101
|
16
17
|
synth_ai/core/experiment.py,sha256=hLkPtzUFA7iY3-QpeJ5K8YjvQeyfqnjab5P2CFaojys,236
|
17
18
|
synth_ai/core/system.py,sha256=s-Z7np2ISYmYc1r9YN-y2yb3cgRlOalrh0iaqnxeo84,206
|
18
19
|
synth_ai/environments/__init__.py,sha256=BQW0Nc_BFQq_N-pcqTyJVjW56kSEXu7XZyaSer-U95Q,1032
|
@@ -151,9 +152,22 @@ synth_ai/environments/v0_observability/history.py,sha256=gW0SozHmxeL6PFNaTAQ7em8
|
|
151
152
|
synth_ai/environments/v0_observability/log.py,sha256=B4LvbPh0a1_E5dki2PlKAVHESB8oCQz0CmDBvC0GwdQ,38
|
152
153
|
synth_ai/evals/base.py,sha256=EFupWBUxKIwvTvr4H29jX-LHWwAyIvNhzexHmG9w6QU,355
|
153
154
|
synth_ai/experimental/synth_oss.py,sha256=g9DQw3LqaDiVEcr-B49yg21M5Mus1HHId5-wMgJoK9Y,15636
|
155
|
+
synth_ai/inference/__init__.py,sha256=FMLFiLMfhZJlQERJCj641TtPqpiiJpaJQxxPFaFZ5jA,76
|
156
|
+
synth_ai/inference/client.py,sha256=zg2OXGxkURZihLONcm4jGTndlde7YDrORlE9uwGLFm8,711
|
157
|
+
synth_ai/jobs/client.py,sha256=wSSqzvIY_vmwG-CHeQYGoSsb-uOr0hDmE8ylNqNoQQQ,9498
|
158
|
+
synth_ai/learning/__init__.py,sha256=gBtKs-FtQYsqcYtpGvHQA3Ro-ezu1ILjoQAMTCJWFq0,743
|
159
|
+
synth_ai/learning/client.py,sha256=BtoSHkbUhBs6ALj4ylCNmJ7fyXMYMhrKzbeXhAKtkWY,6626
|
160
|
+
synth_ai/learning/config.py,sha256=-W1vsN08sKydgo3IEaaGVa45zrnMipm-rPRPE3WNhP8,1243
|
161
|
+
synth_ai/learning/constants.py,sha256=TnIEZrMpbPNpu7Zyk3bmyX3K2XGwWTwRuAUukxBYg64,538
|
154
162
|
synth_ai/learning/core.py,sha256=bA_Ng3YKeCJb1scnrSapp48HildL7Pd2fHkZ4zxurZU,440
|
155
163
|
synth_ai/learning/filtering.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
164
|
+
synth_ai/learning/ft_client.py,sha256=3kSiDHjea1wA8tZf2g7JOav-VtKpeYYTHh7OEBapfH8,2241
|
156
165
|
synth_ai/learning/gateway.py,sha256=8plVu9V_0PTt1ZI6awuh9wSFT4BqS-mLshaN77wGyDk,31
|
166
|
+
synth_ai/learning/health.py,sha256=YxvY0YY3nF_a_HO3IdL9gUj7dXcuVdGpnUEP0dUGMMo,1571
|
167
|
+
synth_ai/learning/jobs.py,sha256=5ShyHNJ1btpC7NY5coURTPl8X4V9fshTq2O-3figJEo,9692
|
168
|
+
synth_ai/learning/rl_client.py,sha256=feCYyFxC0iAXICSknG_W2fNrxr7CzUy4gLM3gfraszQ,11340
|
169
|
+
synth_ai/learning/sse.py,sha256=S0IxAB0SOSSliua-e8m2wilC84jEaNXM6TP4LElUWNU,1891
|
170
|
+
synth_ai/learning/validators.py,sha256=9p7Sqrh-NeFzyqNzsPZBSPQgOPsSlNAqqydtnVdNiWI,1823
|
157
171
|
synth_ai/learning/offline/dpo.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
158
172
|
synth_ai/learning/offline/providers.py,sha256=nrPYoOvns5ekC_o9FecWpV7MOtHR1sH-ldRpmrfMeGo,33
|
159
173
|
synth_ai/learning/offline/sft.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -185,8 +199,9 @@ synth_ai/lm/core/__init__.py,sha256=pFiA6qPyQu6e-KrZruL9A-soRlhSU4Vd_TmdqMzWaIU,
|
|
185
199
|
synth_ai/lm/core/all.py,sha256=sRSuXgdXMrG46DbL7LeBA2g9PcnNgMKV0RhLkWecR1o,1765
|
186
200
|
synth_ai/lm/core/exceptions.py,sha256=YZ3dgwb--ZyLoa4gI9uDGkuWoGfh-TS4yFanSwQd-CM,98
|
187
201
|
synth_ai/lm/core/main.py,sha256=V1b-v8aySJwcilS_uziHyIVF-RUpOj8QK2_F828pHJ8,12801
|
188
|
-
synth_ai/lm/core/main_v3.py,sha256=
|
189
|
-
synth_ai/lm/core/
|
202
|
+
synth_ai/lm/core/main_v3.py,sha256=TJQHZ0kg7B1jM6deZSF21gVM-u-X-zkr-Zs4GiGfxTw,24602
|
203
|
+
synth_ai/lm/core/synth_models.py,sha256=XEogTWiXbpyeznb0Px_WAkRUmKlT2WIS4nFrtnEm6-c,1646
|
204
|
+
synth_ai/lm/core/vendor_clients.py,sha256=yDJ4KxIP4sdxIaUkXJqF4G4_VS-47YA_OBQscj9v0B0,6890
|
190
205
|
synth_ai/lm/cost/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
191
206
|
synth_ai/lm/cost/monitor.py,sha256=DkeLUlrb7rGx3nZ04aADU9HXXu5mZTf_DBwT0xhzIv4,7
|
192
207
|
synth_ai/lm/cost/statefulness.py,sha256=SO-H9_R1_KL110z_ceRIJzH6n8D9gpx-R1-_mtO7pNI,37
|
@@ -202,26 +217,35 @@ synth_ai/lm/tools/__init__.py,sha256=3JM5vqZqKloaeHaxuO49C8A_0qljys3pQ1yt70WKhho
|
|
202
217
|
synth_ai/lm/tools/base.py,sha256=sDiqopouPml_tEFKQXMZFl0M45JO-yJBWWjyaeAyV1Q,5722
|
203
218
|
synth_ai/lm/vendors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
204
219
|
synth_ai/lm/vendors/base.py,sha256=K9SmghoH_WoMtmx8Q1qrcKcj1VriWHrMm607tIUgNOI,2430
|
205
|
-
synth_ai/lm/vendors/openai_standard.py,sha256=
|
220
|
+
synth_ai/lm/vendors/openai_standard.py,sha256=ExZaaGc-No-xZ2kpVoyXEzh57tanDZbFFVJVpLLoG0Y,34039
|
206
221
|
synth_ai/lm/vendors/openai_standard_responses.py,sha256=iTmnXzLgeWQ_XfB8CtNMDdPRSPI97jccw4k5anhKLcg,10165
|
207
222
|
synth_ai/lm/vendors/retries.py,sha256=Ti72rZWoJsO7Kj6QtCMwmubX65AM-K4USf86zh-K3Go,565
|
208
|
-
synth_ai/lm/vendors/synth_client.py,sha256=
|
223
|
+
synth_ai/lm/vendors/synth_client.py,sha256=F7VI5G02t1nerCE3QAxcsdn3byo98ifWfM7A_-fZNWo,27749
|
209
224
|
synth_ai/lm/vendors/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
210
225
|
synth_ai/lm/vendors/core/anthropic_api.py,sha256=mxJVF-uvSUOdbBRMmVfwBFCc7ntV5i_LNE5tQ2AxAbU,14986
|
211
226
|
synth_ai/lm/vendors/core/gemini_api.py,sha256=mHvQtRqoymuzsQDxNFgTDt4HsrgvIuVBSAE29QpRa34,11082
|
212
227
|
synth_ai/lm/vendors/core/mistral_api.py,sha256=4ggRg_4ajzZMBCb-0mHMX_ZTg10tteSfnIPE2NULFag,11875
|
213
|
-
synth_ai/lm/vendors/core/openai_api.py,sha256=
|
228
|
+
synth_ai/lm/vendors/core/openai_api.py,sha256=7znI4-yFc0sI5z6eOckd-Ks-IJU66v9gCBzoLjSzY7A,8416
|
214
229
|
synth_ai/lm/vendors/core/synth_dev_api.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
215
230
|
synth_ai/lm/vendors/local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
216
231
|
synth_ai/lm/vendors/local/ollama.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
217
232
|
synth_ai/lm/vendors/supported/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
218
|
-
synth_ai/lm/vendors/supported/custom_endpoint.py,sha256=
|
233
|
+
synth_ai/lm/vendors/supported/custom_endpoint.py,sha256=dlJyb3d4c-ZIlCxBDsmBj8dtYBO8aoz1MxD8TuqmbG4,15314
|
219
234
|
synth_ai/lm/vendors/supported/deepseek.py,sha256=vTWdr0MYMsywhm2ajMzXOTTbgOcStT_P7xL8BDMcpNI,2329
|
220
235
|
synth_ai/lm/vendors/supported/grok.py,sha256=_dDUPhov6_T_nqCN3ygLuFiDeoSMcKGaztvfhPrR5UY,2226
|
221
236
|
synth_ai/lm/vendors/supported/groq.py,sha256=7W3kOg164C4R5zhDG6hb0IhaHDSz85xHc04uLz7umcQ,383
|
222
237
|
synth_ai/lm/vendors/supported/ollama.py,sha256=GMrDhKD0LJLk6wFwzEi4WCgreagkADC6WxcWZqBdGJ8,466
|
223
238
|
synth_ai/lm/vendors/supported/openrouter.py,sha256=N2slrvToudY8LIq8QHfHESm-IVo4GBriTAQF7RteO0E,2570
|
224
239
|
synth_ai/lm/vendors/supported/together.py,sha256=IFd6gJtfPuE_KLh51ywp1iIkvow_R26EHPcYXBnw8Vc,337
|
240
|
+
synth_ai/rl/__init__.py,sha256=MrO6d2ehaDpE7nWQdie13CtYbIvezms9IaVENPeymwE,724
|
241
|
+
synth_ai/rl/contracts.py,sha256=6LJUT2UWHWebkoMprbIgsycV9ET3qLY-3NN1v4bJacY,673
|
242
|
+
synth_ai/rl/env_keys.py,sha256=lb2kQwuk4zMXyTUnaVCAbYvIstiGznLCdx797rAsPFk,4960
|
243
|
+
synth_ai/rl/secrets.py,sha256=RJU7N0idDNhENHyG9uAStXJxRGQMQti45xpm5i3uUGc,586
|
244
|
+
synth_ai/scripts/verify_rewards.py,sha256=w1eFGi-H5It7J55Qyt5s1mPnSc4AldMmZ9roNzE0ulQ,3304
|
245
|
+
synth_ai/task/__init__.py,sha256=1mkw9Gfgg7eYKxgvJGHvffpGZmJG9xTNn7ESKhERDv0,253
|
246
|
+
synth_ai/task/contracts.py,sha256=-zzarbw-8XIBSbd9SPSU1UF0fYKuTFOweWh5yHrj9nk,3699
|
247
|
+
synth_ai/task/health.py,sha256=MItweOAtvYAVdhqDVaKJhRgvTOqgSLZylgY8m7YqVp8,985
|
248
|
+
synth_ai/task/validators.py,sha256=IGE9zTjHYXOehwakMkcOAaDLSaHw_0Tp8uzL2ydCZ9U,361
|
225
249
|
synth_ai/tracing/__init__.py,sha256=0Yy1YDMe_Duw976yu0HL1cbqPWdZEvtgEdtjDguNvcc,781
|
226
250
|
synth_ai/tracing_v1/__init__.py,sha256=uV6qf8_rJTxRx6tCsXvqnjHhA1mR0im2rANuh0McrHA,930
|
227
251
|
synth_ai/tracing_v3/__init__.py,sha256=9lKM-blbXo6Sk1oBpyYayjMVU43f9Y_35M1OvRynWoU,3251
|
@@ -229,12 +253,12 @@ synth_ai/tracing_v3/abstractions.py,sha256=FmVxWpRZAq5UmEmM-PjG-lFAT-1qgao7JGNh7
|
|
229
253
|
synth_ai/tracing_v3/config.py,sha256=mPX2P4ILv1ktoI8oGKO_LyLc0O6Lnr2jbHA3QE-y6N0,3241
|
230
254
|
synth_ai/tracing_v3/db_config.py,sha256=9tG-0OC22bmpNHH4bz6pdb5a5JHgFzhav6p14POAqAQ,5827
|
231
255
|
synth_ai/tracing_v3/decorators.py,sha256=p8iXlNw7bIRC8-uG9doWMkDQiuJK5KSCm_awiifMjJw,13262
|
232
|
-
synth_ai/tracing_v3/hooks.py,sha256=
|
256
|
+
synth_ai/tracing_v3/hooks.py,sha256=iUKYY_I0abTSH_-Xe6Dfja7ff8xAhBVOU8AP2BEEcmA,7923
|
233
257
|
synth_ai/tracing_v3/llm_call_record_helpers.py,sha256=mqSQStFC02z9b7uoTO7FjgJfd8Kq1FWcBLi3k2lqRWs,12181
|
234
258
|
synth_ai/tracing_v3/lm_call_record_abstractions.py,sha256=j2RGuXVaV_EXmIosuXRDjptJSlrDXwb8x06k2fF6lqo,9195
|
235
259
|
synth_ai/tracing_v3/migration_helper.py,sha256=izm7SNHtG3VDv_5ZmMk_mmwKitmShxUK3joNFOArZIY,4177
|
236
260
|
synth_ai/tracing_v3/replica_sync.py,sha256=MoJRcMp6rZVC1QZF9EH2oUV70C7Br0N8DhEUZ9PeWks,8670
|
237
|
-
synth_ai/tracing_v3/session_tracer.py,sha256=
|
261
|
+
synth_ai/tracing_v3/session_tracer.py,sha256=_pNmKmoqUsnH410L5zDzC9_f804j_fOzTFSUTh782d0,16718
|
238
262
|
synth_ai/tracing_v3/utils.py,sha256=8fmysb6iHVaKtd7-ybFYC_hk2EnFh-wrywtHmdgx0ik,3409
|
239
263
|
synth_ai/tracing_v3/examples/basic_usage.py,sha256=wNpn8t0s0-2wusamBjn8WyyDUM_5Qz5_7TJuK4tSA98,7196
|
240
264
|
synth_ai/tracing_v3/storage/__init__.py,sha256=VPjBh180bcSPz1HsbqaqfnvguwqwomaEYKxkrhfGABY,332
|
@@ -246,14 +270,8 @@ synth_ai/tracing_v3/storage/types.py,sha256=LevN8M12ilZ0EaiQ6Y3yONSMuLGEhSKNt0ir
|
|
246
270
|
synth_ai/tracing_v3/storage/utils.py,sha256=GTc0AYzuaCAwci6sg7UCgtMnluNIIUDbrBOJcP8LvmE,6056
|
247
271
|
synth_ai/tracing_v3/turso/__init__.py,sha256=MSvWojb9unyfLeTSaiVfw5T3dK72MzNQbvoCEZB9zag,414
|
248
272
|
synth_ai/tracing_v3/turso/daemon.py,sha256=RHcwab3pe3rbD8Ccl10_61KWgaieBv0fHVOsn9NkFfk,4334
|
249
|
-
synth_ai/tracing_v3/turso/manager.py,sha256=
|
250
|
-
synth_ai/tracing_v3/turso/models.py,sha256=
|
251
|
-
synth_ai/tui/__init__.py,sha256=URh-sqpBz93jF7BURdVagh7TcNTrUxyGosfSRF1uyMo,50
|
252
|
-
synth_ai/tui/__main__.py,sha256=6L-3iTmRWkCyf6a4ECtLpI67nD99ObydtqwOh_Ao3rc,238
|
253
|
-
synth_ai/tui/dashboard.py,sha256=l39EkQEM2awOjQIlMnsous5kp26UDpK4aCBHw04GWjM,10588
|
254
|
-
synth_ai/tui/cli/__init__.py,sha256=a_vhwN7-ZGCpjz1sHT-w8m3Icr2zfatlOnYc3v3-X1M,49
|
255
|
-
synth_ai/tui/cli/query_experiments.py,sha256=B-Cy1xvX9QYaVC59K6DgMslL56AOA3V0HKNQv5mnGTY,5819
|
256
|
-
synth_ai/tui/cli/query_experiments_v3.py,sha256=B-Cy1xvX9QYaVC59K6DgMslL56AOA3V0HKNQv5mnGTY,5819
|
273
|
+
synth_ai/tracing_v3/turso/manager.py,sha256=klWc5RHh5N_EGMse8yQCWjhY82lw87XKPq78QD8IBP8,31248
|
274
|
+
synth_ai/tracing_v3/turso/models.py,sha256=z_6UIq01RMpo1fHxbDrRQYU78tulWUPYSyp2edq9Q7M,16186
|
257
275
|
synth_ai/v0/tracing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
258
276
|
synth_ai/v0/tracing/abstractions.py,sha256=pL9XCf9UEWdX4IRizzRK9XUNBtDeBYfkVD51F8UOB0s,6898
|
259
277
|
synth_ai/v0/tracing/base_client.py,sha256=IZpyuM-GIClvBBFA9iv4tpOjzY1QHF1m7vkNCYk7xLo,2931
|
@@ -291,9 +309,9 @@ synth_ai/v0/tracing_v1/events/manage.py,sha256=ZDXXP-ZwLH9LCsmw7Ru9o55d7bl_diPtJ
|
|
291
309
|
synth_ai/v0/tracing_v1/events/scope.py,sha256=BuBkhSpVHUJt8iGT9HJZF82rbb88mQcd2vM2shg-w2I,2550
|
292
310
|
synth_ai/v0/tracing_v1/events/store.py,sha256=0342lvAcalyJbVEIzQFaPuMQGgwiFm7M5rE6gr-G0E8,9041
|
293
311
|
synth_ai/zyk/__init__.py,sha256=htVLnzTYQ5rxzYpzSYBm7_o6uNKZ3pB_PrqkBrgTRS4,771
|
294
|
-
synth_ai-0.2.4.
|
295
|
-
synth_ai-0.2.4.
|
296
|
-
synth_ai-0.2.4.
|
297
|
-
synth_ai-0.2.4.
|
298
|
-
synth_ai-0.2.4.
|
299
|
-
synth_ai-0.2.4.
|
312
|
+
synth_ai-0.2.4.dev8.dist-info/licenses/LICENSE,sha256=ynhjRQUfqA_RdGRATApfFA_fBAy9cno04sLtLUqxVFM,1069
|
313
|
+
synth_ai-0.2.4.dev8.dist-info/METADATA,sha256=QXSSjKQqZTr1IOiV9xA9gwhvuvyttAw_fWEHU2IrTds,29293
|
314
|
+
synth_ai-0.2.4.dev8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
315
|
+
synth_ai-0.2.4.dev8.dist-info/entry_points.txt,sha256=GSFXaJreq4PJXbixkUI0GHZwGh2dZDG5pYaoVmqr_KE,46
|
316
|
+
synth_ai-0.2.4.dev8.dist-info/top_level.txt,sha256=fBmtZyVHuKaGa29oHBaaUkrUIWTqSpoVMPiVdCDP3k8,9
|
317
|
+
synth_ai-0.2.4.dev8.dist-info/RECORD,,
|
synth_ai/tui/__init__.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"""Text User Interface utilities for synth-ai."""
|
synth_ai/tui/__main__.py
DELETED
synth_ai/tui/cli/__init__.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"""Command Line Interface tools for synth-ai."""
|
@@ -1,164 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python3
|
2
|
-
"""
|
3
|
-
Query experiments and sessions from Turso/sqld using v3 tracing.
|
4
|
-
"""
|
5
|
-
|
6
|
-
import argparse
|
7
|
-
import asyncio
|
8
|
-
|
9
|
-
from synth_ai.tracing_v3.turso.manager import AsyncSQLTraceManager
|
10
|
-
|
11
|
-
|
12
|
-
async def list_experiments(db_url: str):
|
13
|
-
"""List all experiments in the database."""
|
14
|
-
db = AsyncSQLTraceManager(db_url)
|
15
|
-
await db.initialize()
|
16
|
-
|
17
|
-
try:
|
18
|
-
df = await db.query_traces("""
|
19
|
-
SELECT
|
20
|
-
e.experiment_id,
|
21
|
-
e.name,
|
22
|
-
e.description,
|
23
|
-
e.created_at,
|
24
|
-
COUNT(DISTINCT st.session_id) as num_sessions,
|
25
|
-
COUNT(DISTINCT ev.id) as num_events,
|
26
|
-
SUM(CASE WHEN ev.event_type = 'cais' THEN ev.cost_usd ELSE 0 END) / 100.0 as total_cost,
|
27
|
-
SUM(CASE WHEN ev.event_type = 'cais' THEN ev.total_tokens ELSE 0 END) as total_tokens
|
28
|
-
FROM experiments e
|
29
|
-
LEFT JOIN session_traces st ON e.experiment_id = st.experiment_id
|
30
|
-
LEFT JOIN events ev ON st.session_id = ev.session_id
|
31
|
-
GROUP BY e.experiment_id, e.name, e.description, e.created_at
|
32
|
-
ORDER BY e.created_at DESC
|
33
|
-
""")
|
34
|
-
|
35
|
-
if df.empty:
|
36
|
-
print("No experiments found in database.")
|
37
|
-
return
|
38
|
-
|
39
|
-
print(f"\n{'=' * 100}")
|
40
|
-
print(f"{'Experiments in ' + db_url:^100}")
|
41
|
-
print(f"{'=' * 100}\n")
|
42
|
-
|
43
|
-
for _, row in df.iterrows():
|
44
|
-
print(f"🧪 {row['name']} (id: {row['experiment_id'][:8]}...)")
|
45
|
-
print(f" Created: {row['created_at']}")
|
46
|
-
print(f" Description: {row['description']}")
|
47
|
-
print(f" Sessions: {row['num_sessions']}")
|
48
|
-
print(f" Events: {row['num_events']:,}")
|
49
|
-
if row["total_cost"] and row["total_cost"] > 0:
|
50
|
-
print(f" Cost: ${row['total_cost']:.4f}")
|
51
|
-
if row["total_tokens"] and row["total_tokens"] > 0:
|
52
|
-
print(f" Tokens: {int(row['total_tokens']):,}")
|
53
|
-
print()
|
54
|
-
finally:
|
55
|
-
await db.close()
|
56
|
-
|
57
|
-
|
58
|
-
async def show_experiment_details(db_url: str, experiment_id: str):
|
59
|
-
"""Show detailed information about a specific experiment."""
|
60
|
-
db = AsyncSQLTraceManager(db_url)
|
61
|
-
await db.initialize()
|
62
|
-
|
63
|
-
try:
|
64
|
-
# Get experiment info
|
65
|
-
exp_df = await db.query_traces(
|
66
|
-
"""
|
67
|
-
SELECT * FROM experiments WHERE experiment_id LIKE :exp_id
|
68
|
-
""",
|
69
|
-
{"exp_id": f"{experiment_id}%"},
|
70
|
-
)
|
71
|
-
|
72
|
-
if exp_df.empty:
|
73
|
-
print(f"No experiment found matching ID: {experiment_id}")
|
74
|
-
return
|
75
|
-
|
76
|
-
exp = exp_df.iloc[0]
|
77
|
-
print(f"\n{'=' * 100}")
|
78
|
-
print(f"Experiment: {exp['name']} ({exp['experiment_id']})")
|
79
|
-
print(f"{'=' * 100}\n")
|
80
|
-
|
81
|
-
# Get session statistics
|
82
|
-
sessions_df = await db.get_sessions_by_experiment(exp["experiment_id"])
|
83
|
-
|
84
|
-
if sessions_df:
|
85
|
-
print(f"Sessions: {len(sessions_df)}")
|
86
|
-
|
87
|
-
# Get aggregated stats
|
88
|
-
stats_df = await db.query_traces(
|
89
|
-
"""
|
90
|
-
SELECT
|
91
|
-
COUNT(DISTINCT ev.id) as total_events,
|
92
|
-
COUNT(DISTINCT m.id) as total_messages,
|
93
|
-
SUM(CASE WHEN ev.event_type = 'cais' THEN ev.cost_usd ELSE 0 END) / 100.0 as total_cost,
|
94
|
-
SUM(CASE WHEN ev.event_type = 'cais' THEN ev.total_tokens ELSE 0 END) as total_tokens
|
95
|
-
FROM session_traces st
|
96
|
-
LEFT JOIN events ev ON st.session_id = ev.session_id
|
97
|
-
LEFT JOIN messages m ON st.session_id = m.session_id
|
98
|
-
WHERE st.experiment_id = :exp_id
|
99
|
-
""",
|
100
|
-
{"exp_id": exp["experiment_id"]},
|
101
|
-
)
|
102
|
-
|
103
|
-
if not stats_df.empty:
|
104
|
-
stats = stats_df.iloc[0]
|
105
|
-
print(f"Total events: {int(stats['total_events']):,}")
|
106
|
-
print(f"Total messages: {int(stats['total_messages']):,}")
|
107
|
-
print(f"Total cost: ${stats['total_cost']:.4f}")
|
108
|
-
print(f"Total tokens: {int(stats['total_tokens']):,}")
|
109
|
-
|
110
|
-
# Show session list
|
111
|
-
print("\nSession list:")
|
112
|
-
for sess in sessions_df:
|
113
|
-
print(f" - {sess['session_id']} ({sess['created_at']})")
|
114
|
-
print(
|
115
|
-
f" Timesteps: {sess['num_timesteps']}, Events: {sess['num_events']}, Messages: {sess['num_messages']}"
|
116
|
-
)
|
117
|
-
finally:
|
118
|
-
await db.close()
|
119
|
-
|
120
|
-
|
121
|
-
async def show_model_usage(db_url: str, model_name: str | None = None):
|
122
|
-
"""Show model usage statistics."""
|
123
|
-
db = AsyncSQLTraceManager(db_url)
|
124
|
-
await db.initialize()
|
125
|
-
|
126
|
-
try:
|
127
|
-
df = await db.get_model_usage(model_name=model_name)
|
128
|
-
|
129
|
-
if df.empty:
|
130
|
-
print("No model usage data found.")
|
131
|
-
return
|
132
|
-
|
133
|
-
print(f"\n{'=' * 100}")
|
134
|
-
print(f"{'Model Usage Statistics':^100}")
|
135
|
-
print(f"{'=' * 100}\n")
|
136
|
-
|
137
|
-
print(df.to_string(index=False))
|
138
|
-
finally:
|
139
|
-
await db.close()
|
140
|
-
|
141
|
-
|
142
|
-
async def main():
|
143
|
-
parser = argparse.ArgumentParser(description="Query experiments from Turso/sqld (v3)")
|
144
|
-
parser.add_argument(
|
145
|
-
"-u", "--url", default="sqlite+libsql://http://127.0.0.1:8080", help="Turso database URL"
|
146
|
-
)
|
147
|
-
parser.add_argument(
|
148
|
-
"-e", "--experiment", help="Show details for specific experiment ID (can be partial)"
|
149
|
-
)
|
150
|
-
parser.add_argument("-m", "--model", help="Show usage for specific model")
|
151
|
-
parser.add_argument("--usage", action="store_true", help="Show model usage statistics")
|
152
|
-
|
153
|
-
args = parser.parse_args()
|
154
|
-
|
155
|
-
if args.usage or args.model:
|
156
|
-
await show_model_usage(args.url, args.model)
|
157
|
-
elif args.experiment:
|
158
|
-
await show_experiment_details(args.url, args.experiment)
|
159
|
-
else:
|
160
|
-
await list_experiments(args.url)
|
161
|
-
|
162
|
-
|
163
|
-
if __name__ == "__main__":
|
164
|
-
asyncio.run(main())
|
@@ -1,164 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python3
|
2
|
-
"""
|
3
|
-
Query experiments and sessions from Turso/sqld using v3 tracing.
|
4
|
-
"""
|
5
|
-
|
6
|
-
import argparse
|
7
|
-
import asyncio
|
8
|
-
|
9
|
-
from synth_ai.tracing_v3.turso.manager import AsyncSQLTraceManager
|
10
|
-
|
11
|
-
|
12
|
-
async def list_experiments(db_url: str):
|
13
|
-
"""List all experiments in the database."""
|
14
|
-
db = AsyncSQLTraceManager(db_url)
|
15
|
-
await db.initialize()
|
16
|
-
|
17
|
-
try:
|
18
|
-
df = await db.query_traces("""
|
19
|
-
SELECT
|
20
|
-
e.experiment_id,
|
21
|
-
e.name,
|
22
|
-
e.description,
|
23
|
-
e.created_at,
|
24
|
-
COUNT(DISTINCT st.session_id) as num_sessions,
|
25
|
-
COUNT(DISTINCT ev.id) as num_events,
|
26
|
-
SUM(CASE WHEN ev.event_type = 'cais' THEN ev.cost_usd ELSE 0 END) / 100.0 as total_cost,
|
27
|
-
SUM(CASE WHEN ev.event_type = 'cais' THEN ev.total_tokens ELSE 0 END) as total_tokens
|
28
|
-
FROM experiments e
|
29
|
-
LEFT JOIN session_traces st ON e.experiment_id = st.experiment_id
|
30
|
-
LEFT JOIN events ev ON st.session_id = ev.session_id
|
31
|
-
GROUP BY e.experiment_id, e.name, e.description, e.created_at
|
32
|
-
ORDER BY e.created_at DESC
|
33
|
-
""")
|
34
|
-
|
35
|
-
if df.empty:
|
36
|
-
print("No experiments found in database.")
|
37
|
-
return
|
38
|
-
|
39
|
-
print(f"\n{'=' * 100}")
|
40
|
-
print(f"{'Experiments in ' + db_url:^100}")
|
41
|
-
print(f"{'=' * 100}\n")
|
42
|
-
|
43
|
-
for _, row in df.iterrows():
|
44
|
-
print(f"🧪 {row['name']} (id: {row['experiment_id'][:8]}...)")
|
45
|
-
print(f" Created: {row['created_at']}")
|
46
|
-
print(f" Description: {row['description']}")
|
47
|
-
print(f" Sessions: {row['num_sessions']}")
|
48
|
-
print(f" Events: {row['num_events']:,}")
|
49
|
-
if row["total_cost"] and row["total_cost"] > 0:
|
50
|
-
print(f" Cost: ${row['total_cost']:.4f}")
|
51
|
-
if row["total_tokens"] and row["total_tokens"] > 0:
|
52
|
-
print(f" Tokens: {int(row['total_tokens']):,}")
|
53
|
-
print()
|
54
|
-
finally:
|
55
|
-
await db.close()
|
56
|
-
|
57
|
-
|
58
|
-
async def show_experiment_details(db_url: str, experiment_id: str):
|
59
|
-
"""Show detailed information about a specific experiment."""
|
60
|
-
db = AsyncSQLTraceManager(db_url)
|
61
|
-
await db.initialize()
|
62
|
-
|
63
|
-
try:
|
64
|
-
# Get experiment info
|
65
|
-
exp_df = await db.query_traces(
|
66
|
-
"""
|
67
|
-
SELECT * FROM experiments WHERE experiment_id LIKE :exp_id
|
68
|
-
""",
|
69
|
-
{"exp_id": f"{experiment_id}%"},
|
70
|
-
)
|
71
|
-
|
72
|
-
if exp_df.empty:
|
73
|
-
print(f"No experiment found matching ID: {experiment_id}")
|
74
|
-
return
|
75
|
-
|
76
|
-
exp = exp_df.iloc[0]
|
77
|
-
print(f"\n{'=' * 100}")
|
78
|
-
print(f"Experiment: {exp['name']} ({exp['experiment_id']})")
|
79
|
-
print(f"{'=' * 100}\n")
|
80
|
-
|
81
|
-
# Get session statistics
|
82
|
-
sessions_df = await db.get_sessions_by_experiment(exp["experiment_id"])
|
83
|
-
|
84
|
-
if sessions_df:
|
85
|
-
print(f"Sessions: {len(sessions_df)}")
|
86
|
-
|
87
|
-
# Get aggregated stats
|
88
|
-
stats_df = await db.query_traces(
|
89
|
-
"""
|
90
|
-
SELECT
|
91
|
-
COUNT(DISTINCT ev.id) as total_events,
|
92
|
-
COUNT(DISTINCT m.id) as total_messages,
|
93
|
-
SUM(CASE WHEN ev.event_type = 'cais' THEN ev.cost_usd ELSE 0 END) / 100.0 as total_cost,
|
94
|
-
SUM(CASE WHEN ev.event_type = 'cais' THEN ev.total_tokens ELSE 0 END) as total_tokens
|
95
|
-
FROM session_traces st
|
96
|
-
LEFT JOIN events ev ON st.session_id = ev.session_id
|
97
|
-
LEFT JOIN messages m ON st.session_id = m.session_id
|
98
|
-
WHERE st.experiment_id = :exp_id
|
99
|
-
""",
|
100
|
-
{"exp_id": exp["experiment_id"]},
|
101
|
-
)
|
102
|
-
|
103
|
-
if not stats_df.empty:
|
104
|
-
stats = stats_df.iloc[0]
|
105
|
-
print(f"Total events: {int(stats['total_events']):,}")
|
106
|
-
print(f"Total messages: {int(stats['total_messages']):,}")
|
107
|
-
print(f"Total cost: ${stats['total_cost']:.4f}")
|
108
|
-
print(f"Total tokens: {int(stats['total_tokens']):,}")
|
109
|
-
|
110
|
-
# Show session list
|
111
|
-
print("\nSession list:")
|
112
|
-
for sess in sessions_df:
|
113
|
-
print(f" - {sess['session_id']} ({sess['created_at']})")
|
114
|
-
print(
|
115
|
-
f" Timesteps: {sess['num_timesteps']}, Events: {sess['num_events']}, Messages: {sess['num_messages']}"
|
116
|
-
)
|
117
|
-
finally:
|
118
|
-
await db.close()
|
119
|
-
|
120
|
-
|
121
|
-
async def show_model_usage(db_url: str, model_name: str | None = None):
|
122
|
-
"""Show model usage statistics."""
|
123
|
-
db = AsyncSQLTraceManager(db_url)
|
124
|
-
await db.initialize()
|
125
|
-
|
126
|
-
try:
|
127
|
-
df = await db.get_model_usage(model_name=model_name)
|
128
|
-
|
129
|
-
if df.empty:
|
130
|
-
print("No model usage data found.")
|
131
|
-
return
|
132
|
-
|
133
|
-
print(f"\n{'=' * 100}")
|
134
|
-
print(f"{'Model Usage Statistics':^100}")
|
135
|
-
print(f"{'=' * 100}\n")
|
136
|
-
|
137
|
-
print(df.to_string(index=False))
|
138
|
-
finally:
|
139
|
-
await db.close()
|
140
|
-
|
141
|
-
|
142
|
-
async def main():
|
143
|
-
parser = argparse.ArgumentParser(description="Query experiments from Turso/sqld (v3)")
|
144
|
-
parser.add_argument(
|
145
|
-
"-u", "--url", default="sqlite+libsql://http://127.0.0.1:8080", help="Turso database URL"
|
146
|
-
)
|
147
|
-
parser.add_argument(
|
148
|
-
"-e", "--experiment", help="Show details for specific experiment ID (can be partial)"
|
149
|
-
)
|
150
|
-
parser.add_argument("-m", "--model", help="Show usage for specific model")
|
151
|
-
parser.add_argument("--usage", action="store_true", help="Show model usage statistics")
|
152
|
-
|
153
|
-
args = parser.parse_args()
|
154
|
-
|
155
|
-
if args.usage or args.model:
|
156
|
-
await show_model_usage(args.url, args.model)
|
157
|
-
elif args.experiment:
|
158
|
-
await show_experiment_details(args.url, args.experiment)
|
159
|
-
else:
|
160
|
-
await list_experiments(args.url)
|
161
|
-
|
162
|
-
|
163
|
-
if __name__ == "__main__":
|
164
|
-
asyncio.run(main())
|