synnodb 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.
Files changed (245) hide show
  1. synnodb-0.1.0/LICENSE +201 -0
  2. synnodb-0.1.0/PKG-INFO +146 -0
  3. synnodb-0.1.0/README.md +110 -0
  4. synnodb-0.1.0/conversations/base_impl_conversation.py +457 -0
  5. synnodb-0.1.0/conversations/check_sf_correctness_conv.py +78 -0
  6. synnodb-0.1.0/conversations/checkpointed_conversation.py +567 -0
  7. synnodb-0.1.0/conversations/conversation.py +295 -0
  8. synnodb-0.1.0/conversations/conversation_spec.py +60 -0
  9. synnodb-0.1.0/conversations/filenames.py +45 -0
  10. synnodb-0.1.0/conversations/gen_storage_plan_conversation.py +75 -0
  11. synnodb-0.1.0/conversations/in_mem_1_optim_conv.py +266 -0
  12. synnodb-0.1.0/conversations/in_mem_2_mt_conv.py +244 -0
  13. synnodb-0.1.0/conversations/manual_specs.py +51 -0
  14. synnodb-0.1.0/conversations/optimization_conversation.py +255 -0
  15. synnodb-0.1.0/conversations/prompts_gen.py +745 -0
  16. synnodb-0.1.0/conversations/scripted_conversation.py +70 -0
  17. synnodb-0.1.0/conversations/ssd_1_st_opt_conv.py +58 -0
  18. synnodb-0.1.0/conversations/ssd_2_mt_conv.py +125 -0
  19. synnodb-0.1.0/conversations/stage_config.py +68 -0
  20. synnodb-0.1.0/conversations/supervision_agent.py +188 -0
  21. synnodb-0.1.0/conversations/utils/cleanup_plans.py +183 -0
  22. synnodb-0.1.0/conversations/utils/cleanup_plans_test.py +920 -0
  23. synnodb-0.1.0/cpp_runner/compiler/compiler.py +549 -0
  24. synnodb-0.1.0/cpp_runner/compiler/compiler_cached.py +204 -0
  25. synnodb-0.1.0/cpp_runner/compiler/compiler_factory.py +101 -0
  26. synnodb-0.1.0/cpp_runner/compiler/compiler_factory_olap.py +54 -0
  27. synnodb-0.1.0/cpp_runner/compiler/compiler_utils.py +132 -0
  28. synnodb-0.1.0/cpp_runner/hotpatch/hotpatch_proc.py +654 -0
  29. synnodb-0.1.0/cpp_runner/hotpatch/pool.py +44 -0
  30. synnodb-0.1.0/cpp_runner/prepare_repo/assemble_args_parser.py +79 -0
  31. synnodb-0.1.0/cpp_runner/prepare_repo/assemble_query_impl.py +189 -0
  32. synnodb-0.1.0/cpp_runner/prepare_repo/load_snapshot_and_prepare.py +98 -0
  33. synnodb-0.1.0/cpp_runner/prepare_repo/prepare_olap.py +128 -0
  34. synnodb-0.1.0/cpp_runner/prepare_repo/prepare_workspace.py +328 -0
  35. synnodb-0.1.0/cpp_runner/prepare_repo/prepare_workspace_olap.py +193 -0
  36. synnodb-0.1.0/cpp_runner/prepare_repo/retrieve_framework_version_hash.py +56 -0
  37. synnodb-0.1.0/cpp_runner/test/old/compile.py +36 -0
  38. synnodb-0.1.0/cpp_runner/test/test_prepare_and_run.py +169 -0
  39. synnodb-0.1.0/cpp_runner/utils/proc_utils.py +79 -0
  40. synnodb-0.1.0/llm/anthropic/claude_compaction_helper.py +340 -0
  41. synnodb-0.1.0/llm/glm/glm_xml_tool_call_parser.py +46 -0
  42. synnodb-0.1.0/llm/llm_caching/cached_compaction_session.py +352 -0
  43. synnodb-0.1.0/llm/llm_caching/cached_litellm.py +414 -0
  44. synnodb-0.1.0/llm/llm_caching/cached_llm_helper.py +304 -0
  45. synnodb-0.1.0/llm/llm_caching/cached_llm_helper_test.py +81 -0
  46. synnodb-0.1.0/llm/llm_caching/cached_openai.py +225 -0
  47. synnodb-0.1.0/llm/models.py +221 -0
  48. synnodb-0.1.0/llm/sdk/agents_sdk/compaction_trigger.py +24 -0
  49. synnodb-0.1.0/llm/sdk/agents_sdk/openai_make_compile_tool.py +28 -0
  50. synnodb-0.1.0/llm/sdk/agents_sdk/openai_make_run_tool.py +65 -0
  51. synnodb-0.1.0/llm/sdk/agents_sdk/openai_sdk.py +366 -0
  52. synnodb-0.1.0/llm/sdk/agents_sdk/openai_sdk_tools.py +336 -0
  53. synnodb-0.1.0/llm/sdk/agents_sdk/openai_token_usage.py +91 -0
  54. synnodb-0.1.0/llm/sdk/sdk_wrapper.py +121 -0
  55. synnodb-0.1.0/misc/get_db_procs.sh +56 -0
  56. synnodb-0.1.0/misc/misc/cache_bench.py +286 -0
  57. synnodb-0.1.0/misc/misc/cache_reader.py +77 -0
  58. synnodb-0.1.0/misc/misc/parquet_reader_test.cpp +278 -0
  59. synnodb-0.1.0/misc/misc/perf_control.hpp +55 -0
  60. synnodb-0.1.0/misc/misc/perf_record.py +52 -0
  61. synnodb-0.1.0/misc/misc/perf_report.py +297 -0
  62. synnodb-0.1.0/misc/misc/perf_test.cpp +137 -0
  63. synnodb-0.1.0/misc/misc/shm_test.cpp +285 -0
  64. synnodb-0.1.0/misc/router/analyze_captures.py +7 -0
  65. synnodb-0.1.0/misc/router/demo_client.py +8 -0
  66. synnodb-0.1.0/misc/router/demo_embedded.py +191 -0
  67. synnodb-0.1.0/misc/router/inspect_captures.py +7 -0
  68. synnodb-0.1.0/misc/router/pg_router.py +8 -0
  69. synnodb-0.1.0/misc/router/pgrouter/__init__.py +37 -0
  70. synnodb-0.1.0/misc/router/pgrouter/__main__.py +5 -0
  71. synnodb-0.1.0/misc/router/pgrouter/analyze/__init__.py +16 -0
  72. synnodb-0.1.0/misc/router/pgrouter/analyze/cli.py +92 -0
  73. synnodb-0.1.0/misc/router/pgrouter/analyze/normalization.py +215 -0
  74. synnodb-0.1.0/misc/router/pgrouter/analyze/repetition.py +216 -0
  75. synnodb-0.1.0/misc/router/pgrouter/capture_files.py +41 -0
  76. synnodb-0.1.0/misc/router/pgrouter/cli.py +82 -0
  77. synnodb-0.1.0/misc/router/pgrouter/config.py +36 -0
  78. synnodb-0.1.0/misc/router/pgrouter/inspect.py +97 -0
  79. synnodb-0.1.0/misc/router/pgrouter/logging_utils.py +13 -0
  80. synnodb-0.1.0/misc/router/pgrouter/output.py +411 -0
  81. synnodb-0.1.0/misc/router/pgrouter/protocols/__init__.py +1 -0
  82. synnodb-0.1.0/misc/router/pgrouter/protocols/base.py +22 -0
  83. synnodb-0.1.0/misc/router/pgrouter/protocols/postgres/__init__.py +16 -0
  84. synnodb-0.1.0/misc/router/pgrouter/protocols/postgres/backend.py +137 -0
  85. synnodb-0.1.0/misc/router/pgrouter/protocols/postgres/catalog.py +95 -0
  86. synnodb-0.1.0/misc/router/pgrouter/protocols/postgres/constants.py +72 -0
  87. synnodb-0.1.0/misc/router/pgrouter/protocols/postgres/demo_client.py +175 -0
  88. synnodb-0.1.0/misc/router/pgrouter/protocols/postgres/encoding.py +161 -0
  89. synnodb-0.1.0/misc/router/pgrouter/protocols/postgres/frontend.py +231 -0
  90. synnodb-0.1.0/misc/router/pgrouter/protocols/postgres/intercept.py +589 -0
  91. synnodb-0.1.0/misc/router/pgrouter/protocols/postgres/pgtypes.py +48 -0
  92. synnodb-0.1.0/misc/router/pgrouter/protocols/postgres/server.py +182 -0
  93. synnodb-0.1.0/misc/router/pgrouter/protocols/postgres/value_decoding.py +205 -0
  94. synnodb-0.1.0/misc/router/pgrouter/protocols/postgres/wire.py +115 -0
  95. synnodb-0.1.0/misc/router/pgrouter/query_capture.py +71 -0
  96. synnodb-0.1.0/misc/router/pgrouter/routes.py +460 -0
  97. synnodb-0.1.0/misc/router/pgrouter/service.py +207 -0
  98. synnodb-0.1.0/misc/router/pgrouter/state.py +120 -0
  99. synnodb-0.1.0/misc/router/pgrouter/testclient.py +268 -0
  100. synnodb-0.1.0/misc/router/run_tests.py +14 -0
  101. synnodb-0.1.0/misc/router/tests/__init__.py +1 -0
  102. synnodb-0.1.0/misc/router/tests/integration_support.py +312 -0
  103. synnodb-0.1.0/misc/router/tests/test_analyze.py +310 -0
  104. synnodb-0.1.0/misc/router/tests/test_catalog_lookup.py +89 -0
  105. synnodb-0.1.0/misc/router/tests/test_cli.py +22 -0
  106. synnodb-0.1.0/misc/router/tests/test_embedded_router.py +547 -0
  107. synnodb-0.1.0/misc/router/tests/test_handlers_and_capture.py +210 -0
  108. synnodb-0.1.0/misc/router/tests/test_inspect.py +94 -0
  109. synnodb-0.1.0/misc/router/tests/test_jdbc_integration.py +138 -0
  110. synnodb-0.1.0/misc/router/tests/test_output.py +88 -0
  111. synnodb-0.1.0/misc/router/tests/test_router_integration.py +351 -0
  112. synnodb-0.1.0/misc/router/tests/test_testclient.py +26 -0
  113. synnodb-0.1.0/misc/router/tests/test_wire_decoding.py +95 -0
  114. synnodb-0.1.0/observability/analysis_model_behaviour/analyze_trace.py +323 -0
  115. synnodb-0.1.0/observability/analyze_snapshot_sizes/check_snapshots_for_col_files.py +196 -0
  116. synnodb-0.1.0/observability/analyze_snapshot_sizes/delete_snapshots_from_csv.py +324 -0
  117. synnodb-0.1.0/observability/benchmark/__init__.py +1 -0
  118. synnodb-0.1.0/observability/benchmark/__main__.py +4 -0
  119. synnodb-0.1.0/observability/benchmark/cli.py +179 -0
  120. synnodb-0.1.0/observability/benchmark/plot.py +624 -0
  121. synnodb-0.1.0/observability/benchmark/plot_by_threads.py +589 -0
  122. synnodb-0.1.0/observability/benchmark/run.py +474 -0
  123. synnodb-0.1.0/observability/benchmark/systems/__init__.py +13 -0
  124. synnodb-0.1.0/observability/benchmark/systems/base.py +15 -0
  125. synnodb-0.1.0/observability/benchmark/systems/bespoke.py +143 -0
  126. synnodb-0.1.0/observability/benchmark/systems/clickhouse.py +361 -0
  127. synnodb-0.1.0/observability/benchmark/systems/duckdb.py +62 -0
  128. synnodb-0.1.0/observability/benchmark/systems/duckdb_connection_manager.py +178 -0
  129. synnodb-0.1.0/observability/benchmark/systems/registry.py +12 -0
  130. synnodb-0.1.0/observability/benchmark/systems/track.py +143 -0
  131. synnodb-0.1.0/observability/benchmark/systems/umbra.py +603 -0
  132. synnodb-0.1.0/observability/benchmark/writer.py +59 -0
  133. synnodb-0.1.0/observability/get_mem_budget_setting_from_run.py +103 -0
  134. synnodb-0.1.0/observability/live_ui/live_dashboard.py +420 -0
  135. synnodb-0.1.0/observability/logging/cloc_utils.py +90 -0
  136. synnodb-0.1.0/observability/logging/debug_logger.py +127 -0
  137. synnodb-0.1.0/observability/logging/logger.py +127 -0
  138. synnodb-0.1.0/observability/logging/notify.py +100 -0
  139. synnodb-0.1.0/observability/logging/run_stats_collector.py +456 -0
  140. synnodb-0.1.0/observability/logging/run_stats_drain.py +160 -0
  141. synnodb-0.1.0/observability/logging/truncate_csv.py +47 -0
  142. synnodb-0.1.0/observability/logging/truncate_model_log.py +52 -0
  143. synnodb-0.1.0/observability/logging/wandb_api_helper.py +81 -0
  144. synnodb-0.1.0/observability/logging/wandb_plots_gen.py +12 -0
  145. synnodb-0.1.0/observability/logging/weave_cache.py +8 -0
  146. synnodb-0.1.0/observability/plots/animated_plot/config.py +64 -0
  147. synnodb-0.1.0/observability/plots/animated_plot/demo_timeline_engine.py +114 -0
  148. synnodb-0.1.0/observability/plots/animated_plot/live_plot.py +157 -0
  149. synnodb-0.1.0/observability/plots/animated_plot/make_mp4.py +94 -0
  150. synnodb-0.1.0/observability/plots/animated_plot/render.py +127 -0
  151. synnodb-0.1.0/observability/plots/animated_plot/screen_renderer.py +846 -0
  152. synnodb-0.1.0/observability/plots/animated_plot/terminal_input_builder.py +245 -0
  153. synnodb-0.1.0/observability/plots/classify_bespoke_execution/classify_execution.py +815 -0
  154. synnodb-0.1.0/observability/plots/classify_bespoke_execution/strategy_display_names.py +99 -0
  155. synnodb-0.1.0/observability/plots/classify_bespoke_multi_threading/classify_multi_threading.py +886 -0
  156. synnodb-0.1.0/observability/plots/classify_bespoke_storage/classify_storage.py +813 -0
  157. synnodb-0.1.0/observability/plots/classify_bespoke_storage/llms.py +1152 -0
  158. synnodb-0.1.0/observability/plots/flat_vs_bespoke_storage.py +209 -0
  159. synnodb-0.1.0/observability/plots/plot_page1.py +238 -0
  160. synnodb-0.1.0/observability/plots/plot_timeline.py +787 -0
  161. synnodb-0.1.0/observability/plots/plot_turns_vs_speedup.py +287 -0
  162. synnodb-0.1.0/observability/plots/utils/annotate_speedup_col.py +223 -0
  163. synnodb-0.1.0/observability/plots/utils/per_stage_data_prep.py +391 -0
  164. synnodb-0.1.0/observability/plots/utils/per_stage_plot.py +485 -0
  165. synnodb-0.1.0/observability/plots/utils/wandb_trace_preprocessor.py +415 -0
  166. synnodb-0.1.0/observability/plots/utils/wandb_utils.py +253 -0
  167. synnodb-0.1.0/observability/ui_template_runner/bespoke_service.py +297 -0
  168. synnodb-0.1.0/observability/ui_template_runner/clickhouse_service.py +197 -0
  169. synnodb-0.1.0/observability/ui_template_runner/deploy_code/prepare_code_zip.py +149 -0
  170. synnodb-0.1.0/observability/ui_template_runner/run_generated_code_service.py +1366 -0
  171. synnodb-0.1.0/observability/ui_template_runner/run_generated_code_static.py +159 -0
  172. synnodb-0.1.0/observability/ui_template_runner/service_notify.py +146 -0
  173. synnodb-0.1.0/observability/ui_template_runner/telemetry/telemetry_service.py +156 -0
  174. synnodb-0.1.0/observability/ui_template_runner/ui_handler.py +39 -0
  175. synnodb-0.1.0/observability/ui_template_runner/umbra_service.py +192 -0
  176. synnodb-0.1.0/pyproject.toml +58 -0
  177. synnodb-0.1.0/setup.cfg +4 -0
  178. synnodb-0.1.0/synnodb.egg-info/PKG-INFO +146 -0
  179. synnodb-0.1.0/synnodb.egg-info/SOURCES.txt +243 -0
  180. synnodb-0.1.0/synnodb.egg-info/dependency_links.txt +1 -0
  181. synnodb-0.1.0/synnodb.egg-info/requires.txt +27 -0
  182. synnodb-0.1.0/synnodb.egg-info/top_level.txt +9 -0
  183. synnodb-0.1.0/synth_framework/git_snapshotter.py +596 -0
  184. synnodb-0.1.0/synth_framework/handle_prompt.py +308 -0
  185. synnodb-0.1.0/synth_framework/runtime_tracker.py +22 -0
  186. synnodb-0.1.0/tests/test_apply_patch_resilience.py +188 -0
  187. synnodb-0.1.0/tests/test_cached_compaction_session.py +148 -0
  188. synnodb-0.1.0/tests/test_claude_compaction_helper.py +49 -0
  189. synnodb-0.1.0/tests/test_compaction_trigger.py +71 -0
  190. synnodb-0.1.0/tests/test_debug_logger.py +187 -0
  191. synnodb-0.1.0/tests/test_filenames.py +6 -0
  192. synnodb-0.1.0/tests/test_gen_ceb_query.py +381 -0
  193. synnodb-0.1.0/tests/test_query_validator_cache.py +86 -0
  194. synnodb-0.1.0/tests/test_replace_in_file.py +261 -0
  195. synnodb-0.1.0/tests/test_run_compaction.py +175 -0
  196. synnodb-0.1.0/tests/test_run_stats_collector_cache_status.py +43 -0
  197. synnodb-0.1.0/tests/test_sandbox.py +291 -0
  198. synnodb-0.1.0/tests/test_sql_utils.py +126 -0
  199. synnodb-0.1.0/tests/test_truncate_model_final_output.py +645 -0
  200. synnodb-0.1.0/tests/test_update_file_diff_repair.py +207 -0
  201. synnodb-0.1.0/tests/test_validate_tool_old_output_parser.py +117 -0
  202. synnodb-0.1.0/tests/test_workload_provider_args.py +36 -0
  203. synnodb-0.1.0/tests/test_workspace_editor_cache_replay.py +127 -0
  204. synnodb-0.1.0/tools/__init__.py +0 -0
  205. synnodb-0.1.0/tools/compile.py +83 -0
  206. synnodb-0.1.0/tools/custom_apply_patch.py +62 -0
  207. synnodb-0.1.0/tools/custom_replace_in_file.py +39 -0
  208. synnodb-0.1.0/tools/run.py +652 -0
  209. synnodb-0.1.0/tools/run_tool_mode.py +8 -0
  210. synnodb-0.1.0/tools/sandbox.py +464 -0
  211. synnodb-0.1.0/tools/shell_executor.py +319 -0
  212. synnodb-0.1.0/tools/tool_call_error_logger.py +55 -0
  213. synnodb-0.1.0/tools/validate/old/parse_output.py +58 -0
  214. synnodb-0.1.0/tools/validate/old/query_cache.py +491 -0
  215. synnodb-0.1.0/tools/validate/query_validator_class.py +520 -0
  216. synnodb-0.1.0/tools/validate/run_and_check_queries.py +504 -0
  217. synnodb-0.1.0/tools/workspace_editor.py +860 -0
  218. synnodb-0.1.0/utils/cli_config.py +387 -0
  219. synnodb-0.1.0/utils/confirm_dialog.py +22 -0
  220. synnodb-0.1.0/utils/conv_name_utils.py +53 -0
  221. synnodb-0.1.0/utils/core_utils.py +36 -0
  222. synnodb-0.1.0/utils/drop_caches.py +56 -0
  223. synnodb-0.1.0/utils/gen_common.py +102 -0
  224. synnodb-0.1.0/utils/get_sample_q_args.py +45 -0
  225. synnodb-0.1.0/utils/hugepages.py +68 -0
  226. synnodb-0.1.0/utils/json_utils.py +24 -0
  227. synnodb-0.1.0/utils/model_setup.py +50 -0
  228. synnodb-0.1.0/utils/pkgconfig.py +38 -0
  229. synnodb-0.1.0/utils/snapshot_utils.py +35 -0
  230. synnodb-0.1.0/utils/sql_utils.py +31 -0
  231. synnodb-0.1.0/utils/utils.py +198 -0
  232. synnodb-0.1.0/workloads/dataset/custom_scaler/check_parquet_dtypes_match.py +486 -0
  233. synnodb-0.1.0/workloads/dataset/custom_scaler/scale_parquet.py +549 -0
  234. synnodb-0.1.0/workloads/dataset/gen_ceb/ceb_queries.py +516 -0
  235. synnodb-0.1.0/workloads/dataset/gen_ceb/gen_ceb_query.py +541 -0
  236. synnodb-0.1.0/workloads/dataset/gen_ceb/imdb_schema.py +172 -0
  237. synnodb-0.1.0/workloads/dataset/gen_tpc_h_data.py +104 -0
  238. synnodb-0.1.0/workloads/dataset/gen_tpch/gen_tpch_query.py +315 -0
  239. synnodb-0.1.0/workloads/dataset/gen_tpch/tpch_queries.py +724 -0
  240. synnodb-0.1.0/workloads/dataset/gen_tpch_single_table/tpch_query_generator_single_query.py +317 -0
  241. synnodb-0.1.0/workloads/query_execution_cache.py +266 -0
  242. synnodb-0.1.0/workloads/system_factory.py +25 -0
  243. synnodb-0.1.0/workloads/system_factory_olap.py +75 -0
  244. synnodb-0.1.0/workloads/workload_provider.py +185 -0
  245. synnodb-0.1.0/workloads/workload_provider_olap.py +472 -0
