synth-ai 0.2.6.dev1__py3-none-any.whl → 0.2.6.dev2__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 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
- @rl_demo.command("check")
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
- @rl_demo.command("deploy")
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
- @rl_demo.command("configure")
64
+ @_rlg.command("configure")
61
65
  def rl_configure():
62
66
  _forward(["rl_demo.configure"])
63
67
 
64
- @rl_demo.command("run")
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)
@@ -84,6 +96,20 @@ def register(cli):
84
96
  args.append("--dry-run")
85
97
  _forward(args)
86
98
 
99
+ @_rlg.command("eval")
100
+ @click.option("--config", type=click.Path(), default=None, help="Path to TOML config (optional)")
101
+ @click.option("--model", type=str, default=None, help="Model to evaluate (default Qwen/Qwen3-0.6B)")
102
+ @click.option("--timeout", type=int, default=300, help="Seconds to wait for metrics")
103
+ def rl_eval(config: str | None, model: str | None, timeout: int):
104
+ args = ["rl_demo.eval"]
105
+ if config:
106
+ args.extend(["--config", config])
107
+ if model:
108
+ args.extend(["--model", model])
109
+ if timeout is not None:
110
+ args.extend(["--timeout", str(timeout)])
111
+ _forward(args)
112
+
87
113
  # Dotted aliases (top-level) for convenience: rl_demo.check etc.
88
114
  @cli.command("rl_demo.check")
89
115
  def rl_check_alias():
@@ -112,6 +138,14 @@ def register(cli):
112
138
  def rl_configure_alias():
113
139
  _forward(["rl_demo.configure"])
114
140
 
141
+ @cli.command("rl_demo.init")
142
+ @click.option("--force", is_flag=True, help="Overwrite existing files in CWD")
143
+ def rl_init_alias(force: bool):
144
+ args = ["rl_demo.init"]
145
+ if force:
146
+ args.append("--force")
147
+ _forward(args)
148
+
115
149
  @cli.command("rl_demo.run")
116
150
  @click.option("--config", type=click.Path(), default=None, help="Path to TOML config (skip prompt)")
117
151
  @click.option("--batch-size", type=int, default=None)
@@ -135,3 +169,17 @@ def register(cli):
135
169
  args.append("--dry-run")
136
170
  _forward(args)
137
171
 
172
+ @cli.command("rl_demo.eval")
173
+ @click.option("--config", type=click.Path(), default=None, help="Path to TOML config (optional)")
174
+ @click.option("--model", type=str, default=None, help="Model to evaluate (default Qwen/Qwen3-0.6B)")
175
+ @click.option("--timeout", type=int, default=300, help="Seconds to wait for metrics")
176
+ def rl_eval_alias(config: str | None, model: str | None, timeout: int):
177
+ args = ["rl_demo.eval"]
178
+ if config:
179
+ args.extend(["--config", config])
180
+ if model:
181
+ args.extend(["--model", model])
182
+ if timeout is not None:
183
+ args.extend(["--timeout", str(timeout)])
184
+ _forward(args)
185
+