synth-ai 0.2.13.dev1__py3-none-any.whl → 0.2.14__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.

Potentially problematic release.


This version of synth-ai might be problematic. Click here for more details.

Files changed (291) hide show
  1. examples/multi_step/configs/README_verilog_rl.md +77 -0
  2. examples/multi_step/configs/VERILOG_REWARDS.md +90 -0
  3. examples/multi_step/configs/VERILOG_RL_CHECKLIST.md +183 -0
  4. examples/multi_step/configs/crafter_eval_synth_qwen4b.toml +35 -0
  5. examples/multi_step/configs/crafter_eval_text_only_groq_qwen32b.toml +36 -0
  6. examples/multi_step/configs/crafter_rl_stepwise_hosted_judge.toml +17 -5
  7. examples/multi_step/configs/crafter_synth_backend.md +40 -0
  8. examples/multi_step/configs/verilog_eval_groq_qwen32b.toml +31 -0
  9. examples/multi_step/configs/verilog_eval_synth_qwen8b.toml +33 -0
  10. examples/multi_step/configs/verilog_rl_lora.toml +190 -0
  11. examples/multi_step/judges/crafter_backend_judge.py +220 -0
  12. examples/multi_step/judges/verilog_backend_judge.py +234 -0
  13. examples/multi_step/readme.md +48 -0
  14. examples/multi_step/verilog_rl_lora.md +218 -0
  15. examples/qwen_coder/configs/coder_lora_30b.toml +1 -1
  16. examples/sft/evaluate.py +2 -0
  17. examples/sft/generate_traces.py +2 -0
  18. examples/swe/task_app/grpo_swe_mini.py +56 -26
  19. examples/swe/task_app/hosted/rollout.py +42 -0
  20. examples/swe/task_app/hosted/test_service.py +5 -6
  21. examples/task_apps/IMAGE_ONLY_EVAL_QUICKSTART.md +258 -0
  22. examples/task_apps/TESTING.md +275 -0
  23. examples/task_apps/__init__.py +0 -0
  24. examples/task_apps/crafter/CREATE_SFT_DATASET.md +273 -0
  25. examples/task_apps/crafter/EVAL_IMAGE_ONLY_RESULTS.md +152 -0
  26. examples/task_apps/crafter/FILTER_COMMAND_STATUS.md +174 -0
  27. examples/task_apps/crafter/FILTER_COMMAND_SUCCESS.md +268 -0
  28. examples/task_apps/crafter/QUERY_EXAMPLES.md +203 -0
  29. examples/task_apps/crafter/README_IMAGE_ONLY_EVAL.md +316 -0
  30. examples/task_apps/crafter/__init__.py +0 -0
  31. examples/task_apps/crafter/eval_image_only_gpt4o.toml +28 -0
  32. examples/task_apps/crafter/eval_text_only_groq_llama.toml +36 -0
  33. examples/task_apps/crafter/filter_sft_dataset.toml +16 -0
  34. examples/task_apps/crafter/task_app/__init__.py +5 -0
  35. examples/{warming_up_to_rl → task_apps/crafter}/task_app/grpo_crafter.py +324 -21
  36. examples/{warming_up_to_rl → task_apps/crafter}/task_app/grpo_crafter_task_app.py +1 -1
  37. examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/envs/crafter/environment.py +10 -0
  38. examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/envs/crafter/policy.py +76 -7
  39. examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/envs/crafter/react_agent.py +17 -2
  40. examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/inference/openai_client.py +25 -3
  41. examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/policy_routes.py +77 -4
  42. examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/rollout.py +117 -9
  43. examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/test_service.py +5 -6
  44. examples/task_apps/crafter/task_app/synth_envs_hosted/utils.py +218 -0
  45. examples/task_apps/dev/pokemon_emerald/__init__.py +2 -0
  46. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/README.md +811 -0
  47. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/agent/__init__.py +120 -0
  48. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/agent/action.py +160 -0
  49. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/agent/memory.py +155 -0
  50. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/agent/perception.py +69 -0
  51. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/agent/planning.py +96 -0
  52. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/agent/simple.py +1502 -0
  53. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/agent/system_prompt.py +4 -0
  54. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/grab_map.py +68 -0
  55. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/manual.py +216 -0
  56. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/pokemon_env/__init__.py +35 -0
  57. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/pokemon_env/emerald_utils.py +631 -0
  58. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/pokemon_env/emulator.py +1544 -0
  59. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/pokemon_env/enums.py +1428 -0
  60. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/pokemon_env/memory_reader.py +4848 -0
  61. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/pokemon_env/types.py +41 -0
  62. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/pokemon_env/utils.py +298 -0
  63. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/pyproject.toml +95 -0
  64. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/run.py +204 -0
  65. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/server/__init__.py +0 -0
  66. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/server/app.py +2152 -0
  67. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/server/client.py +429 -0
  68. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/server/frame_server.py +155 -0
  69. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/README.md +78 -0
  70. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/__init__.py +0 -0
  71. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/run_tests.py +122 -0
  72. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_agent_direct.py +76 -0
  73. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_agent_prompts.py +413 -0
  74. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_battle_state_formatting.py +204 -0
  75. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_dialogue_detection.py +133 -0
  76. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_dialogue_detection_comprehensive.py +229 -0
  77. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_direct_agent_emulator.py +300 -0
  78. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_fps_adjustment_pytest.py +205 -0
  79. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_house_to_outside_direct.py +200 -0
  80. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_house_to_outside_transition.py +284 -0
  81. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_map_ground_truth_comparison.py +468 -0
  82. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_memory_map.py +575 -0
  83. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_server_map_validation.py +311 -0
  84. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_torchic_state.py +259 -0
  85. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/__init__.py +0 -0
  86. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/anticheat.py +372 -0
  87. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/checkpoint.py +296 -0
  88. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/error_handler.py +275 -0
  89. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/get_local_ip.py +22 -0
  90. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/helpers.py +44 -0
  91. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/llm_logger.py +514 -0
  92. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/map_formatter.py +415 -0
  93. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/map_stitcher.py +1763 -0
  94. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/map_stitcher_singleton.py +33 -0
  95. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/map_trimmer.py +106 -0
  96. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/map_visualizer.py +334 -0
  97. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/ocr_dialogue.py +1020 -0
  98. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/recording.py +188 -0
  99. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/state_formatter.py +1481 -0
  100. examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/vlm.py +862 -0
  101. examples/task_apps/dev/pokemon_emerald/modal_app.py +114 -0
  102. examples/task_apps/dev/pokemon_emerald/task_app/README.md +81 -0
  103. examples/task_apps/dev/pokemon_emerald/task_app/__init__.py +6 -0
  104. examples/task_apps/dev/pokemon_emerald/task_app/pokemon_emerald.py +685 -0
  105. examples/task_apps/enron/__init__.py +1 -0
  106. examples/task_apps/enron/eval_groq_qwen32.toml +16 -0
  107. examples/task_apps/enron/filter_sft.toml +5 -0
  108. examples/task_apps/enron/task_app/README.md +14 -0
  109. examples/task_apps/enron/task_app/__init__.py +1 -0
  110. examples/task_apps/enron/task_app/grpo_enron.py +906 -0
  111. examples/task_apps/enron/task_app/grpo_enron_task_app.py +146 -0
  112. examples/task_apps/enron/tests/__init__.py +4 -0
  113. examples/task_apps/enron/tests/conftest.py +115 -0
  114. examples/task_apps/enron/tests/integration/__init__.py +4 -0
  115. examples/task_apps/enron/tests/integration/test_enron_eval.py +179 -0
  116. examples/task_apps/enron/tests/integration/test_enron_rollout.py +135 -0
  117. examples/task_apps/enron/tests/unit/__init__.py +4 -0
  118. examples/task_apps/enron/tests/unit/test_enron_environment.py +126 -0
  119. examples/task_apps/math/__init__.py +0 -0
  120. examples/{rl/task_app → task_apps/math}/math_single_step.py +19 -10
  121. examples/task_apps/pokemon_battle/__init__.py +2 -0
  122. examples/task_apps/pokemon_battle/modal_app.py +104 -0
  123. examples/task_apps/pokemon_battle/task_app/README.md +68 -0
  124. examples/task_apps/pokemon_battle/task_app/__init__.py +6 -0
  125. examples/task_apps/pokemon_battle/task_app/pokemon_showdown.py +932 -0
  126. examples/task_apps/pokemon_red/EVAL_IMAGE_ONLY_COMPLETE.md +283 -0
  127. examples/task_apps/pokemon_red/EVAL_IMAGE_ONLY_STATUS.md +155 -0
  128. examples/task_apps/pokemon_red/README.md +357 -0
  129. examples/task_apps/pokemon_red/README_IMAGE_ONLY_EVAL.md +415 -0
  130. examples/task_apps/pokemon_red/__init__.py +3 -0
  131. examples/task_apps/pokemon_red/eval_image_only_gpt4o.toml +29 -0
  132. examples/task_apps/pokemon_red/eval_pokemon_red_policy.py +225 -0
  133. examples/task_apps/pokemon_red/pallet_town_rl_config.toml +75 -0
  134. examples/task_apps/pokemon_red/task_app.py +799 -0
  135. examples/task_apps/pokemon_red/test_pallet_town_rewards.py +193 -0
  136. examples/task_apps/sokoban/README.md +307 -0
  137. examples/task_apps/sokoban/__init__.py +3 -0
  138. examples/task_apps/sokoban/eval_groq_qwen32.toml +16 -0
  139. examples/task_apps/sokoban/eval_openai_gpt5.toml +16 -0
  140. examples/task_apps/sokoban/filter_sft.toml +5 -0
  141. examples/task_apps/sokoban/task_app.py +1058 -0
  142. examples/task_apps/sokoban/tests/__init__.py +4 -0
  143. examples/task_apps/sokoban/tests/conftest.py +113 -0
  144. examples/task_apps/sokoban/tests/integration/__init__.py +4 -0
  145. examples/task_apps/sokoban/tests/integration/test_sokoban_eval.py +57 -0
  146. examples/task_apps/sokoban/tests/integration/test_sokoban_rollout.py +198 -0
  147. examples/task_apps/sokoban/tests/unit/__init__.py +4 -0
  148. examples/task_apps/sokoban/tests/unit/test_sokoban_environment.py +114 -0
  149. examples/task_apps/verilog/__init__.py +1 -0
  150. examples/task_apps/verilog/eval_groq_qwen32b.toml +24 -0
  151. examples/task_apps/verilog/filter_sft.toml +5 -0
  152. examples/task_apps/verilog/task_app/README.md +12 -0
  153. examples/task_apps/verilog/task_app/__init__.py +1 -0
  154. examples/task_apps/verilog/task_app/grpo_verilog.py +1166 -0
  155. examples/task_apps/verilog/task_app/grpo_verilog_task_app.py +145 -0
  156. examples/task_apps/verilog/tests/__init__.py +4 -0
  157. examples/task_apps/verilog/tests/conftest.py +115 -0
  158. examples/task_apps/verilog/tests/integration/__init__.py +4 -0
  159. examples/task_apps/verilog/tests/integration/test_verilog_eval.py +181 -0
  160. examples/task_apps/verilog/tests/integration/test_verilog_rollout.py +55 -0
  161. examples/task_apps/verilog/tests/unit/__init__.py +4 -0
  162. examples/task_apps/verilog/tests/unit/test_verilog_scoring.py +118 -0
  163. examples/vlm/crafter_openai_vlm_agent.py +4 -4
  164. examples/vlm/run_crafter_vlm_benchmark.py +4 -4
  165. examples/warming_up_to_rl/groq_test.py +2 -0
  166. examples/warming_up_to_rl/run_local_rollout.py +2 -0
  167. examples/warming_up_to_rl/run_local_rollout_modal.py +2 -0
  168. examples/warming_up_to_rl/run_local_rollout_parallel.py +2 -0
  169. examples/warming_up_to_rl/run_local_rollout_traced.py +2 -0
  170. examples/warming_up_to_rl/run_rollout_remote.py +2 -0
  171. examples/workflows/__init__.py +0 -0
  172. examples/workflows/math_rl/__init__.py +0 -0
  173. examples/workflows/math_rl/download_dataset.py +80 -0
  174. synth_ai/__init__.py +2 -2
  175. synth_ai/api/models/supported.py +1 -0
  176. synth_ai/api/train/builders.py +25 -11
  177. synth_ai/api/train/cli.py +12 -6
  178. synth_ai/api/train/configs/__init__.py +10 -10
  179. synth_ai/api/train/configs/rl.py +5 -4
  180. synth_ai/api/train/configs/sft.py +4 -3
  181. synth_ai/api/train/env_resolver.py +5 -2
  182. synth_ai/api/train/supported_algos.py +10 -5
  183. synth_ai/api/train/utils.py +7 -4
  184. synth_ai/cli/__init__.py +48 -59
  185. synth_ai/cli/_modal_wrapper.py +3 -2
  186. synth_ai/cli/_storage.py +4 -3
  187. synth_ai/cli/_validate_task_app.py +11 -0
  188. synth_ai/cli/balance.py +4 -3
  189. synth_ai/cli/calc.py +2 -2
  190. synth_ai/cli/demo.py +14 -7
  191. synth_ai/cli/legacy_root_backup.py +1 -1
  192. synth_ai/cli/recent.py +1 -1
  193. synth_ai/cli/rl_demo.py +8 -7
  194. synth_ai/cli/root.py +0 -97
  195. synth_ai/cli/status.py +1 -1
  196. synth_ai/cli/task_apps.py +1922 -190
  197. synth_ai/cli/traces.py +1 -1
  198. synth_ai/cli/tui.py +57 -0
  199. synth_ai/cli/turso.py +1 -1
  200. synth_ai/cli/watch.py +1 -1
  201. synth_ai/demos/demo_task_apps/crafter/grpo_crafter_task_app.py +29 -17
  202. synth_ai/environments/examples/crafter_classic/environment.py +1 -1
  203. synth_ai/environments/examples/enron/engine.py +7 -2
  204. synth_ai/environments/examples/enron/environment.py +68 -0
  205. synth_ai/environments/examples/red/engine.py +27 -0
  206. synth_ai/environments/examples/red/engine_helpers/memory_map.py +7 -0
  207. synth_ai/environments/examples/red/engine_helpers/reward_library/pallet_town_progression.py +477 -0
  208. synth_ai/environments/examples/red/engine_helpers/state_extraction.py +32 -0
  209. synth_ai/environments/examples/red/environment.py +60 -0
  210. synth_ai/environments/examples/sokoban/taskset.py +116 -0
  211. synth_ai/environments/examples/verilog/engine.py +104 -12
  212. synth_ai/evals/client.py +58 -61
  213. synth_ai/jobs/client.py +16 -4
  214. synth_ai/judge_schemas.py +9 -9
  215. synth_ai/py.typed +0 -0
  216. synth_ai/task/__init__.py +24 -5
  217. synth_ai/task/apps/__init__.py +1 -0
  218. synth_ai/task/config.py +257 -0
  219. synth_ai/task/contracts.py +138 -39
  220. synth_ai/task/proxy.py +48 -56
  221. synth_ai/task/rubrics/__init__.py +56 -0
  222. synth_ai/task/rubrics/loaders.py +152 -0
  223. synth_ai/task/rubrics/models.py +57 -0
  224. synth_ai/task/rubrics/scoring.py +116 -0
  225. synth_ai/{rubrics/validators.py → task/rubrics/strict.py} +53 -30
  226. synth_ai/task/server.py +8 -7
  227. synth_ai/task/trace_correlation_helpers.py +315 -0
  228. synth_ai/task/validators.py +413 -6
  229. synth_ai/tracing_v3/abstractions.py +3 -3
  230. synth_ai/tracing_v3/decorators.py +7 -3
  231. synth_ai/tracing_v3/llm_call_record_helpers.py +5 -5
  232. synth_ai/tracing_v3/replica_sync.py +4 -4
  233. synth_ai/tracing_v3/serialization.py +5 -5
  234. synth_ai/tracing_v3/session_tracer.py +16 -6
  235. synth_ai/tracing_v3/storage/base.py +29 -29
  236. synth_ai/tracing_v3/storage/config.py +3 -3
  237. synth_ai/tracing_v3/trace_utils.py +317 -0
  238. synth_ai/tracing_v3/turso/daemon.py +8 -7
  239. synth_ai/tracing_v3/turso/native_manager.py +66 -43
  240. synth_ai/tracing_v3/utils.py +3 -3
  241. synth_ai/tui/__init__.py +5 -0
  242. synth_ai/tui/__main__.py +13 -0
  243. synth_ai/tui/cli/__init__.py +1 -0
  244. synth_ai/tui/cli/query_experiments.py +164 -0
  245. synth_ai/tui/cli/query_experiments_v3.py +164 -0
  246. synth_ai/tui/dashboard.py +906 -0
  247. {synth_ai-0.2.13.dev1.dist-info → synth_ai-0.2.14.dist-info}/METADATA +4 -1
  248. {synth_ai-0.2.13.dev1.dist-info → synth_ai-0.2.14.dist-info}/RECORD +278 -126
  249. examples/agora_ex/README_MoE.md +0 -224
  250. examples/agora_ex/__init__.py +0 -7
  251. examples/agora_ex/agora_ex.py +0 -65
  252. examples/agora_ex/agora_ex_task_app.py +0 -590
  253. examples/agora_ex/configs/rl_lora_qwen3_moe_2xh200.toml +0 -121
  254. examples/agora_ex/reward_fn_grpo-human.py +0 -129
  255. examples/agora_ex/system_prompt_CURRENT.md +0 -63
  256. examples/agora_ex/task_app/agora_ex_task_app.py +0 -590
  257. examples/agora_ex/task_app/reward_fn_grpo-human.py +0 -129
  258. examples/agora_ex/task_app/system_prompt_CURRENT.md +0 -63
  259. examples/warming_up_to_rl/task_app/synth_envs_hosted/utils.py +0 -62
  260. synth_ai/rubrics/__init__.py +0 -22
  261. synth_ai/task/rubrics.py +0 -219
  262. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/README.md +0 -0
  263. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/README.md +0 -0
  264. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/__init__.py +0 -0
  265. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/branching.py +0 -0
  266. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/environment_routes.py +0 -0
  267. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/envs/__init__.py +0 -0
  268. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/envs/crafter/__init__.py +0 -0
  269. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/envs/crafter/app.py +0 -0
  270. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/envs/crafter/shared.py +0 -0
  271. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/envs/crafter/tools.py +0 -0
  272. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/hosted_app.py +0 -0
  273. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/inference/__init__.py +0 -0
  274. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/main.py +0 -0
  275. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/registry.py +0 -0
  276. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/storage/__init__.py +0 -0
  277. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/storage/volume.py +0 -0
  278. /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/test_agents.py +0 -0
  279. /examples/{rl/task_app → task_apps/math}/README.md +0 -0
  280. /examples/{rl/task_app → task_apps/math}/math_task_app.py +0 -0
  281. /examples/{rl → workflows/math_rl}/configs/eval_base_qwen.toml +0 -0
  282. /examples/{rl → workflows/math_rl}/configs/eval_rl_qwen.toml +0 -0
  283. /examples/{rl → workflows/math_rl}/configs/rl_from_base_qwen.toml +0 -0
  284. /examples/{rl → workflows/math_rl}/configs/rl_from_base_qwen17.toml +0 -0
  285. /examples/{rl → workflows/math_rl}/configs/rl_from_ft_qwen.toml +0 -0
  286. /examples/{rl → workflows/math_rl}/run_eval.py +0 -0
  287. /examples/{rl → workflows/math_rl}/run_rl_and_save.py +0 -0
  288. {synth_ai-0.2.13.dev1.dist-info → synth_ai-0.2.14.dist-info}/WHEEL +0 -0
  289. {synth_ai-0.2.13.dev1.dist-info → synth_ai-0.2.14.dist-info}/entry_points.txt +0 -0
  290. {synth_ai-0.2.13.dev1.dist-info → synth_ai-0.2.14.dist-info}/licenses/LICENSE +0 -0
  291. {synth_ai-0.2.13.dev1.dist-info → synth_ai-0.2.14.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,11 @@
1
+ """Task app validation utilities - imported by task_apps.py"""
2
+
3
+ # This module provides the validate_task_app function for CLI use
4
+ # The actual implementation is imported from the task module
5
+
6
+ from synth_ai.task.validators import (
7
+ validate_task_app_endpoint as validate_task_app, # type: ignore[attr-defined]
8
+ )
9
+
10
+ __all__ = ["validate_task_app"]
11
+
synth_ai/cli/balance.py CHANGED
@@ -8,6 +8,7 @@ from __future__ import annotations
8
8
  import importlib
9
9
  import os
10
10
  from collections.abc import Callable
11
+ from typing import Any, cast
11
12
 
12
13
  import click
13
14
  import requests
@@ -19,9 +20,9 @@ from rich.table import Table
19
20
 
20
21
  def _load_base_url_module() -> tuple[str, Callable[[], tuple[str, str]]]:
21
22
  try:
22
- module = importlib.import_module("synth_ai.config.base_url")
23
- default = module.PROD_BASE_URL_DEFAULT
24
- getter = module.get_backend_from_env
23
+ module = cast(Any, importlib.import_module("synth_ai.config.base_url"))
24
+ default = cast(str, module.PROD_BASE_URL_DEFAULT)
25
+ getter = cast(Callable[[], tuple[str, str]], module.get_backend_from_env)
25
26
  return str(default), getter
26
27
  except Exception:
27
28
  return "https://agent-learning.onrender.com", lambda: ("https://agent-learning.onrender.com", "")
synth_ai/cli/calc.py CHANGED
@@ -35,13 +35,13 @@ def _safe_eval(expr: str) -> float:
35
35
  if isinstance(n, ast.Expression):
36
36
  return _eval(n.body)
37
37
  if isinstance(n, ast.Constant):
38
- if isinstance(n.value, (int, float)):
38
+ if isinstance(n.value, int | float):
39
39
  return float(n.value)
40
40
  raise ValueError("Only numeric constants are allowed")
41
41
  num_node = getattr(ast, "Num", None)
42
42
  if num_node is not None and isinstance(n, num_node): # pragma: no cover
43
43
  numeric_value = getattr(n, "n", None)
44
- if isinstance(numeric_value, (int, float)):
44
+ if isinstance(numeric_value, int | float):
45
45
  return float(numeric_value)
46
46
  raise ValueError("Only numeric constants are allowed")
47
47
  if isinstance(n, ast.BinOp):
synth_ai/cli/demo.py CHANGED
@@ -8,13 +8,18 @@ CLI: interactive launcher for example demos and RL demo helpers.
8
8
 
9
9
  from __future__ import annotations
10
10
 
11
+ import importlib
11
12
  import os
12
13
  import subprocess
13
14
  from pathlib import Path
15
+ from typing import Any, cast
14
16
 
15
17
  import click
18
+ from click.exceptions import Exit
16
19
 
17
- from synth_ai.demos.core import cli as demo_commands
20
+ demo_commands = cast(
21
+ Any, importlib.import_module("synth_ai.demos.core.cli")
22
+ )
18
23
 
19
24
 
20
25
  def _find_demo_scripts(root: Path) -> list[Path]:
@@ -29,7 +34,7 @@ def _run_demo_command(func, *args, **kwargs) -> None:
29
34
  try:
30
35
  result = func(*args, **kwargs)
31
36
  except SystemExit as exc: # pragma: no cover - defensive
32
- raise click.exceptions.Exit(exc.code or 1) from exc
37
+ raise Exit(exc.code or 1) from exc
33
38
 
34
39
  if result is None:
35
40
  return
@@ -39,7 +44,7 @@ def _run_demo_command(func, *args, **kwargs) -> None:
39
44
  except (TypeError, ValueError):
40
45
  return
41
46
  if code != 0:
42
- raise click.exceptions.Exit(code)
47
+ raise Exit(code)
43
48
 
44
49
 
45
50
  def register(cli):
@@ -106,10 +111,7 @@ def register(cli):
106
111
  # (prepare command removed; configure now prepares baseline TOML)
107
112
 
108
113
  # Help pyright understand dynamic Click group attributes
109
- from typing import Any
110
- from typing import cast as _cast
111
-
112
- _dg = _cast(Any, demo)
114
+ _dg = cast(Any, demo)
113
115
 
114
116
  @_dg.command("deploy")
115
117
  @click.option("--local", is_flag=True, help="Run local FastAPI instead of Modal deploy")
@@ -156,3 +158,8 @@ def register(cli):
156
158
  model=model,
157
159
  timeout=timeout,
158
160
  )
161
+
162
+ @cli.command("setup")
163
+ def setup_alias():
164
+ """Perform SDK handshake and write keys to .env."""
165
+ _run_demo_command(demo_commands.setup)
@@ -235,7 +235,7 @@ def view(url: str):
235
235
  """Launch the interactive TUI dashboard."""
236
236
  try:
237
237
  module = importlib.import_module(".tui.dashboard", __package__)
238
- synth_dashboard_cls = module.SynthDashboard
238
+ synth_dashboard_cls = getattr(module, "SynthDashboard")
239
239
  app = synth_dashboard_cls(db_url=url)
240
240
  app.run()
241
241
  except ImportError:
synth_ai/cli/recent.py CHANGED
@@ -12,7 +12,7 @@ from rich import box
12
12
  from rich.console import Console
13
13
  from rich.table import Table
14
14
 
15
- from ._storage import load_storage
15
+ from synth_ai.cli._storage import load_storage
16
16
 
17
17
  if TYPE_CHECKING: # pragma: no cover - typing only
18
18
  import pandas as pd
synth_ai/cli/rl_demo.py CHANGED
@@ -15,9 +15,13 @@ For convenience, dotted aliases are also exposed:
15
15
 
16
16
  from __future__ import annotations
17
17
 
18
+ import importlib
19
+ from typing import Any, cast
20
+
18
21
  import click
