Skip to content

[ar-api] Return Action Recognition training IDs from CLI (VID-34) - #537

Merged
digaobarbosa merged 2 commits into
mainfrom
bc/VID-34
Oct 1, 2026
Merged

digaobarbosa merged 2 commits into
mainfrom
bc/VID-34

Conversation

@digaobarbosa

@digaobarbosa digaobarbosa commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Description

CLI users starting Action Recognition training received no run ID. That made a new run hard to identify when a version could hold several trainings.

The command now uses the existing v2 training endpoint for the supported Action Recognition model, even without a recipe. It prepares the required video export and prints the run ID in JSON and text.

Explicit recipes keep their validation and --epochs behavior. Other recipe-free models keep their existing route. Command help notes the distinction briefly.

Validation

  • python -m unittest tests.cli.test_train_handler.TestActionRecognitionTrainCLI tests.cli.test_train_handler.TestTrainStartV2 tests.test_version tests.test_rfapi tests.util.test_versions: 90 passed on 0e91b4a.
  • Public CLI tests use isolated HTTP responses through the real adapters. They cover a missing video-coco export, a v2 request without trainRecipe or recipe GET, returned ID in text/JSON, legacy non-AR and Cosmos VLM routes, explicit recipe with epochs, and malformed recipe rejection.
  • make check_code_quality (Ruff format/check and mypy), test-file Ruff checks, and git diff --check passed.
  • A broader local run hit one existing test that makes an unmocked GET to api.roboflow.com; DNS is restricted in this session. It did not reach that endpoint.

Staging E2E (live, October 1, 2026)

The private staging version was generated with video-coco already exported. The API key was supplied only through the environment.

Input:

$ roboflow --json --workspace model-evaluation-workspace train start -p punch-hook-actions -v 2 --type cosmos3-edge --epochs 1

Output (exact sanitized CLI JSON, exit 0):

{"status":"running","project":"punch-hook-actions","version":2,"trainingId":"00395fbde08e0757e83d","jobId":"punch-hook-actions-2-f7hzx"}

Input (read back the exact new run):

$ roboflow --json --workspace model-evaluation-workspace train list punch-hook-actions/2

Output (selected record):

{"id":"00395fbde08e0757e83d","modelType":"cosmos3-edge","status":"running","modelIds":[]}

One recipe-free CLI start created this run. The status read confirms it persisted; terminal training outcome is pending.

Platform contract and runtime limit

At platform roboflow/roboflow master 53dcfc1804da41f629e291ec5d6e8e4ef8573918, the existing v1 POST /train returns 204 without a run ID; v2 POST /v2/trainings returns 200 with trainingId, status, and jobId. This SDK PR needs no new platform route or deployment target. Fixtures cover the request shape and guards. One live staging CLI creation succeeded and returned a persisted training ID; the run is still in progress, so job completion and model usability remain unverified. This staging result does not establish production deployment or package publication. Package publication is separate from this PR.

@digaobarbosa digaobarbosa self-assigned this Oct 1, 2026
@digaobarbosa
digaobarbosa requested a review from a team October 1, 2026 17:46
@digaobarbosa
digaobarbosa marked this pull request as ready for review October 1, 2026 17:47
@digaobarbosa
digaobarbosa merged commit fc554e4 into main Oct 1, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants