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.
- examples/multi_step/configs/README_verilog_rl.md +77 -0
- examples/multi_step/configs/VERILOG_REWARDS.md +90 -0
- examples/multi_step/configs/VERILOG_RL_CHECKLIST.md +183 -0
- examples/multi_step/configs/crafter_eval_synth_qwen4b.toml +35 -0
- examples/multi_step/configs/crafter_eval_text_only_groq_qwen32b.toml +36 -0
- examples/multi_step/configs/crafter_rl_stepwise_hosted_judge.toml +17 -5
- examples/multi_step/configs/crafter_synth_backend.md +40 -0
- examples/multi_step/configs/verilog_eval_groq_qwen32b.toml +31 -0
- examples/multi_step/configs/verilog_eval_synth_qwen8b.toml +33 -0
- examples/multi_step/configs/verilog_rl_lora.toml +190 -0
- examples/multi_step/judges/crafter_backend_judge.py +220 -0
- examples/multi_step/judges/verilog_backend_judge.py +234 -0
- examples/multi_step/readme.md +48 -0
- examples/multi_step/verilog_rl_lora.md +218 -0
- examples/qwen_coder/configs/coder_lora_30b.toml +1 -1
- examples/sft/evaluate.py +2 -0
- examples/sft/generate_traces.py +2 -0
- examples/swe/task_app/grpo_swe_mini.py +56 -26
- examples/swe/task_app/hosted/rollout.py +42 -0
- examples/swe/task_app/hosted/test_service.py +5 -6
- examples/task_apps/IMAGE_ONLY_EVAL_QUICKSTART.md +258 -0
- examples/task_apps/TESTING.md +275 -0
- examples/task_apps/__init__.py +0 -0
- examples/task_apps/crafter/CREATE_SFT_DATASET.md +273 -0
- examples/task_apps/crafter/EVAL_IMAGE_ONLY_RESULTS.md +152 -0
- examples/task_apps/crafter/FILTER_COMMAND_STATUS.md +174 -0
- examples/task_apps/crafter/FILTER_COMMAND_SUCCESS.md +268 -0
- examples/task_apps/crafter/QUERY_EXAMPLES.md +203 -0
- examples/task_apps/crafter/README_IMAGE_ONLY_EVAL.md +316 -0
- examples/task_apps/crafter/__init__.py +0 -0
- examples/task_apps/crafter/eval_image_only_gpt4o.toml +28 -0
- examples/task_apps/crafter/eval_text_only_groq_llama.toml +36 -0
- examples/task_apps/crafter/filter_sft_dataset.toml +16 -0
- examples/task_apps/crafter/task_app/__init__.py +5 -0
- examples/{warming_up_to_rl → task_apps/crafter}/task_app/grpo_crafter.py +324 -21
- examples/{warming_up_to_rl → task_apps/crafter}/task_app/grpo_crafter_task_app.py +1 -1
- examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/envs/crafter/environment.py +10 -0
- examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/envs/crafter/policy.py +76 -7
- examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/envs/crafter/react_agent.py +17 -2
- examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/inference/openai_client.py +25 -3
- examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/policy_routes.py +77 -4
- examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/rollout.py +117 -9
- examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/test_service.py +5 -6
- examples/task_apps/crafter/task_app/synth_envs_hosted/utils.py +218 -0
- examples/task_apps/dev/pokemon_emerald/__init__.py +2 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/README.md +811 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/agent/__init__.py +120 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/agent/action.py +160 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/agent/memory.py +155 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/agent/perception.py +69 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/agent/planning.py +96 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/agent/simple.py +1502 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/agent/system_prompt.py +4 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/grab_map.py +68 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/manual.py +216 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/pokemon_env/__init__.py +35 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/pokemon_env/emerald_utils.py +631 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/pokemon_env/emulator.py +1544 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/pokemon_env/enums.py +1428 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/pokemon_env/memory_reader.py +4848 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/pokemon_env/types.py +41 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/pokemon_env/utils.py +298 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/pyproject.toml +95 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/run.py +204 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/server/__init__.py +0 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/server/app.py +2152 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/server/client.py +429 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/server/frame_server.py +155 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/README.md +78 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/__init__.py +0 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/run_tests.py +122 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_agent_direct.py +76 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_agent_prompts.py +413 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_battle_state_formatting.py +204 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_dialogue_detection.py +133 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_dialogue_detection_comprehensive.py +229 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_direct_agent_emulator.py +300 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_fps_adjustment_pytest.py +205 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_house_to_outside_direct.py +200 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_house_to_outside_transition.py +284 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_map_ground_truth_comparison.py +468 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_memory_map.py +575 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_server_map_validation.py +311 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/tests/test_torchic_state.py +259 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/__init__.py +0 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/anticheat.py +372 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/checkpoint.py +296 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/error_handler.py +275 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/get_local_ip.py +22 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/helpers.py +44 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/llm_logger.py +514 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/map_formatter.py +415 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/map_stitcher.py +1763 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/map_stitcher_singleton.py +33 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/map_trimmer.py +106 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/map_visualizer.py +334 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/ocr_dialogue.py +1020 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/recording.py +188 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/state_formatter.py +1481 -0
- examples/task_apps/dev/pokemon_emerald/external/pokeagent-speedrun/utils/vlm.py +862 -0
- examples/task_apps/dev/pokemon_emerald/modal_app.py +114 -0
- examples/task_apps/dev/pokemon_emerald/task_app/README.md +81 -0
- examples/task_apps/dev/pokemon_emerald/task_app/__init__.py +6 -0
- examples/task_apps/dev/pokemon_emerald/task_app/pokemon_emerald.py +685 -0
- examples/task_apps/enron/__init__.py +1 -0
- examples/task_apps/enron/eval_groq_qwen32.toml +16 -0
- examples/task_apps/enron/filter_sft.toml +5 -0
- examples/task_apps/enron/task_app/README.md +14 -0
- examples/task_apps/enron/task_app/__init__.py +1 -0
- examples/task_apps/enron/task_app/grpo_enron.py +906 -0
- examples/task_apps/enron/task_app/grpo_enron_task_app.py +146 -0
- examples/task_apps/enron/tests/__init__.py +4 -0
- examples/task_apps/enron/tests/conftest.py +115 -0
- examples/task_apps/enron/tests/integration/__init__.py +4 -0
- examples/task_apps/enron/tests/integration/test_enron_eval.py +179 -0
- examples/task_apps/enron/tests/integration/test_enron_rollout.py +135 -0
- examples/task_apps/enron/tests/unit/__init__.py +4 -0
- examples/task_apps/enron/tests/unit/test_enron_environment.py +126 -0
- examples/task_apps/math/__init__.py +0 -0
- examples/{rl/task_app → task_apps/math}/math_single_step.py +19 -10
- examples/task_apps/pokemon_battle/__init__.py +2 -0
- examples/task_apps/pokemon_battle/modal_app.py +104 -0
- examples/task_apps/pokemon_battle/task_app/README.md +68 -0
- examples/task_apps/pokemon_battle/task_app/__init__.py +6 -0
- examples/task_apps/pokemon_battle/task_app/pokemon_showdown.py +932 -0
- examples/task_apps/pokemon_red/EVAL_IMAGE_ONLY_COMPLETE.md +283 -0
- examples/task_apps/pokemon_red/EVAL_IMAGE_ONLY_STATUS.md +155 -0
- examples/task_apps/pokemon_red/README.md +357 -0
- examples/task_apps/pokemon_red/README_IMAGE_ONLY_EVAL.md +415 -0
- examples/task_apps/pokemon_red/__init__.py +3 -0
- examples/task_apps/pokemon_red/eval_image_only_gpt4o.toml +29 -0
- examples/task_apps/pokemon_red/eval_pokemon_red_policy.py +225 -0
- examples/task_apps/pokemon_red/pallet_town_rl_config.toml +75 -0
- examples/task_apps/pokemon_red/task_app.py +799 -0
- examples/task_apps/pokemon_red/test_pallet_town_rewards.py +193 -0
- examples/task_apps/sokoban/README.md +307 -0
- examples/task_apps/sokoban/__init__.py +3 -0
- examples/task_apps/sokoban/eval_groq_qwen32.toml +16 -0
- examples/task_apps/sokoban/eval_openai_gpt5.toml +16 -0
- examples/task_apps/sokoban/filter_sft.toml +5 -0
- examples/task_apps/sokoban/task_app.py +1058 -0
- examples/task_apps/sokoban/tests/__init__.py +4 -0
- examples/task_apps/sokoban/tests/conftest.py +113 -0
- examples/task_apps/sokoban/tests/integration/__init__.py +4 -0
- examples/task_apps/sokoban/tests/integration/test_sokoban_eval.py +57 -0
- examples/task_apps/sokoban/tests/integration/test_sokoban_rollout.py +198 -0
- examples/task_apps/sokoban/tests/unit/__init__.py +4 -0
- examples/task_apps/sokoban/tests/unit/test_sokoban_environment.py +114 -0
- examples/task_apps/verilog/__init__.py +1 -0
- examples/task_apps/verilog/eval_groq_qwen32b.toml +24 -0
- examples/task_apps/verilog/filter_sft.toml +5 -0
- examples/task_apps/verilog/task_app/README.md +12 -0
- examples/task_apps/verilog/task_app/__init__.py +1 -0
- examples/task_apps/verilog/task_app/grpo_verilog.py +1166 -0
- examples/task_apps/verilog/task_app/grpo_verilog_task_app.py +145 -0
- examples/task_apps/verilog/tests/__init__.py +4 -0
- examples/task_apps/verilog/tests/conftest.py +115 -0
- examples/task_apps/verilog/tests/integration/__init__.py +4 -0
- examples/task_apps/verilog/tests/integration/test_verilog_eval.py +181 -0
- examples/task_apps/verilog/tests/integration/test_verilog_rollout.py +55 -0
- examples/task_apps/verilog/tests/unit/__init__.py +4 -0
- examples/task_apps/verilog/tests/unit/test_verilog_scoring.py +118 -0
- examples/vlm/crafter_openai_vlm_agent.py +4 -4
- examples/vlm/run_crafter_vlm_benchmark.py +4 -4
- examples/warming_up_to_rl/groq_test.py +2 -0
- examples/warming_up_to_rl/run_local_rollout.py +2 -0
- examples/warming_up_to_rl/run_local_rollout_modal.py +2 -0
- examples/warming_up_to_rl/run_local_rollout_parallel.py +2 -0
- examples/warming_up_to_rl/run_local_rollout_traced.py +2 -0
- examples/warming_up_to_rl/run_rollout_remote.py +2 -0
- examples/workflows/__init__.py +0 -0
- examples/workflows/math_rl/__init__.py +0 -0
- examples/workflows/math_rl/download_dataset.py +80 -0
- synth_ai/__init__.py +2 -2
- synth_ai/api/models/supported.py +1 -0
- synth_ai/api/train/builders.py +25 -11
- synth_ai/api/train/cli.py +12 -6
- synth_ai/api/train/configs/__init__.py +10 -10
- synth_ai/api/train/configs/rl.py +5 -4
- synth_ai/api/train/configs/sft.py +4 -3
- synth_ai/api/train/env_resolver.py +5 -2
- synth_ai/api/train/supported_algos.py +10 -5
- synth_ai/api/train/utils.py +7 -4
- synth_ai/cli/__init__.py +48 -59
- synth_ai/cli/_modal_wrapper.py +3 -2
- synth_ai/cli/_storage.py +4 -3
- synth_ai/cli/_validate_task_app.py +11 -0
- synth_ai/cli/balance.py +4 -3
- synth_ai/cli/calc.py +2 -2
- synth_ai/cli/demo.py +14 -7
- synth_ai/cli/legacy_root_backup.py +1 -1
- synth_ai/cli/recent.py +1 -1
- synth_ai/cli/rl_demo.py +8 -7
- synth_ai/cli/root.py +0 -97
- synth_ai/cli/status.py +1 -1
- synth_ai/cli/task_apps.py +1922 -190
- synth_ai/cli/traces.py +1 -1
- synth_ai/cli/tui.py +57 -0
- synth_ai/cli/turso.py +1 -1
- synth_ai/cli/watch.py +1 -1
- synth_ai/demos/demo_task_apps/crafter/grpo_crafter_task_app.py +29 -17
- synth_ai/environments/examples/crafter_classic/environment.py +1 -1
- synth_ai/environments/examples/enron/engine.py +7 -2
- synth_ai/environments/examples/enron/environment.py +68 -0
- synth_ai/environments/examples/red/engine.py +27 -0
- synth_ai/environments/examples/red/engine_helpers/memory_map.py +7 -0
- synth_ai/environments/examples/red/engine_helpers/reward_library/pallet_town_progression.py +477 -0
- synth_ai/environments/examples/red/engine_helpers/state_extraction.py +32 -0
- synth_ai/environments/examples/red/environment.py +60 -0
- synth_ai/environments/examples/sokoban/taskset.py +116 -0
- synth_ai/environments/examples/verilog/engine.py +104 -12
- synth_ai/evals/client.py +58 -61
- synth_ai/jobs/client.py +16 -4
- synth_ai/judge_schemas.py +9 -9
- synth_ai/py.typed +0 -0
- synth_ai/task/__init__.py +24 -5
- synth_ai/task/apps/__init__.py +1 -0
- synth_ai/task/config.py +257 -0
- synth_ai/task/contracts.py +138 -39
- synth_ai/task/proxy.py +48 -56
- synth_ai/task/rubrics/__init__.py +56 -0
- synth_ai/task/rubrics/loaders.py +152 -0
- synth_ai/task/rubrics/models.py +57 -0
- synth_ai/task/rubrics/scoring.py +116 -0
- synth_ai/{rubrics/validators.py → task/rubrics/strict.py} +53 -30
- synth_ai/task/server.py +8 -7
- synth_ai/task/trace_correlation_helpers.py +315 -0
- synth_ai/task/validators.py +413 -6
- synth_ai/tracing_v3/abstractions.py +3 -3
- synth_ai/tracing_v3/decorators.py +7 -3
- synth_ai/tracing_v3/llm_call_record_helpers.py +5 -5
- synth_ai/tracing_v3/replica_sync.py +4 -4
- synth_ai/tracing_v3/serialization.py +5 -5
- synth_ai/tracing_v3/session_tracer.py +16 -6
- synth_ai/tracing_v3/storage/base.py +29 -29
- synth_ai/tracing_v3/storage/config.py +3 -3
- synth_ai/tracing_v3/trace_utils.py +317 -0
- synth_ai/tracing_v3/turso/daemon.py +8 -7
- synth_ai/tracing_v3/turso/native_manager.py +66 -43
- synth_ai/tracing_v3/utils.py +3 -3
- synth_ai/tui/__init__.py +5 -0
- synth_ai/tui/__main__.py +13 -0
- synth_ai/tui/cli/__init__.py +1 -0
- synth_ai/tui/cli/query_experiments.py +164 -0
- synth_ai/tui/cli/query_experiments_v3.py +164 -0
- synth_ai/tui/dashboard.py +906 -0
- {synth_ai-0.2.13.dev1.dist-info → synth_ai-0.2.14.dist-info}/METADATA +4 -1
- {synth_ai-0.2.13.dev1.dist-info → synth_ai-0.2.14.dist-info}/RECORD +278 -126
- examples/agora_ex/README_MoE.md +0 -224
- examples/agora_ex/__init__.py +0 -7
- examples/agora_ex/agora_ex.py +0 -65
- examples/agora_ex/agora_ex_task_app.py +0 -590
- examples/agora_ex/configs/rl_lora_qwen3_moe_2xh200.toml +0 -121
- examples/agora_ex/reward_fn_grpo-human.py +0 -129
- examples/agora_ex/system_prompt_CURRENT.md +0 -63
- examples/agora_ex/task_app/agora_ex_task_app.py +0 -590
- examples/agora_ex/task_app/reward_fn_grpo-human.py +0 -129
- examples/agora_ex/task_app/system_prompt_CURRENT.md +0 -63
- examples/warming_up_to_rl/task_app/synth_envs_hosted/utils.py +0 -62
- synth_ai/rubrics/__init__.py +0 -22
- synth_ai/task/rubrics.py +0 -219
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/README.md +0 -0
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/README.md +0 -0
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/__init__.py +0 -0
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/branching.py +0 -0
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/environment_routes.py +0 -0
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/envs/__init__.py +0 -0
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/envs/crafter/__init__.py +0 -0
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/envs/crafter/app.py +0 -0
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/envs/crafter/shared.py +0 -0
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/envs/crafter/tools.py +0 -0
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/hosted_app.py +0 -0
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/inference/__init__.py +0 -0
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/main.py +0 -0
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/registry.py +0 -0
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/storage/__init__.py +0 -0
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/storage/volume.py +0 -0
- /examples/{warming_up_to_rl → task_apps/crafter}/task_app/synth_envs_hosted/test_agents.py +0 -0
- /examples/{rl/task_app → task_apps/math}/README.md +0 -0
- /examples/{rl/task_app → task_apps/math}/math_task_app.py +0 -0
- /examples/{rl → workflows/math_rl}/configs/eval_base_qwen.toml +0 -0
- /examples/{rl → workflows/math_rl}/configs/eval_rl_qwen.toml +0 -0
- /examples/{rl → workflows/math_rl}/configs/rl_from_base_qwen.toml +0 -0
- /examples/{rl → workflows/math_rl}/configs/rl_from_base_qwen17.toml +0 -0
- /examples/{rl → workflows/math_rl}/configs/rl_from_ft_qwen.toml +0 -0
- /examples/{rl → workflows/math_rl}/run_eval.py +0 -0
- /examples/{rl → workflows/math_rl}/run_rl_and_save.py +0 -0
- {synth_ai-0.2.13.dev1.dist-info → synth_ai-0.2.14.dist-info}/WHEEL +0 -0
- {synth_ai-0.2.13.dev1.dist-info → synth_ai-0.2.14.dist-info}/entry_points.txt +0 -0
- {synth_ai-0.2.13.dev1.dist-info → synth_ai-0.2.14.dist-info}/licenses/LICENSE +0 -0
- {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,
|
|
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,
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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