22
+ from click.exceptions import Exit
19
23
 
20
- from synth_ai.demos.core import cli as demo_commands
24
+ demo_commands = cast(Any, importlib.import_module("synth_ai.demos.core.cli"))
21
25
 
22
26
 
23
27
  def _run_demo_command(func, *args, **kwargs) -> None:
@@ -26,7 +30,7 @@ def _run_demo_command(func, *args, **kwargs) -> None:
26
30
  try:
27
31
  result = func(*args, **kwargs)
28
32
  except SystemExit as exc: # pragma: no cover - defensive
29
- raise click.exceptions.Exit(exc.code or 1) from exc
33
+ raise Exit(exc.code or 1) from exc
30
34
 
31
35
  if result is None:
32
36
  return
@@ -35,7 +39,7 @@ def _run_demo_command(func, *args, **kwargs) -> None:
35
39
  except (TypeError, ValueError):
36
40
  return
37
41
  if code != 0:
38
- raise click.exceptions.Exit(code)
42
+ raise Exit(code)
39
43
 
40
44
 
41
45
  def register(cli):
@@ -44,10 +48,7 @@ def register(cli):
44
48
  """RL Demo commands (separate from legacy demo)."""
45
49
 
46
50
  # Help pyright understand dynamic Click group attributes
47
- from typing import Any
48
- from typing import cast as _cast
49
-
50
- _rlg = _cast(Any, rl_demo)
51
+ _rlg = cast(Any, rl_demo)
51
52
 
