synth-ai 0.0.0.dev2__tar.gz → 0.3.4__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.
Potentially problematic release.
This version of synth-ai might be problematic. Click here for more details.
- synth_ai-0.3.4/MANIFEST.in +35 -0
- synth_ai-0.3.4/PKG-INFO +153 -0
- synth_ai-0.3.4/README.md +73 -0
- synth_ai-0.3.4/pyproject.toml +228 -0
- synth_ai-0.3.4/synth_ai/__init__.py +56 -0
- synth_ai-0.3.4/synth_ai/__main__.py +36 -0
- synth_ai-0.3.4/synth_ai/cli/__init__.py +141 -0
- synth_ai-0.3.4/synth_ai/cli/__main__.py +42 -0
- synth_ai-0.3.4/synth_ai/cli/_internal/__init__.py +5 -0
- synth_ai-0.3.4/synth_ai/cli/_internal/modal_wrapper.py +31 -0
- synth_ai-0.3.4/synth_ai/cli/_internal/storage.py +20 -0
- synth_ai-0.3.4/synth_ai/cli/_internal/typer_patch.py +47 -0
- synth_ai-0.3.4/synth_ai/cli/_internal/validate_task_app.py +29 -0
- synth_ai-0.3.4/synth_ai/cli/agents/__init__.py +17 -0
- synth_ai-0.3.4/synth_ai/cli/agents/claude.py +77 -0
- synth_ai-0.3.4/synth_ai/cli/agents/codex.py +265 -0
- synth_ai-0.3.4/synth_ai/cli/agents/opencode.py +253 -0
- synth_ai-0.3.4/synth_ai/cli/commands/__init__.py +18 -0
- synth_ai-0.3.4/synth_ai/cli/commands/artifacts/__init__.py +13 -0
- synth_ai-0.3.4/synth_ai/cli/commands/artifacts/client.py +119 -0
- synth_ai-0.3.4/synth_ai/cli/commands/artifacts/config.py +57 -0
- synth_ai-0.3.4/synth_ai/cli/commands/artifacts/core.py +24 -0
- synth_ai-0.3.4/synth_ai/cli/commands/artifacts/download.py +188 -0
- synth_ai-0.3.4/synth_ai/cli/commands/artifacts/export.py +186 -0
- synth_ai-0.3.4/synth_ai/cli/commands/artifacts/list.py +156 -0
- synth_ai-0.3.4/synth_ai/cli/commands/artifacts/parsing.py +250 -0
- synth_ai-0.3.4/synth_ai/cli/commands/artifacts/show.py +336 -0
- synth_ai-0.3.4/synth_ai/cli/commands/baseline/__init__.py +12 -0
- synth_ai-0.3.4/synth_ai/cli/commands/baseline/core.py +636 -0
- synth_ai-0.3.4/synth_ai/cli/commands/baseline/list.py +94 -0
- synth_ai-0.3.4/synth_ai/cli/commands/demo/__init__.py +3 -0
- synth_ai-0.3.4/synth_ai/cli/commands/demo/core.py +153 -0
- synth_ai-0.3.4/synth_ai/cli/commands/eval/__init__.py +19 -0
- synth_ai-0.3.4/synth_ai/cli/commands/eval/core.py +1113 -0
- synth_ai-0.3.4/synth_ai/cli/commands/eval/errors.py +81 -0
- synth_ai-0.3.4/synth_ai/cli/commands/eval/validation.py +133 -0
- synth_ai-0.3.4/synth_ai/cli/commands/filter/__init__.py +12 -0
- synth_ai-0.3.4/synth_ai/cli/commands/filter/core.py +424 -0
- synth_ai-0.3.4/synth_ai/cli/commands/filter/errors.py +55 -0
- synth_ai-0.3.4/synth_ai/cli/commands/filter/validation.py +77 -0
- synth_ai-0.3.4/synth_ai/cli/commands/help/__init__.py +185 -0
- synth_ai-0.3.4/synth_ai/cli/commands/help/core.py +72 -0
- synth_ai-0.3.4/synth_ai/cli/commands/scan/__init__.py +19 -0
- synth_ai-0.3.4/synth_ai/cli/commands/scan/cloudflare_scanner.py +403 -0
- synth_ai-0.3.4/synth_ai/cli/commands/scan/core.py +344 -0
- synth_ai-0.3.4/synth_ai/cli/commands/scan/health_checker.py +242 -0
- synth_ai-0.3.4/synth_ai/cli/commands/scan/local_scanner.py +278 -0
- synth_ai-0.3.4/synth_ai/cli/commands/scan/models.py +83 -0
- synth_ai-0.3.4/synth_ai/cli/commands/smoke/__init__.py +7 -0
- synth_ai-0.3.4/synth_ai/cli/commands/smoke/core.py +1438 -0
- synth_ai-0.3.4/synth_ai/cli/commands/status/__init__.py +66 -0
- synth_ai-0.3.4/synth_ai/cli/commands/status/client.py +192 -0
- synth_ai-0.3.4/synth_ai/cli/commands/status/config.py +92 -0
- synth_ai-0.3.4/synth_ai/cli/commands/status/errors.py +20 -0
- synth_ai-0.3.4/synth_ai/cli/commands/status/formatters.py +164 -0
- synth_ai-0.3.4/synth_ai/cli/commands/status/subcommands/__init__.py +9 -0
- synth_ai-0.3.4/synth_ai/cli/commands/status/subcommands/files.py +79 -0
- synth_ai-0.3.4/synth_ai/cli/commands/status/subcommands/jobs.py +334 -0
- synth_ai-0.3.4/synth_ai/cli/commands/status/subcommands/models.py +79 -0
- synth_ai-0.3.4/synth_ai/cli/commands/status/subcommands/pricing.py +23 -0
- synth_ai-0.3.4/synth_ai/cli/commands/status/subcommands/runs.py +81 -0
- synth_ai-0.3.4/synth_ai/cli/commands/status/subcommands/session.py +182 -0
- synth_ai-0.3.4/synth_ai/cli/commands/status/subcommands/summary.py +47 -0
- synth_ai-0.3.4/synth_ai/cli/commands/status/subcommands/usage.py +203 -0
- synth_ai-0.3.4/synth_ai/cli/commands/status/utils.py +114 -0
- synth_ai-0.3.4/synth_ai/cli/commands/train/__init__.py +53 -0
- synth_ai-0.3.4/synth_ai/cli/commands/train/core.py +22 -0
- synth_ai-0.3.4/synth_ai/cli/commands/train/errors.py +117 -0
- synth_ai-0.3.4/synth_ai/cli/commands/train/judge_schemas.py +201 -0
- synth_ai-0.3.4/synth_ai/cli/commands/train/judge_validation.py +305 -0
- synth_ai-0.3.4/synth_ai/cli/commands/train/prompt_learning_validation.py +632 -0
- synth_ai-0.3.4/synth_ai/cli/commands/train/validation.py +392 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/__init__.py +10 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/core/__init__.py +28 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/core/cli.py +1735 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/crafter/__init__.py +1 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/crafter/crafter_fft_4b.toml +55 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/crafter/grpo_crafter_task_app.py +186 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/crafter/rl_from_base_qwen4b.toml +74 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/demo_registry.py +176 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/demo_task_apps/__init__.py +7 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/demo_task_apps/core.py +440 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/demo_task_apps/crafter/__init__.py +1 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/demo_task_apps/crafter/configs/crafter_fft_4b.toml +53 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/demo_task_apps/crafter/configs/rl_from_base_qwen4b.toml +73 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/demo_task_apps/crafter/grpo_crafter_task_app.py +185 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/demo_task_apps/math/__init__.py +1 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/demo_task_apps/math/_common.py +16 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/demo_task_apps/math/app.py +38 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/demo_task_apps/math/config.toml +74 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/demo_task_apps/math/deploy_modal.py +57 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/demo_task_apps/math/modal_task_app.py +742 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/demo_task_apps/math/task_app_entry.py +39 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/math/__init__.py +1 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/math/_common.py +16 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/math/app.py +38 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/math/config.toml +76 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/math/deploy_modal.py +54 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/math/modal_task_app.py +702 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/math/task_app_entry.py +53 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/mipro/main.py +271 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/mipro/task_app.py +930 -0
- synth_ai-0.3.4/synth_ai/cli/demo_apps/mipro/train_cfg.toml +92 -0
- synth_ai-0.3.4/synth_ai/cli/demos/__init__.py +12 -0
- synth_ai-0.3.4/synth_ai/cli/demos/demo.py +32 -0
- synth_ai-0.3.4/synth_ai/cli/demos/rl_demo.py +254 -0
- synth_ai-0.3.4/synth_ai/cli/deploy.py +216 -0
- synth_ai-0.3.4/synth_ai/cli/infra/__init__.py +14 -0
- synth_ai-0.3.4/synth_ai/cli/infra/balance.py +216 -0
- synth_ai-0.3.4/synth_ai/cli/infra/mcp.py +35 -0
- synth_ai-0.3.4/synth_ai/cli/infra/modal_app.py +36 -0
- synth_ai-0.3.4/synth_ai/cli/infra/setup.py +69 -0
- synth_ai-0.3.4/synth_ai/cli/infra/status.py +16 -0
- synth_ai-0.3.4/synth_ai/cli/infra/turso.py +77 -0
- synth_ai-0.3.4/synth_ai/cli/lib/__init__.py +10 -0
- synth_ai-0.3.4/synth_ai/cli/lib/agents.py +74 -0
- synth_ai-0.3.4/synth_ai/cli/lib/apps/modal_app.py +101 -0
- synth_ai-0.3.4/synth_ai/cli/lib/apps/task_app.py +643 -0
- synth_ai-0.3.4/synth_ai/cli/lib/bin.py +39 -0
- synth_ai-0.3.4/synth_ai/cli/lib/env.py +375 -0
- synth_ai-0.3.4/synth_ai/cli/lib/errors.py +85 -0
- synth_ai-0.3.4/synth_ai/cli/lib/modal.py +315 -0
- synth_ai-0.3.4/synth_ai/cli/lib/plotting.py +126 -0
- synth_ai-0.3.4/synth_ai/cli/lib/prompt_args.py +39 -0
- synth_ai-0.3.4/synth_ai/cli/lib/prompts.py +284 -0
- synth_ai-0.3.4/synth_ai/cli/lib/sqld.py +122 -0
- synth_ai-0.3.4/synth_ai/cli/lib/task_app_discovery.py +884 -0
- synth_ai-0.3.4/synth_ai/cli/lib/task_app_env.py +295 -0
- synth_ai-0.3.4/synth_ai/cli/lib/train_cfgs.py +250 -0
- synth_ai-0.3.4/synth_ai/cli/lib/tunnel_records.py +207 -0
- synth_ai-0.3.4/synth_ai/cli/local/__init__.py +14 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/__init__.py +72 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/api_schemas.py +221 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/celery_app.py +208 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/config.py +128 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/config_utils.py +272 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/database.py +175 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/dispatcher.py +119 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/models.py +231 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/progress_info.py +160 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/results.py +373 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/schemas.py +131 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/service.py +344 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/status.py +372 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/status_tracker.py +360 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/tasks.py +1984 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/trace_storage.py +65 -0
- synth_ai-0.3.4/synth_ai/cli/local/experiment_queue/validation.py +157 -0
- synth_ai-0.3.4/synth_ai/cli/local/session/__init__.py +92 -0
- synth_ai-0.3.4/synth_ai/cli/local/session/client.py +383 -0
- synth_ai-0.3.4/synth_ai/cli/local/session/constants.py +63 -0
- synth_ai-0.3.4/synth_ai/cli/local/session/exceptions.py +105 -0
- synth_ai-0.3.4/synth_ai/cli/local/session/manager.py +139 -0
- synth_ai-0.3.4/synth_ai/cli/local/session/models.py +89 -0
- synth_ai-0.3.4/synth_ai/cli/local/session/query.py +110 -0
- synth_ai-0.3.4/synth_ai/cli/root.py +342 -0
- synth_ai-0.3.4/synth_ai/cli/task_apps/__init__.py +26 -0
- synth_ai-0.3.4/synth_ai/cli/task_apps/commands.py +3153 -0
- synth_ai-0.3.4/synth_ai/cli/task_apps/deploy.py +7 -0
- synth_ai-0.3.4/synth_ai/cli/task_apps/list.py +26 -0
- synth_ai-0.3.4/synth_ai/cli/task_apps/main.py +36 -0
- synth_ai-0.3.4/synth_ai/cli/task_apps/modal_serve.py +11 -0
- synth_ai-0.3.4/synth_ai/cli/task_apps/serve.py +11 -0
- synth_ai-0.3.4/synth_ai/cli/training/__init__.py +8 -0
- synth_ai-0.3.4/synth_ai/cli/training/train.py +5 -0
- synth_ai-0.3.4/synth_ai/cli/training/train_cfg.py +34 -0
- synth_ai-0.3.4/synth_ai/cli/training/watch.py +506 -0
- synth_ai-0.3.4/synth_ai/cli/turso.py +52 -0
- synth_ai-0.3.4/synth_ai/cli/usage.py +159 -0
- synth_ai-0.3.4/synth_ai/cli/utils/__init__.py +8 -0
- synth_ai-0.3.4/synth_ai/cli/utils/experiments.py +235 -0
- synth_ai-0.3.4/synth_ai/cli/utils/queue.py +504 -0
- synth_ai-0.3.4/synth_ai/cli/utils/recent.py +133 -0
- synth_ai-0.3.4/synth_ai/cli/utils/traces.py +164 -0
- synth_ai-0.3.4/synth_ai/contracts/__init__.py +67 -0
- synth_ai-0.3.4/synth_ai/core/__init__.py +100 -0
- synth_ai-0.3.4/synth_ai/core/_utils/__init__.py +54 -0
- synth_ai-0.3.4/synth_ai/core/_utils/base_url.py +10 -0
- synth_ai-0.3.4/synth_ai/core/_utils/http.py +10 -0
- synth_ai-0.3.4/synth_ai/core/_utils/prompts.py +14 -0
- synth_ai-0.3.4/synth_ai/core/_utils/task_app_state.py +12 -0
- synth_ai-0.3.4/synth_ai/core/_utils/user_config.py +10 -0
- synth_ai-0.3.4/synth_ai/core/apps/__init__.py +0 -0
- synth_ai-0.3.4/synth_ai/core/apps/common.py +116 -0
- synth_ai-0.3.4/synth_ai/core/auth.py +95 -0
- synth_ai-0.3.4/synth_ai/core/cfgs.py +240 -0
- synth_ai-0.3.4/synth_ai/core/config/__init__.py +16 -0
- synth_ai-0.3.4/synth_ai/core/config/base.py +168 -0
- synth_ai-0.3.4/synth_ai/core/config/resolver.py +89 -0
- synth_ai-0.3.4/synth_ai/core/env.py +220 -0
- synth_ai-0.3.4/synth_ai/core/errors.py +126 -0
- synth_ai-0.3.4/synth_ai/core/http.py +230 -0
- synth_ai-0.3.4/synth_ai/core/integrations/__init__.py +11 -0
- synth_ai-0.3.4/synth_ai/core/integrations/cloudflare.py +1619 -0
- synth_ai-0.3.4/synth_ai/core/integrations/mcp/__init__.py +6 -0
- synth_ai-0.3.4/synth_ai/core/integrations/mcp/__main__.py +8 -0
- synth_ai-0.3.4/synth_ai/core/integrations/mcp/claude.py +36 -0
- synth_ai-0.3.4/synth_ai/core/integrations/mcp/main.py +254 -0
- synth_ai-0.3.4/synth_ai/core/integrations/mcp/setup.py +100 -0
- synth_ai-0.3.4/synth_ai/core/integrations/modal.py +277 -0
- synth_ai-0.3.4/synth_ai/core/json.py +72 -0
- synth_ai-0.3.4/synth_ai/core/log_filter.py +99 -0
- synth_ai-0.3.4/synth_ai/core/logging.py +82 -0
- synth_ai-0.3.4/synth_ai/core/paths.py +107 -0
- synth_ai-0.3.4/synth_ai/core/pricing.py +109 -0
- synth_ai-0.3.4/synth_ai/core/process.py +233 -0
- synth_ai-0.3.4/synth_ai/core/ssl.py +25 -0
- synth_ai-0.3.4/synth_ai/core/storage/__init__.py +71 -0
- synth_ai-0.3.4/synth_ai/core/task_app_state.py +318 -0
- synth_ai-0.3.4/synth_ai/core/telemetry.py +282 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/__init__.py +99 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/abstractions.py +302 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/config.py +229 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/constants.py +21 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/db_config.py +182 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/decorators.py +401 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/examples/basic_usage.py +194 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/hooks.py +232 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/llm_call_record_helpers.py +437 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/lm_call_record_abstractions.py +255 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/migration_helper.py +119 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/replica_sync.py +262 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/serialization.py +130 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/session_tracer.py +540 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/storage/__init__.py +15 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/storage/base.py +210 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/storage/config.py +109 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/storage/exceptions.py +43 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/storage/factory.py +39 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/storage/types.py +32 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/storage/utils.py +206 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/trace_utils.py +317 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/turso/__init__.py +12 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/turso/daemon.py +278 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/turso/models.py +469 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/turso/native_manager.py +1293 -0
- synth_ai-0.3.4/synth_ai/core/tracing_v3/utils.py +108 -0
- synth_ai-0.3.4/synth_ai/core/urls.py +18 -0
- synth_ai-0.3.4/synth_ai/core/user_config.py +137 -0
- synth_ai-0.3.4/synth_ai/core/uvicorn.py +222 -0
- synth_ai-0.3.4/synth_ai/data/__init__.py +106 -0
- synth_ai-0.3.4/synth_ai/data/enums.py +141 -0
- synth_ai-0.3.4/synth_ai/data/rewards.py +86 -0
- synth_ai-0.3.4/synth_ai/data/specs.py +36 -0
- synth_ai-0.3.4/synth_ai/data/traces.py +35 -0
- synth_ai-0.3.4/synth_ai/py.typed +0 -0
- synth_ai-0.3.4/synth_ai/sdk/__init__.py +94 -0
- synth_ai-0.3.4/synth_ai/sdk/api/__init__.py +1 -0
- synth_ai-0.3.4/synth_ai/sdk/api/models/supported.py +514 -0
- synth_ai-0.3.4/synth_ai/sdk/api/research_agent/__init__.py +86 -0
- synth_ai-0.3.4/synth_ai/sdk/api/research_agent/cli.py +428 -0
- synth_ai-0.3.4/synth_ai/sdk/api/research_agent/config.py +357 -0
- synth_ai-0.3.4/synth_ai/sdk/api/research_agent/job.py +717 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/__init__.py +67 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/builders.py +895 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/cli.py +1927 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/config_finder.py +267 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/configs/__init__.py +65 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/configs/prompt_learning.py +1667 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/configs/rl.py +188 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/configs/sft.py +99 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/configs/shared.py +81 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/env_resolver.py +417 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/pollers.py +123 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/progress/__init__.py +97 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/progress/dataclasses.py +446 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/progress/events.py +329 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/progress/results.py +428 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/progress/tracker.py +636 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/prompt_learning.py +462 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/rl.py +437 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/sft.py +396 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/summary.py +522 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/supported_algos.py +147 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/task_app.py +331 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/utils.py +278 -0
- synth_ai-0.3.4/synth_ai/sdk/api/train/validators.py +2429 -0
- synth_ai-0.3.4/synth_ai/sdk/baseline/__init__.py +25 -0
- synth_ai-0.3.4/synth_ai/sdk/baseline/config.py +209 -0
- synth_ai-0.3.4/synth_ai/sdk/baseline/discovery.py +216 -0
- synth_ai-0.3.4/synth_ai/sdk/baseline/execution.py +154 -0
- synth_ai-0.3.4/synth_ai/sdk/inference/__init__.py +6 -0
- synth_ai-0.3.4/synth_ai/sdk/inference/client.py +128 -0
- synth_ai-0.3.4/synth_ai/sdk/jobs/__init__.py +16 -0
- synth_ai-0.3.4/synth_ai/sdk/jobs/client.py +371 -0
- synth_ai-0.3.4/synth_ai/sdk/judging/__init__.py +15 -0
- synth_ai-0.3.4/synth_ai/sdk/judging/base.py +24 -0
- synth_ai-0.3.4/synth_ai/sdk/judging/client.py +155 -0
- synth_ai-0.3.4/synth_ai/sdk/judging/schemas.py +127 -0
- synth_ai-0.3.4/synth_ai/sdk/judging/types.py +42 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/__init__.py +69 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/algorithms.py +14 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/client.py +240 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/config.py +5 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/constants.py +27 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/core.py +21 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/ft_client.py +7 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/gateway.py +2 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/health.py +49 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/jobs.py +202 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/prompt_extraction.py +334 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/prompt_learning_client.py +455 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/prompt_learning_types.py +185 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/rl/__init__.py +39 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/rl/client.py +268 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/rl/config.py +31 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/rl/contracts.py +27 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/rl/env_keys.py +166 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/rl/secrets.py +13 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/rl_client.py +5 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/sft/__init__.py +29 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/sft/client.py +95 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/sft/config.py +270 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/sft/data.py +698 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/sse.py +57 -0
- synth_ai-0.3.4/synth_ai/sdk/learning/validators.py +52 -0
- synth_ai-0.3.4/synth_ai/sdk/research_agent/__init__.py +34 -0
- synth_ai-0.3.4/synth_ai/sdk/research_agent/container_builder.py +328 -0
- synth_ai-0.3.4/synth_ai/sdk/research_agent/container_spec.py +198 -0
- synth_ai-0.3.4/synth_ai/sdk/research_agent/defaults.py +34 -0
- synth_ai-0.3.4/synth_ai/sdk/research_agent/results_collector.py +69 -0
- synth_ai-0.3.4/synth_ai/sdk/specs/__init__.py +46 -0
- synth_ai-0.3.4/synth_ai/sdk/specs/dataclasses.py +149 -0
- synth_ai-0.3.4/synth_ai/sdk/specs/loader.py +144 -0
- synth_ai-0.3.4/synth_ai/sdk/specs/serializer.py +199 -0
- synth_ai-0.3.4/synth_ai/sdk/specs/validation.py +250 -0
- synth_ai-0.3.4/synth_ai/sdk/streaming/__init__.py +31 -0
- synth_ai-0.3.4/synth_ai/sdk/streaming/config.py +94 -0
- synth_ai-0.3.4/synth_ai/sdk/streaming/handlers.py +1735 -0
- synth_ai-0.3.4/synth_ai/sdk/streaming/streamer.py +386 -0
- synth_ai-0.3.4/synth_ai/sdk/streaming/types.py +110 -0
- synth_ai-0.3.4/synth_ai/sdk/task/__init__.py +151 -0
- synth_ai-0.3.4/synth_ai/sdk/task/apps/__init__.py +133 -0
- synth_ai-0.3.4/synth_ai/sdk/task/auth.py +165 -0
- synth_ai-0.3.4/synth_ai/sdk/task/client.py +167 -0
- synth_ai-0.3.4/synth_ai/sdk/task/config.py +261 -0
- synth_ai-0.3.4/synth_ai/sdk/task/contracts.py +298 -0
- synth_ai-0.3.4/synth_ai/sdk/task/datasets.py +108 -0
- synth_ai-0.3.4/synth_ai/sdk/task/errors.py +50 -0
- synth_ai-0.3.4/synth_ai/sdk/task/health.py +34 -0
- synth_ai-0.3.4/synth_ai/sdk/task/in_process.py +1044 -0
- synth_ai-0.3.4/synth_ai/sdk/task/in_process_runner.py +290 -0
- synth_ai-0.3.4/synth_ai/sdk/task/inference_api.py +299 -0
- synth_ai-0.3.4/synth_ai/sdk/task/json.py +111 -0
- synth_ai-0.3.4/synth_ai/sdk/task/proxy.py +287 -0
- synth_ai-0.3.4/synth_ai/sdk/task/rubrics/__init__.py +55 -0
- synth_ai-0.3.4/synth_ai/sdk/task/rubrics/loaders.py +156 -0
- synth_ai-0.3.4/synth_ai/sdk/task/rubrics/models.py +57 -0
- synth_ai-0.3.4/synth_ai/sdk/task/rubrics/scoring.py +116 -0
- synth_ai-0.3.4/synth_ai/sdk/task/rubrics/strict.py +149 -0
- synth_ai-0.3.4/synth_ai/sdk/task/rubrics.py +219 -0
- synth_ai-0.3.4/synth_ai/sdk/task/server.py +580 -0
- synth_ai-0.3.4/synth_ai/sdk/task/trace_correlation_helpers.py +506 -0
- synth_ai-0.3.4/synth_ai/sdk/task/tracing_utils.py +95 -0
- synth_ai-0.3.4/synth_ai/sdk/task/validators.py +456 -0
- synth_ai-0.3.4/synth_ai/sdk/task/vendors.py +59 -0
- synth_ai-0.3.4/synth_ai/sdk/tracing/__init__.py +39 -0
- synth_ai-0.3.4/synth_ai/sdk/training/__init__.py +49 -0
- synth_ai-0.3.4/synth_ai/sdk/usage/__init__.py +37 -0
- synth_ai-0.3.4/synth_ai/sdk/usage/client.py +171 -0
- synth_ai-0.3.4/synth_ai/sdk/usage/models.py +261 -0
- synth_ai-0.3.4/synth_ai/utils/__init__.py +213 -0
- synth_ai-0.3.4/synth_ai.egg-info/PKG-INFO +153 -0
- synth_ai-0.3.4/synth_ai.egg-info/SOURCES.txt +368 -0
- synth_ai-0.3.4/synth_ai.egg-info/entry_points.txt +2 -0
- synth_ai-0.3.4/synth_ai.egg-info/requires.txt +71 -0
- synth_ai-0.0.0.dev2/PKG-INFO +0 -58
- synth_ai-0.0.0.dev2/README.md +0 -11
- synth_ai-0.0.0.dev2/pyproject.toml +0 -42
- synth_ai-0.0.0.dev2/synth_ai/__init__.py +0 -7
- synth_ai-0.0.0.dev2/synth_ai.egg-info/PKG-INFO +0 -58
- synth_ai-0.0.0.dev2/synth_ai.egg-info/SOURCES.txt +0 -9
- synth_ai-0.0.0.dev2/synth_ai.egg-info/requires.txt +0 -11
- {synth_ai-0.0.0.dev2 → synth_ai-0.3.4}/LICENSE +0 -0
- {synth_ai-0.0.0.dev2 → synth_ai-0.3.4}/setup.cfg +0 -0
- {synth_ai-0.0.0.dev2 → synth_ai-0.3.4}/synth_ai.egg-info/dependency_links.txt +0 -0
- {synth_ai-0.0.0.dev2 → synth_ai-0.3.4}/synth_ai.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
include README.md
|
|
2
|
+
include LICENSE
|
|
3
|
+
recursive-include synth_ai *.py
|
|
4
|
+
# Only include lightweight config/data files from core packages
|
|
5
|
+
recursive-include synth_ai *.toml
|
|
6
|
+
# Include examples for task app discovery
|
|
7
|
+
recursive-include examples *.py
|
|
8
|
+
recursive-include examples *.toml
|
|
9
|
+
recursive-include examples *.md
|
|
10
|
+
recursive-include examples *.sh
|
|
11
|
+
|
|
12
|
+
# Prune heavy example/demo/test/data trees from the sdist (keep code)
|
|
13
|
+
prune tests
|
|
14
|
+
prune private_tests
|
|
15
|
+
prune synth_ai/tracing_v3/tests
|
|
16
|
+
recursive-exclude synth_ai **/test_*.py
|
|
17
|
+
recursive-exclude synth_ai **/tests/*
|
|
18
|
+
|
|
19
|
+
# Remove large data files from package
|
|
20
|
+
recursive-exclude synth_ai *.json
|
|
21
|
+
recursive-exclude synth_ai *.db
|
|
22
|
+
recursive-exclude synth_ai *.duckdb
|
|
23
|
+
recursive-exclude synth_ai *.sqlite
|
|
24
|
+
recursive-exclude synth_ai *.parquet
|
|
25
|
+
recursive-exclude synth_ai *.csv
|
|
26
|
+
recursive-exclude synth_ai *.npz
|
|
27
|
+
recursive-exclude synth_ai *.npy
|
|
28
|
+
recursive-exclude synth_ai *.pt
|
|
29
|
+
recursive-exclude synth_ai *.pth
|
|
30
|
+
recursive-exclude synth_ai *.bin
|
|
31
|
+
recursive-exclude synth_ai *.zip
|
|
32
|
+
recursive-exclude synth_ai *.tar
|
|
33
|
+
global-exclude *.pyc
|
|
34
|
+
global-exclude __pycache__
|
|
35
|
+
global-exclude .DS_Store
|
synth_ai-0.3.4/PKG-INFO
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: synth-ai
|
|
3
|
+
Version: 0.3.4
|
|
4
|
+
Summary: Serverless Posttraining for Agents - Core AI functionality and tracing
|
|
5
|
+
Author-email: Synth AI <josh@usesynth.ai>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/synth-laboratories/synth-ai
|
|
8
|
+
Project-URL: Repository, https://github.com/synth-laboratories/synth-ai
|
|
9
|
+
Project-URL: Issues, https://github.com/synth-laboratories/synth-ai/issues
|
|
10
|
+
Requires-Python: >=3.11
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: pydantic>=2.0.0
|
|
14
|
+
Requires-Dist: python-dotenv>=1.0.1
|
|
15
|
+
Requires-Dist: requests>=2.32.3
|
|
16
|
+
Requires-Dist: tqdm>=4.66.4
|
|
17
|
+
Requires-Dist: typing_extensions>=4.0.0
|
|
18
|
+
Requires-Dist: rich>=13.9.0
|
|
19
|
+
Requires-Dist: openai>=1.99.0
|
|
20
|
+
Requires-Dist: anthropic>=0.42.0
|
|
21
|
+
Requires-Dist: langfuse<3.0.0,>=2.53.9
|
|
22
|
+
Requires-Dist: opentelemetry-api>=1.26.0
|
|
23
|
+
Requires-Dist: opentelemetry-sdk>=1.26.0
|
|
24
|
+
Requires-Dist: groq>=0.30.0
|
|
25
|
+
Requires-Dist: google-genai>=1.26.0
|
|
26
|
+
Requires-Dist: together>=1.5.21
|
|
27
|
+
Requires-Dist: mistralai>=1.9.2
|
|
28
|
+
Requires-Dist: fastapi>=0.115.12
|
|
29
|
+
Requires-Dist: uvicorn>=0.34.2
|
|
30
|
+
Requires-Dist: numpy>=2.2.3
|
|
31
|
+
Requires-Dist: networkx>=3.4.2
|
|
32
|
+
Requires-Dist: sqlalchemy>=2.0.42
|
|
33
|
+
Requires-Dist: celery>=5.4.0
|
|
34
|
+
Requires-Dist: redis>=6.2.0
|
|
35
|
+
Requires-Dist: aiosqlite>=0.21.0
|
|
36
|
+
Requires-Dist: libsql>=0.1.8
|
|
37
|
+
Requires-Dist: pynacl>=1.5.0
|
|
38
|
+
Requires-Dist: click<8.2,>=8.1.7
|
|
39
|
+
Requires-Dist: aiohttp>=3.8.0
|
|
40
|
+
Requires-Dist: httpx>=0.28.1
|
|
41
|
+
Requires-Dist: modal<2.0.0,>=1.1.4
|
|
42
|
+
Requires-Dist: docker>=7.0.0
|
|
43
|
+
Requires-Dist: mcp>=1.21.0
|
|
44
|
+
Requires-Dist: ruff>=0.12.9
|
|
45
|
+
Requires-Dist: tomli_w>=1.0.0
|
|
46
|
+
Requires-Dist: dspy>=3.0.4
|
|
47
|
+
Requires-Dist: setuptools>=80.9.0
|
|
48
|
+
Requires-Dist: gymnasium>=0.26.2
|
|
49
|
+
Requires-Dist: gepa>=0.0.17
|
|
50
|
+
Requires-Dist: datasets>=4.0.0
|
|
51
|
+
Provides-Extra: dev
|
|
52
|
+
Requires-Dist: build>=1.2.2.post1; extra == "dev"
|
|
53
|
+
Requires-Dist: twine>=4.0.0; extra == "dev"
|
|
54
|
+
Requires-Dist: keyring>=24.0.0; extra == "dev"
|
|
55
|
+
Requires-Dist: pytest>=8.3.3; extra == "dev"
|
|
56
|
+
Requires-Dist: pytest-xdist>=3.6.1; extra == "dev"
|
|
57
|
+
Requires-Dist: pytest-timeout>=2.3.1; extra == "dev"
|
|
58
|
+
Requires-Dist: pytest-asyncio>=0.24.0; extra == "dev"
|
|
59
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
60
|
+
Requires-Dist: pyright>=1.1.350; extra == "dev"
|
|
61
|
+
Requires-Dist: coverage[toml]>=7.3.0; extra == "dev"
|
|
62
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
63
|
+
Provides-Extra: research
|
|
64
|
+
Requires-Dist: crafter>=1.8.3; extra == "research"
|
|
65
|
+
Requires-Dist: datasets>=4.0.0; extra == "research"
|
|
66
|
+
Provides-Extra: swe
|
|
67
|
+
Requires-Dist: morphcloud>=0.1.3; extra == "swe"
|
|
68
|
+
Requires-Dist: swebench>=2.3.0; extra == "swe"
|
|
69
|
+
Provides-Extra: all
|
|
70
|
+
Requires-Dist: crafter>=1.8.3; extra == "all"
|
|
71
|
+
Requires-Dist: datasets>=4.0.0; extra == "all"
|
|
72
|
+
Requires-Dist: morphcloud>=0.1.3; extra == "all"
|
|
73
|
+
Requires-Dist: swebench>=2.3.0; extra == "all"
|
|
74
|
+
Requires-Dist: pyboy>=2.6.0; extra == "all"
|
|
75
|
+
Requires-Dist: transformers>=4.56.1; extra == "all"
|
|
76
|
+
Requires-Dist: redis>=6.2.0; extra == "all"
|
|
77
|
+
Provides-Extra: analytics
|
|
78
|
+
Requires-Dist: pandas>=2.2.3; extra == "analytics"
|
|
79
|
+
Dynamic: license-file
|
|
80
|
+
|
|
81
|
+
# Synth
|
|
82
|
+
|
|
83
|
+
[](https://www.python.org/)
|
|
84
|
+
[](https://pypi.org/project/synth-ai/)
|
|
85
|
+
[](https://pypi.org/project/synth-ai/0.3.2.dev3/)
|
|
86
|
+
[](LICENSE)
|
|
87
|
+

|
|
88
|
+

|
|
89
|
+
|
|
90
|
+
Serverless Posttraining APIs for Developers
|
|
91
|
+
|
|
92
|
+
<p align="center">
|
|
93
|
+
<picture align="center">
|
|
94
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/synth-laboratories/synth-ai/main/assets/langprobe_v2_dark.png">
|
|
95
|
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/synth-laboratories/synth-ai/main/assets/langprobe_v2_light.png">
|
|
96
|
+
<img alt="Shows a bar chart comparing prompt optimization performance across Synth GEPA, Synth MIPRO, GEPA (lib), DSPy MIPRO, and DSPy GEPA with baseline vs optimized." src="https://raw.githubusercontent.com/synth-laboratories/synth-ai/main/assets/langprobe_v2_light.png">
|
|
97
|
+
</picture>
|
|
98
|
+
</p>
|
|
99
|
+
|
|
100
|
+
<p align="center">
|
|
101
|
+
<i>Average accuracy on <a href="https://arxiv.org/abs/2502.20315">LangProBe</a> prompt optimization benchmarks.</i>
|
|
102
|
+
</p>
|
|
103
|
+
|
|
104
|
+
## Highlights
|
|
105
|
+
|
|
106
|
+
- 🚀 Train across sft, RL, and prompt opt by standing up a single cloudflared Fastapi wrapper around your code. No production code churn.
|
|
107
|
+
- ⚡️ Parallelize training and achieve 80% GPU util. via PipelineRL
|
|
108
|
+
- 🗂️ Train prompts and models across multiple experiments
|
|
109
|
+
- 🛠️ Spin up experiment queues and datastores locally for dev work
|
|
110
|
+
- 🔩 Run serverless training via cli or programmatically
|
|
111
|
+
- 🏢 Scales gpu-based model training to 64 H100s seemlessly
|
|
112
|
+
- 💾 Use GEPA-calibrated judges for fast, accurate rubric scoring
|
|
113
|
+
- 🖥️ Supports HTTP-based training across all programming languages
|
|
114
|
+
- 🤖 CLI utilities tuned for use with Claude Code, Codex, Opencode
|
|
115
|
+
|
|
116
|
+
## Getting Started
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Use with OpenAI Codex
|
|
120
|
+
uvx synth-ai codex
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Use with Opencode
|
|
125
|
+
uvx synth-ai opencode
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Synth is maintained by devs behind the [MIPROv2](https://scholar.google.com/citations?view_op=view_citation&hl=en&user=jauNVA8AAAAJ&citation_for_view=jauNVA8AAAAJ:u5HHmVD_uO8C) prompt optimizer.
|
|
129
|
+
|
|
130
|
+
## Documentation
|
|
131
|
+
|
|
132
|
+
**[docs.usesynth.ai](https://docs.usesynth.ai)**
|
|
133
|
+
|
|
134
|
+
## In-Process Runner (SDK)
|
|
135
|
+
|
|
136
|
+
Run GEPA/MIPRO/RL jobs against a tunneled task app without the CLI:
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
import asyncio
|
|
140
|
+
import os
|
|
141
|
+
from synth_ai.sdk.task import run_in_process_job
|
|
142
|
+
|
|
143
|
+
result = asyncio.run(
|
|
144
|
+
run_in_process_job(
|
|
145
|
+
job_type="prompt_learning",
|
|
146
|
+
config_path="configs/style_matching_gepa.toml",
|
|
147
|
+
task_app_path="task_apps/style_matching_task_app.py",
|
|
148
|
+
overrides={"prompt_learning.gepa.rollout.budget": 4},
|
|
149
|
+
backend_url=os.getenv("TARGET_BACKEND_BASE_URL"), # resolves envs automatically
|
|
150
|
+
)
|
|
151
|
+
)
|
|
152
|
+
print(result.job_id, result.status.get("status"))
|
|
153
|
+
```
|
synth_ai-0.3.4/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Synth
|
|
2
|
+
|
|
3
|
+
[](https://www.python.org/)
|
|
4
|
+
[](https://pypi.org/project/synth-ai/)
|
|
5
|
+
[](https://pypi.org/project/synth-ai/0.3.2.dev3/)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
Serverless Posttraining APIs for Developers
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<picture align="center">
|
|
14
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/synth-laboratories/synth-ai/main/assets/langprobe_v2_dark.png">
|
|
15
|
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/synth-laboratories/synth-ai/main/assets/langprobe_v2_light.png">
|
|
16
|
+
<img alt="Shows a bar chart comparing prompt optimization performance across Synth GEPA, Synth MIPRO, GEPA (lib), DSPy MIPRO, and DSPy GEPA with baseline vs optimized." src="https://raw.githubusercontent.com/synth-laboratories/synth-ai/main/assets/langprobe_v2_light.png">
|
|
17
|
+
</picture>
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
<p align="center">
|
|
21
|
+
<i>Average accuracy on <a href="https://arxiv.org/abs/2502.20315">LangProBe</a> prompt optimization benchmarks.</i>
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
## Highlights
|
|
25
|
+
|
|
26
|
+
- 🚀 Train across sft, RL, and prompt opt by standing up a single cloudflared Fastapi wrapper around your code. No production code churn.
|
|
27
|
+
- ⚡️ Parallelize training and achieve 80% GPU util. via PipelineRL
|
|
28
|
+
- 🗂️ Train prompts and models across multiple experiments
|
|
29
|
+
- 🛠️ Spin up experiment queues and datastores locally for dev work
|
|
30
|
+
- 🔩 Run serverless training via cli or programmatically
|
|
31
|
+
- 🏢 Scales gpu-based model training to 64 H100s seemlessly
|
|
32
|
+
- 💾 Use GEPA-calibrated judges for fast, accurate rubric scoring
|
|
33
|
+
- 🖥️ Supports HTTP-based training across all programming languages
|
|
34
|
+
- 🤖 CLI utilities tuned for use with Claude Code, Codex, Opencode
|
|
35
|
+
|
|
36
|
+
## Getting Started
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Use with OpenAI Codex
|
|
40
|
+
uvx synth-ai codex
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Use with Opencode
|
|
45
|
+
uvx synth-ai opencode
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Synth is maintained by devs behind the [MIPROv2](https://scholar.google.com/citations?view_op=view_citation&hl=en&user=jauNVA8AAAAJ&citation_for_view=jauNVA8AAAAJ:u5HHmVD_uO8C) prompt optimizer.
|
|
49
|
+
|
|
50
|
+
## Documentation
|
|
51
|
+
|
|
52
|
+
**[docs.usesynth.ai](https://docs.usesynth.ai)**
|
|
53
|
+
|
|
54
|
+
## In-Process Runner (SDK)
|
|
55
|
+
|
|
56
|
+
Run GEPA/MIPRO/RL jobs against a tunneled task app without the CLI:
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
import asyncio
|
|
60
|
+
import os
|
|
61
|
+
from synth_ai.sdk.task import run_in_process_job
|
|
62
|
+
|
|
63
|
+
result = asyncio.run(
|
|
64
|
+
run_in_process_job(
|
|
65
|
+
job_type="prompt_learning",
|
|
66
|
+
config_path="configs/style_matching_gepa.toml",
|
|
67
|
+
task_app_path="task_apps/style_matching_task_app.py",
|
|
68
|
+
overrides={"prompt_learning.gepa.rollout.budget": 4},
|
|
69
|
+
backend_url=os.getenv("TARGET_BACKEND_BASE_URL"), # resolves envs automatically
|
|
70
|
+
)
|
|
71
|
+
)
|
|
72
|
+
print(result.job_id, result.status.get("status"))
|
|
73
|
+
```
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "synth-ai"
|
|
3
|
+
version = "0.3.4"
|
|
4
|
+
description = "Serverless Posttraining for Agents - Core AI functionality and tracing"
|
|
5
|
+
authors = [{name = "Synth AI", email = "josh@usesynth.ai"}]
|
|
6
|
+
license = "MIT"
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
requires-python = ">=3.11"
|
|
9
|
+
dependencies = [
|
|
10
|
+
# Core dependencies
|
|
11
|
+
"pydantic>=2.0.0",
|
|
12
|
+
"python-dotenv>=1.0.1",
|
|
13
|
+
"requests>=2.32.3",
|
|
14
|
+
"tqdm>=4.66.4",
|
|
15
|
+
"typing_extensions>=4.0.0",
|
|
16
|
+
# AI/LLM providers
|
|
17
|
+
"rich>=13.9.0",
|
|
18
|
+
"openai>=1.99.0",
|
|
19
|
+
"anthropic>=0.42.0",
|
|
20
|
+
# Tracing and observability
|
|
21
|
+
"langfuse>=2.53.9,<3.0.0",
|
|
22
|
+
"opentelemetry-api>=1.26.0",
|
|
23
|
+
"opentelemetry-sdk>=1.26.0",
|
|
24
|
+
# Storage and caching
|
|
25
|
+
"groq>=0.30.0",
|
|
26
|
+
"google-genai>=1.26.0",
|
|
27
|
+
"together>=1.5.21",
|
|
28
|
+
"mistralai>=1.9.2",
|
|
29
|
+
# Environment framework - basic dependencies
|
|
30
|
+
"fastapi>=0.115.12",
|
|
31
|
+
"uvicorn>=0.34.2",
|
|
32
|
+
"numpy>=2.2.3",
|
|
33
|
+
"networkx>=3.4.2",
|
|
34
|
+
"sqlalchemy>=2.0.42",
|
|
35
|
+
"celery>=5.4.0",
|
|
36
|
+
"redis>=6.2.0",
|
|
37
|
+
"aiosqlite>=0.21.0",
|
|
38
|
+
"libsql>=0.1.8",
|
|
39
|
+
"pynacl>=1.5.0",
|
|
40
|
+
"click>=8.1.7,<8.2", # For CLI (pin to signature compatible with Typer)
|
|
41
|
+
"aiohttp>=3.8.0", # For async HTTP requests
|
|
42
|
+
"httpx>=0.28.1", # CLI preflights and HTTP clients (pulls httpcore)
|
|
43
|
+
"modal>=1.1.4,<2.0.0",
|
|
44
|
+
"docker>=7.0.0",
|
|
45
|
+
"mcp>=1.21.0",
|
|
46
|
+
"ruff>=0.12.9",
|
|
47
|
+
"tomli_w>=1.0.0",
|
|
48
|
+
"dspy>=3.0.4",
|
|
49
|
+
"setuptools>=80.9.0",
|
|
50
|
+
"gymnasium>=0.26.2",
|
|
51
|
+
"gepa>=0.0.17",
|
|
52
|
+
# Dataset loading - used by many task apps (banking77, math, hotpotqa, etc.)
|
|
53
|
+
"datasets>=4.0.0",
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
[project.scripts]
|
|
57
|
+
synth-ai = "synth_ai.cli:cli"
|
|
58
|
+
|
|
59
|
+
[project.optional-dependencies]
|
|
60
|
+
dev = [
|
|
61
|
+
"build>=1.2.2.post1",
|
|
62
|
+
"twine>=4.0.0",
|
|
63
|
+
"keyring>=24.0.0",
|
|
64
|
+
"pytest>=8.3.3",
|
|
65
|
+
"pytest-xdist>=3.6.1",
|
|
66
|
+
"pytest-timeout>=2.3.1",
|
|
67
|
+
"pytest-asyncio>=0.24.0",
|
|
68
|
+
"pytest-cov>=4.1.0",
|
|
69
|
+
"pyright>=1.1.350",
|
|
70
|
+
"coverage[toml]>=7.3.0",
|
|
71
|
+
"ruff>=0.1.0",
|
|
72
|
+
]
|
|
73
|
+
research = [
|
|
74
|
+
# Heavy game environment dependencies
|
|
75
|
+
"crafter>=1.8.3",
|
|
76
|
+
"datasets>=4.0.0", # For math environments
|
|
77
|
+
]
|
|
78
|
+
swe = [
|
|
79
|
+
"morphcloud>=0.1.3",
|
|
80
|
+
"swebench>=2.3.0",
|
|
81
|
+
]
|
|
82
|
+
all = [
|
|
83
|
+
# Include research and swe dependencies in all
|
|
84
|
+
"crafter>=1.8.3",
|
|
85
|
+
"datasets>=4.0.0",
|
|
86
|
+
"morphcloud>=0.1.3",
|
|
87
|
+
"swebench>=2.3.0",
|
|
88
|
+
"pyboy>=2.6.0",
|
|
89
|
+
"transformers>=4.56.1",
|
|
90
|
+
"redis>=6.2.0",
|
|
91
|
+
]
|
|
92
|
+
analytics = [
|
|
93
|
+
"pandas>=2.2.3",
|
|
94
|
+
]
|
|
95
|
+
|
|
96
|
+
[project.urls]
|
|
97
|
+
Homepage = "https://github.com/synth-laboratories/synth-ai"
|
|
98
|
+
Repository = "https://github.com/synth-laboratories/synth-ai"
|
|
99
|
+
Issues = "https://github.com/synth-laboratories/synth-ai/issues"
|
|
100
|
+
|
|
101
|
+
[build-system]
|
|
102
|
+
requires = ["setuptools>=61.0"]
|
|
103
|
+
build-backend = "setuptools.build_meta"
|
|
104
|
+
|
|
105
|
+
[tool.setuptools.packages.find]
|
|
106
|
+
include = ["synth_ai*"]
|
|
107
|
+
exclude = [
|
|
108
|
+
"docs*",
|
|
109
|
+
"tests*",
|
|
110
|
+
"scripts*",
|
|
111
|
+
"private_tests*",
|
|
112
|
+
# Exclude heavy demo/test subpackages from distribution
|
|
113
|
+
"synth_ai.*agent_demos*",
|
|
114
|
+
"synth_ai.*old*",
|
|
115
|
+
"synth_ai.*tests*",
|
|
116
|
+
"synth_ai.*units*",
|
|
117
|
+
"synth_ai.tracing_v3.tests*",
|
|
118
|
+
]
|
|
119
|
+
|
|
120
|
+
[tool.setuptools]
|
|
121
|
+
include-package-data = true
|
|
122
|
+
|
|
123
|
+
[tool.setuptools.exclude-package-data]
|
|
124
|
+
"synth_ai" = [
|
|
125
|
+
# Exclude heavy data inside agent_demos/old/tests
|
|
126
|
+
"**/agent_demos/**",
|
|
127
|
+
"**/old/**",
|
|
128
|
+
"**/tests/**",
|
|
129
|
+
"**/units/**",
|
|
130
|
+
]
|
|
131
|
+
|
|
132
|
+
[tool.setuptools.package-data]
|
|
133
|
+
"synth_ai" = [
|
|
134
|
+
"demos/demo_task_apps/math/config.toml",
|
|
135
|
+
"demos/demo_task_apps/math/deploy_task_app.sh",
|
|
136
|
+
]
|
|
137
|
+
|
|
138
|
+
[tool.pytest.ini_options]
|
|
139
|
+
testpaths = ["tests", "private_tests"]
|
|
140
|
+
python_files = "test_*.py"
|
|
141
|
+
python_classes = "Test*"
|
|
142
|
+
python_functions = "test_*"
|
|
143
|
+
asyncio_mode = "auto"
|
|
144
|
+
markers = [
|
|
145
|
+
"fast: marks tests as fast (≤5 seconds) - these are the default tests to run",
|
|
146
|
+
"slow: marks tests as slow (>5 seconds) - requires more time/resources",
|
|
147
|
+
"integration: marks tests as integration tests requiring external services",
|
|
148
|
+
"unit: marks tests as isolated unit tests",
|
|
149
|
+
"public: marks tests that can run in any environment",
|
|
150
|
+
"private: marks tests that may require credentials or special setup",
|
|
151
|
+
]
|
|
152
|
+
# Add timeout for long-running tests
|
|
153
|
+
timeout = 300
|
|
154
|
+
# Show test durations (slowest N tests)
|
|
155
|
+
addopts = "--durations=10"
|
|
156
|
+
|
|
157
|
+
[tool.coverage.run]
|
|
158
|
+
source = ["synth_ai"]
|
|
159
|
+
omit = ["*/tests/*", "*/test_*"]
|
|
160
|
+
data_file = "coverage/.coverage"
|
|
161
|
+
|
|
162
|
+
[tool.coverage.report]
|
|
163
|
+
precision = 2
|
|
164
|
+
show_missing = true
|
|
165
|
+
skip_covered = false
|
|
166
|
+
|
|
167
|
+
[tool.pyright]
|
|
168
|
+
include = ["synth_ai", "tests"]
|
|
169
|
+
exclude = ["**/__pycache__"]
|
|
170
|
+
pythonVersion = "3.11"
|
|
171
|
+
typeCheckingMode = "standard"
|
|
172
|
+
reportMissingImports = true
|
|
173
|
+
reportMissingTypeStubs = false
|
|
174
|
+
|
|
175
|
+
[tool.ruff]
|
|
176
|
+
line-length = 100
|
|
177
|
+
target-version = "py311"
|
|
178
|
+
src = ["synth_ai"]
|
|
179
|
+
extend-exclude = [
|
|
180
|
+
".venv",
|
|
181
|
+
".tmp",
|
|
182
|
+
"dev",
|
|
183
|
+
"docs",
|
|
184
|
+
"scripts",
|
|
185
|
+
"tests",
|
|
186
|
+
"private_tests",
|
|
187
|
+
"old",
|
|
188
|
+
"tauri",
|
|
189
|
+
"temp",
|
|
190
|
+
"traces",
|
|
191
|
+
"traces_*",
|
|
192
|
+
"synth_ai.db",
|
|
193
|
+
"synth_ai/tracing_v3/tests",
|
|
194
|
+
]
|
|
195
|
+
|
|
196
|
+
[tool.ruff.lint]
|
|
197
|
+
select = ["E", "F", "I", "N", "UP", "YTT", "B", "C4", "T10", "SIM"]
|
|
198
|
+
ignore = [
|
|
199
|
+
"E501", # Line too long
|
|
200
|
+
"B008", # Do not perform function call in argument defaults
|
|
201
|
+
"UP035", # Don't require `from __future__ import annotations` (not needed in 3.11+)
|
|
202
|
+
"UP006", # Allow typing.Tuple
|
|
203
|
+
"UP045", # Allow Optional[...] annotations
|
|
204
|
+
]
|
|
205
|
+
|
|
206
|
+
[tool.ruff.lint.per-file-ignores]
|
|
207
|
+
"synth_ai/http.py" = ["F403"]
|
|
208
|
+
"**/__init__.py" = ["N999"]
|
|
209
|
+
"**/__main__.py" = ["N999"]
|
|
210
|
+
|
|
211
|
+
[tool.ty]
|
|
212
|
+
# Suppress conservative warnings about possibly-missing-attribute
|
|
213
|
+
# These are false positives for dict.get() calls and dynamic attributes
|
|
214
|
+
rules = { "possibly-missing-attribute" = "ignore" }
|
|
215
|
+
|
|
216
|
+
[dependency-groups]
|
|
217
|
+
dev = [
|
|
218
|
+
"pytest>=8.3.3",
|
|
219
|
+
"pytest-xdist>=3.6.1",
|
|
220
|
+
"pytest-timeout>=2.3.1",
|
|
221
|
+
"pytest-asyncio>=0.24.0",
|
|
222
|
+
"pytest-cov>=4.1.0",
|
|
223
|
+
"ruff>=0.1.0",
|
|
224
|
+
"pyright>=1.1.350",
|
|
225
|
+
"responses>=0.25.7",
|
|
226
|
+
"httpx>=0.28.1",
|
|
227
|
+
"crafter>=1.8.3",
|
|
228
|
+
]
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from importlib import metadata as _metadata
|
|
4
|
+
from importlib.metadata import PackageNotFoundError
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
# Install log filter as early as possible to suppress noisy codex_otel logs
|
|
8
|
+
try:
|
|
9
|
+
from synth_ai.core.log_filter import install_log_filter
|
|
10
|
+
install_log_filter()
|
|
11
|
+
except Exception:
|
|
12
|
+
# Silently fail if log filter can't be installed
|
|
13
|
+
pass
|
|
14
|
+
|
|
15
|
+
# Judge schemas moved to sdk/judging/schemas.py
|
|
16
|
+
from synth_ai.sdk.judging.schemas import (
|
|
17
|
+
CriterionScorePayload,
|
|
18
|
+
JudgeOptions,
|
|
19
|
+
JudgeScoreRequest,
|
|
20
|
+
JudgeScoreResponse,
|
|
21
|
+
JudgeTaskApp,
|
|
22
|
+
JudgeTracePayload,
|
|
23
|
+
ReviewPayload,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
try: # Prefer the installed package metadata when available
|
|
27
|
+
__version__ = _metadata.version("synth-ai")
|
|
28
|
+
except PackageNotFoundError: # Fallback to pyproject version for editable installs
|
|
29
|
+
try:
|
|
30
|
+
import tomllib as _toml # Python 3.11+
|
|
31
|
+
except ModuleNotFoundError: # pragma: no cover - legacy interpreter guard
|
|
32
|
+
import tomli as _toml # type: ignore[no-redef]
|
|
33
|
+
|
|
34
|
+
try:
|
|
35
|
+
pyproject_path = Path(__file__).resolve().parents[1] / "pyproject.toml"
|
|
36
|
+
with pyproject_path.open("rb") as fh:
|
|
37
|
+
_pyproject = _toml.load(fh)
|
|
38
|
+
__version__ = str(_pyproject["project"]["version"])
|
|
39
|
+
except Exception:
|
|
40
|
+
__version__ = "0.0.0.dev0"
|
|
41
|
+
|
|
42
|
+
# Legacy tracing v1 is not required for v3 usage and can be unavailable in minimal envs.
|
|
43
|
+
tracing = None # type: ignore
|
|
44
|
+
EventPartitionElement = RewardSignal = SystemTrace = TrainingQuestion = None # type: ignore
|
|
45
|
+
trace_event_async = trace_event_sync = upload = None # type: ignore
|
|
46
|
+
|
|
47
|
+
__all__ = [
|
|
48
|
+
# Judge API contracts
|
|
49
|
+
"JudgeScoreRequest",
|
|
50
|
+
"JudgeScoreResponse",
|
|
51
|
+
"JudgeOptions",
|
|
52
|
+
"JudgeTaskApp",
|
|
53
|
+
"JudgeTracePayload",
|
|
54
|
+
"ReviewPayload",
|
|
55
|
+
"CriterionScorePayload",
|
|
56
|
+
] # Explicitly define public API (v1 tracing omitted in minimal env)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Allow running synth_ai as a module: python -m synth_ai
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import sys
|
|
7
|
+
import traceback
|
|
8
|
+
|
|
9
|
+
# Log CLI invocation immediately
|
|
10
|
+
if "train" in sys.argv:
|
|
11
|
+
sys.stderr.write(f"[SYNTH_AI_MAIN] Module invoked with args: {sys.argv}\n")
|
|
12
|
+
sys.stderr.flush()
|
|
13
|
+
|
|
14
|
+
try:
|
|
15
|
+
from .cli import cli
|
|
16
|
+
|
|
17
|
+
if "train" in sys.argv:
|
|
18
|
+
sys.stderr.write("[SYNTH_AI_MAIN] CLI imported successfully\n")
|
|
19
|
+
sys.stderr.flush()
|
|
20
|
+
|
|
21
|
+
if __name__ == "__main__":
|
|
22
|
+
if "train" in sys.argv:
|
|
23
|
+
sys.stderr.write("[SYNTH_AI_MAIN] About to call cli()\n")
|
|
24
|
+
sys.stderr.flush()
|
|
25
|
+
try:
|
|
26
|
+
cli()
|
|
27
|
+
except Exception as e:
|
|
28
|
+
sys.stderr.write(f"[SYNTH_AI_MAIN] CLI call failed: {type(e).__name__}: {e}\n")
|
|
29
|
+
sys.stderr.flush()
|
|
30
|
+
traceback.print_exc(file=sys.stderr)
|
|
31
|
+
raise
|
|
32
|
+
except Exception as e:
|
|
33
|
+
sys.stderr.write(f"[SYNTH_AI_MAIN] Import failed: {type(e).__name__}: {e}\n")
|
|
34
|
+
sys.stderr.flush()
|
|
35
|
+
traceback.print_exc(file=sys.stderr)
|
|
36
|
+
raise
|