synnodb-0.1.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
synnodb-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,146 @@
1
+ Metadata-Version: 2.4
2
+ Name: synnodb
3
+ Version: 0.1.0
4
+ Summary: Synthesizing Databases for your Workload
5
+ Requires-Python: >=3.13
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Requires-Dist: anthropic>=0.84.0
9
+ Requires-Dist: clickhouse-connect>=0.14.0
10
+ Requires-Dist: chardet<6,>=5
11
+ Requires-Dist: charset-normalizer>=3.4.5
12
+ Requires-Dist: duckdb>=1.4.3
13
+ Requires-Dist: geoip2>=5.2.0
14
+ Requires-Dist: ipykernel>=7.1.0
15
+ Requires-Dist: ipywidgets>=8.1.8
16
+ Requires-Dist: landlock>=1.0.0.dev5
17
+ Requires-Dist: litellm>=1.82.0
18
+ Requires-Dist: matplotlib>=3.10.8
19
+ Requires-Dist: openai>=2.11.0
20
+ Requires-Dist: openai-agents[litellm]>=0.15.0
21
+ Requires-Dist: pandas>=2.3.3
22
+ Requires-Dist: prompt-toolkit>=3.0.52
23
+ Requires-Dist: psycopg2-binary>=2.9.11
24
+ Requires-Dist: pytest>=9.0.2
25
+ Requires-Dist: pytest-asyncio>=1.3.0
26
+ Requires-Dist: python-dotenv>=1.2.1
27
+ Requires-Dist: requests>=2.32.5
28
+ Requires-Dist: seaborn>=0.13.2
29
+ Requires-Dist: tabulate>=0.9.0
30
+ Requires-Dist: urllib3>=2.6.3
31
+ Requires-Dist: weave>=0.52.22
32
+ Requires-Dist: pyarrow>=23.0.1
33
+ Requires-Dist: wandb>=0.26.0
34
+ Requires-Dist: dotenv>=0.9.9
35
+ Dynamic: license-file
36
+
37
+ # SynnoDB
38
+ SynnoDB Repository (internal)
39
+
40
+
41
+ ## CMDs at the moment:
42
+
43
+ ```
44
+ # gen storage plan
45
+ python run_gen_storage_plan.py --model anthropic/claude-sonnet-4-6 --queries 1-22 --benchmark tpch --auto_finish --disable_openai_tracing --notify --db_storage ssd --auto_u
46
+
47
+ # run gen base
48
+ python run_gen_base_impl.py --model anthropic/claude-sonnet-4-6 --benchmark tpch --bespoke_storage --storage_plan_run_id 8xn0t04p --queries 1-22 --auto_finish --disable_openai_tracing --notify --db_storage ssd --auto_u
49
+
50
+ # run optim
51
+ python run_optim_loop.py --model anthropic/claude-sonnet-4-6 --benchmark tpch --bespoke_storage --base_impl_run_id q45vm9fz --queries 1-22 --disable_openai_tracing --auto_u --auto_finish --notify --db_storage ssd
52
+
53
+ # test correctness at larger SF
54
+ python run_check_sf_correctness.py --model anthropic/claude-sonnet-4-6 --benchmark tpch --bespoke_storage --source_run_id 0br4bjqb --queries 1-22 --disable_openai_tracing --auto_u --auto_finish --notify --db_storage ssd --target_sf 50
55
+
56
+ # add multi-threading
57
+ python run_add_multi_threading.py --model anthropic/claude-sonnet-4-6 --benchmark tpch --bespoke_storage --optim_run_id 0br4bjqb --queries 1-22 --disable_openai_tracing --auto_u --auto_finish --notify --db_storage ssd
58
+ ```
59
+
60
+ ## Prerequisites
61
+
62
+ - Linux (x86-64)
63
+ - C++ toolchain (`gcc` / `clang`)
64
+ - Python 3.10+
65
+ - [`uv`](https://github.com/astral-sh/uv) package manager
66
+ - Apache Arrow and Parquet development libraries
67
+ - [`cloc`](https://github.com/AlDanial/cloc) (used to track generated code size)
68
+
69
+ ## Installation
70
+
71
+ ### 1. Install uv
72
+
73
+ ```bash
74
+ curl -LsSf https://astral.sh/uv/install.sh | sh
75
+ ```
76
+
77
+ *Optional:* Setup Weights & Biases (wandb) account and API key for experiment tracking. You can sign up for free at [https://wandb.ai/](https://wandb.ai/).
78
+
79
+ ### 2. Install Arrow and Parquet libraries
80
+
81
+ ```bash
82
+ wget https://packages.apache.org/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
83
+ sudo apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
84
+ sudo apt update
85
+ sudo apt install -y libarrow-dev libparquet-dev parquet-tools
86
+ ```
87
+
88
+ ### 3. Install `cloc`
89
+
90
+ ```bash
91
+ sudo apt install -y cloc
92
+ ```
93
+
94
+ ### 4. Install Python dependencies
95
+
96
+ ```bash
97
+ uv sync
98
+ ```
99
+
100
+ ### 5. Configure environment
101
+
102
+ Create a `.env` file with your API keys:
103
+
104
+ ```bash
105
+ OPENAI_API_KEY=...
106
+ WANDB_ENTITY=... # Optional, e.g. "my-team"
107
+ WANDB_PROJECT=... # Optional, e.g. "bespoke-olap"
108
+ ```
109
+
110
+ ### 6. Prepare Parquet data
111
+
112
+ Place TPC-H or CEB Parquet files in your artifacts directory (default: `/mnt/labstore/bespoke_olap/`). The path can be overridden with `--base_parquet_dir`.
113
+
114
+
115
+ ## Development
116
+
117
+ ### Inspect running engine processes
118
+
119
+ ```bash
120
+ watch -n1 -d ./misc/get_db_procs.sh
121
+ ```
122
+
123
+ ### Remote snapshot cache (optional)
124
+
125
+ To share snapshots across machines, set up a bare git repository and start a git daemon:
126
+
127
+ ```bash
128
+ git init --bare synno_cache.git
129
+ touch synno_cache.git/git-daemon-export-ok
130
+
131
+ git daemon \
132
+ --base-path=./ \
133
+ --export-all \
134
+ --enable=receive-pack \
135
+ --reuseaddr \
136
+ --verbose
137
+ ```
138
+
139
+ The cache URL is `git://<hostname>/synno_cache.git`. Pass it via the `.env` file, or leave it unset to use only the local snapshot cache (with `--disable_repo_sync`).
140
+
141
+
142
+ Delete snapshot:
143
+ ```
144
+ git -C /home/jwehrstein/bespoke_olap/output --git-dir=/home/jwehrstein/bespoke_olap/output/.git update-ref -d
145
+ refs/snapshots/snapshot-<hash>
146
+ ```
@@ -0,0 +1,110 @@
1
+ # SynnoDB
2
+ SynnoDB Repository (internal)
3
+
4
+
5
+ ## CMDs at the moment:
6
+
7
+ ```
8
+ # gen storage plan
9
+ python run_gen_storage_plan.py --model anthropic/claude-sonnet-4-6 --queries 1-22 --benchmark tpch --auto_finish --disable_openai_tracing --notify --db_storage ssd --auto_u
10
+
11
+ # run gen base
12
+ python run_gen_base_impl.py --model anthropic/claude-sonnet-4-6 --benchmark tpch --bespoke_storage --storage_plan_run_id 8xn0t04p --queries 1-22 --auto_finish --disable_openai_tracing --notify --db_storage ssd --auto_u
13
+
14
+ # run optim
15
+ python run_optim_loop.py --model anthropic/claude-sonnet-4-6 --benchmark tpch --bespoke_storage --base_impl_run_id q45vm9fz --queries 1-22 --disable_openai_tracing --auto_u --auto_finish --notify --db_storage ssd
16
+
17
+ # test correctness at larger SF
18
+ python run_check_sf_correctness.py --model anthropic/claude-sonnet-4-6 --benchmark tpch --bespoke_storage --source_run_id 0br4bjqb --queries 1-22 --disable_openai_tracing --auto_u --auto_finish --notify --db_storage ssd --target_sf 50
19
+
20
+ # add multi-threading
21
+ python run_add_multi_threading.py --model anthropic/claude-sonnet-4-6 --benchmark tpch --bespoke_storage --optim_run_id 0br4bjqb --queries 1-22 --disable_openai_tracing --auto_u --auto_finish --notify --db_storage ssd
22
+ ```
23
+
24
+ ## Prerequisites
25
+
26
+ - Linux (x86-64)
27
+ - C++ toolchain (`gcc` / `clang`)
28
+ - Python 3.10+
29
+ - [`uv`](https://github.com/astral-sh/uv) package manager
30
+ - Apache Arrow and Parquet development libraries
31
+ - [`cloc`](https://github.com/AlDanial/cloc) (used to track generated code size)
32
+
33
+ ## Installation
34
+
35
+ ### 1. Install uv
36
+
37
+ ```bash
38
+ curl -LsSf https://astral.sh/uv/install.sh | sh
39
+ ```
40
+
41
+ *Optional:* Setup Weights & Biases (wandb) account and API key for experiment tracking. You can sign up for free at [https://wandb.ai/](https://wandb.ai/).
42
+
43
+ ### 2. Install Arrow and Parquet libraries
44
+
45
+ ```bash
46
+ wget https://packages.apache.org/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
47
+ sudo apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
48
+ sudo apt update
49
+ sudo apt install -y libarrow-dev libparquet-dev parquet-tools
50
+ ```
51
+
52
+ ### 3. Install `cloc`
53
+
54
+ ```bash
55
+ sudo apt install -y cloc
56
+ ```
57
+
58
+ ### 4. Install Python dependencies
59
+
60
+ ```bash
61
+ uv sync
62
+ ```
63
+
64
+ ### 5. Configure environment
65
+
66
+ Create a `.env` file with your API keys:
67
+
68
+ ```bash
69
+ OPENAI_API_KEY=...
70
+ WANDB_ENTITY=... # Optional, e.g. "my-team"
71
+ WANDB_PROJECT=... # Optional, e.g. "bespoke-olap"
72
+ ```
73
+
74
+ ### 6. Prepare Parquet data
75
+
76
+ Place TPC-H or CEB Parquet files in your artifacts directory (default: `/mnt/labstore/bespoke_olap/`). The path can be overridden with `--base_parquet_dir`.
77
+
78
+
79
+ ## Development
80
+
81
+ ### Inspect running engine processes
82
+
83
+ ```bash
84
+ watch -n1 -d ./misc/get_db_procs.sh
85
+ ```
86
+
87
+ ### Remote snapshot cache (optional)
88
+
89
+ To share snapshots across machines, set up a bare git repository and start a git daemon:
90
+
91
+ ```bash
92
+ git init --bare synno_cache.git
93
+ touch synno_cache.git/git-daemon-export-ok
94
+
95
+ git daemon \
96
+ --base-path=./ \
97
+ --export-all \
98
+ --enable=receive-pack \
99
+ --reuseaddr \
100
+ --verbose
101
+ ```
102
+
103
+ The cache URL is `git://<hostname>/synno_cache.git`. Pass it via the `.env` file, or leave it unset to use only the local snapshot cache (with `--disable_repo_sync`).
104
+
105
+
106
+ Delete snapshot:
107
+ ```
108
+ git -C /home/jwehrstein/bespoke_olap/output --git-dir=/home/jwehrstein/bespoke_olap/output/.git update-ref -d
109
+ refs/snapshots/snapshot-<hash>
110
+ ```