52
53
  @_rlg.command("setup")
53
54
  def rl_setup():
synth_ai/cli/root.py CHANGED
@@ -156,103 +156,6 @@ def cli():
156
156
  """Top-level command group for Synth AI."""
157
157
 
158
158
 
159
- # === Legacy demo command group (aliases new rl_demo implementation) ===
160
- @cli.group()
161
- def demo():
162
- """Demo helpers (deploy, configure, run)."""
163
-
164
-
165
- def _forward_to_demo(args: list[str]) -> None:
166
- # Lazy import to avoid loading demo deps unless needed
167
- try:
168
- from synth_ai.demos.core import cli as demo_cli # type: ignore
169
- except Exception as e: # pragma: no cover
170
- click.echo(f"Failed to import demo CLI: {e}")
171
- sys.exit(1)
172
- rc = int(demo_cli.main(args) or 0) # type: ignore[attr-defined]
173
- if rc != 0:
174
- sys.exit(rc)
175
-
176
-
177
- # (prepare command removed; handled by configure)
178
-
179
-
180
- @demo.command()
181
- @click.option("--local", is_flag=True, help="Run local FastAPI instead of Modal deploy")
182
- @click.option(
183
- "--app", type=click.Path(), default=None, help="Path to Modal app.py for uv run modal deploy"
184
- )
185
- @click.option("--name", type=str, default="synth-math-demo", help="Modal app name")
186
- @click.option(
187
- "--script", type=click.Path(), default=None, help="Path to deploy_task_app.sh (optional legacy)"
188
- )
189
- def deploy(local: bool, app: str | None, name: str, script: str | None):
190
- """Deploy the Math Task App (Modal by default)."""
191
- args: list[str] = ["rl_demo.deploy"]
192
- if local:
193
- args.append("--local")
194
- if app:
195
- args.extend(["--app", app])
196
- if name:
197
- args.extend(["--name", name])
198
- if script:
199
- args.extend(["--script", script])
200
- _forward_to_demo(args)
201
-
202
-
203
- @demo.command()
204
- def configure():
205
- """Print resolved environment and config path."""
206
- _forward_to_demo(["rl_demo.configure"])
207
-
208
-
209
- @demo.command()
210
- def setup():
211
- """Perform SDK handshake and write keys to .env."""
212
- _forward_to_demo(["rl_demo.setup"])
213
-
214
-
215
- @demo.command()
216
- @click.option("--template", type=str, default=None, help="Template id to instantiate")
217
- @click.option("--dest", type=str, default=None, help="Destination directory for files")
218
- @click.option("--force", is_flag=True, help="Overwrite existing files in destination")
219
- def init(template: str | None, dest: str | None, force: bool):
220
- """Copy demo task app template into the current directory."""
221
- args: list[str] = ["demo.init"]
222
- if template:
223
- args.extend(["--template", template])
224
- if dest:
225
- args.extend(["--dest", dest])
226
- if force:
227
- args.append("--force")
228
- _forward_to_demo(args)
229
-
230
-
231
- @demo.command()
232
- @click.option("--batch-size", type=int, default=None)
233
- @click.option("--group-size", type=int, default=None)
234
- @click.option("--model", type=str, default=None)
235
- @click.option("--timeout", type=int, default=600)
236
- def run(batch_size: int | None, group_size: int | None, model: str | None, timeout: int):
237
- """Kick off a short RL job using the prepared TOML."""
238
- args = ["rl_demo.run"]
239
- if batch_size is not None:
240
- args.extend(["--batch-size", str(batch_size)])
241
- if group_size is not None:
242
- args.extend(["--group-size", str(group_size)])
243
- if model:
244
- args.extend(["--model", model])
245
- if timeout:
246
- args.extend(["--timeout", str(timeout)])
247
- _forward_to_demo(args)
248
-
249
-
250
- @cli.command(name="setup")
251
- def setup_command():
252
- """Perform SDK handshake and write keys to .env."""
253
- _forward_to_demo(["rl_demo.setup"])
254
-
255
-
256
159
  @cli.command()
257
160
  @click.option("--db-file", default="traces/v3/synth_ai.db", help="Database file path")
258
161
  @click.option("--sqld-port", default=8080, type=int, help="Port for sqld HTTP interface")
synth_ai/cli/status.py CHANGED
@@ -12,7 +12,7 @@ from rich.console import Console
12
12
  from rich.panel import Panel
13
13
  from rich.table import Table
14
14
 
15
- from ._storage import load_storage
15
+ from synth_ai.cli._storage import load_storage
16
16
 
17
17
 
18
18
  async def _db_stats(db_url: str) -> dict: