Skip to content

Reintroduce clawloop run as a TrainConfig wrapper #50

@bordeauxred

Description

@bordeauxred

Context

In #49 (the PR that closes #30), we disabled clawloop run and clawloop eval for the AI Tinkerers launch because they only wired 2 of 5+ env adapters and had drifted from the unified TrainConfig runner in examples/train_runner.py. The disabled commands now print a truthful redirect.

This issue tracks the post-launch reintroduction as a thin wrapper over the existing TrainConfig / train() path.

Proposal

clawloop run config.json becomes roughly:

def cmd_run(args):
    raw = json.loads(Path(args.config).read_text())
    config = TrainConfig(**raw)  # Pydantic validation, fail-fast
    train(config)                # dispatches via ENV_BUILDERS

Same TrainConfig schema as examples/train_runner.py. Dispatch via ENV_BUILDERS (math, harbor, entropic, openclaw, openspiel, taubench once registered). No separate --bench flag; env type comes from the config.

Outcome: examples/train_runner.py collapses to a 3-line shim that forwards to clawloop.cli.cmd_run, and the CLI becomes the canonical entry point for pip / uv installs.

Acceptance

  • clawloop run examples/configs/math_harness.json --dry-run runs successfully
  • clawloop run on each config family under examples/configs/ either runs or surfaces a Pydantic validation error (no Unknown benchmark)
  • tests/test_cli.py covers one happy path per env_type in ENV_BUILDERS
  • examples/train_runner.py is a thin shim (or removed, with docs pointing to clawloop run)
  • README updated to show clawloop run <config.json> as the benchmark command

Non-goals

  • No new config fields. Matches TrainConfig exactly.
  • No CLI-only flag overrides unless they already exist on TrainConfig. Keep the CLI surface minimal and config-file-driven.

Related

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions