synth-ai 0.2.6.dev1__py3-none-any.whl → 0.2.6.dev3__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.
- synth_ai/cli/rl_demo.py +24 -5
- synth_ai/demos/core/cli.py +443 -40
- synth_ai/demos/demo_task_apps/math/_common.py +17 -0
- synth_ai/demos/demo_task_apps/math/modal_task_app.py +415 -0
- synth_ai/environments/examples/crafter_classic/agent_demos/crafter_modal_ft/filter_traces_sft_turso.py +23 -9
- synth_ai/environments/service/app.py +13 -6
- synth_ai/http.py +26 -102
- synth_ai/http_client.py +104 -0
- synth_ai/lm/core/synth_models.py +2 -2
- {synth_ai-0.2.6.dev1.dist-info → synth_ai-0.2.6.dev3.dist-info}/METADATA +1 -1
- {synth_ai-0.2.6.dev1.dist-info → synth_ai-0.2.6.dev3.dist-info}/RECORD +15 -12
- {synth_ai-0.2.6.dev1.dist-info → synth_ai-0.2.6.dev3.dist-info}/WHEEL +0 -0
- {synth_ai-0.2.6.dev1.dist-info → synth_ai-0.2.6.dev3.dist-info}/entry_points.txt +0 -0
- {synth_ai-0.2.6.dev1.dist-info → synth_ai-0.2.6.dev3.dist-info}/licenses/LICENSE +0 -0
- {synth_ai-0.2.6.dev1.dist-info → synth_ai-0.2.6.dev3.dist-info}/top_level.txt +0 -0
synth_ai/cli/rl_demo.py
CHANGED
|
@@ -34,13 +34,17 @@ def register(cli):
|
|
|
34
34
|
def rl_demo():
|
|
35
35
|
"""RL Demo commands (separate from legacy demo)."""
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
# Help pyright understand dynamic Click group attributes
|
|
38
|
+
from typing import Any, cast as _cast
|
|
39
|
+
_rlg = _cast(Any, rl_demo)
|
|
40
|
+
|
|
41
|
+
@_rlg.command("check")
|
|
38
42
|
def rl_check():
|
|
39
43
|
_forward(["rl_demo.check"]) # reuse same implementation
|
|
40
44
|
|
|
41
45
|
# (prepare command removed; consolidated into configure)
|
|
42
46
|
|
|
43
|
-
@
|
|
47
|
+
@_rlg.command("deploy")
|
|
44
48
|
@click.option("--local", is_flag=True, help="Run local FastAPI instead of Modal deploy")
|
|
45
49
|
@click.option("--app", type=click.Path(), default=None, help="Path to Modal app.py for uv run modal deploy")
|
|
46
50
|
@click.option("--name", type=str, default="synth-math-demo", help="Modal app name")
|
|
@@ -57,11 +61,19 @@ def register(cli):
|
|
|
57
61
|
args.extend(["--script", script])
|
|
58
62
|
_forward(args)
|
|
59
63
|
|
|
60
|
-
@
|
|
64
|
+
@_rlg.command("configure")
|
|
61
65
|
def rl_configure():
|
|
62
66
|
_forward(["rl_demo.configure"])
|
|
63
67
|
|
|
64
|
-
@
|
|
68
|
+
@_rlg.command("init")
|
|
69
|
+
@click.option("--force", is_flag=True, help="Overwrite existing files in CWD")
|
|
70
|
+
def rl_init(force: bool):
|
|
71
|
+
args = ["rl_demo.init"]
|
|
72
|
+
if force:
|
|
73
|
+
args.append("--force")
|
|
74
|
+
_forward(args)
|
|
75
|
+
|
|
76
|
+
@_rlg.command("run")
|
|
65
77
|
@click.option("--config", type=click.Path(), default=None, help="Path to TOML config (skip prompt)")
|
|
66
78
|
@click.option("--batch-size", type=int, default=None)
|
|
67
79
|
@click.option("--group-size", type=int, default=None)
|
|
@@ -112,6 +124,14 @@ def register(cli):
|
|
|
112
124
|
def rl_configure_alias():
|
|
113
125
|
_forward(["rl_demo.configure"])
|
|
114
126
|
|
|
127
|
+
@cli.command("rl_demo.init")
|
|
128
|
+
@click.option("--force", is_flag=True, help="Overwrite existing files in CWD")
|
|
129
|
+
def rl_init_alias(force: bool):
|
|
130
|
+
args = ["rl_demo.init"]
|
|
131
|
+
if force:
|
|
132
|
+
args.append("--force")
|
|
133
|
+
_forward(args)
|
|
134
|
+
|
|
115
135
|
@cli.command("rl_demo.run")
|
|
116
136
|
@click.option("--config", type=click.Path(), default=None, help="Path to TOML config (skip prompt)")
|
|
117
137
|
@click.option("--batch-size", type=int, default=None)
|
|
@@ -134,4 +154,3 @@ def register(cli):
|
|
|
134
154
|
if dry_run:
|
|
135
155
|
args.append("--dry-run")
|
|
136
156
|
_forward(args)
|
|
137
|
-
|