nas: 4 new CLI commands + --group on model list (G4)#474
Open
probicheaux wants to merge 1 commit intomainfrom
Open
nas: 4 new CLI commands + --group on model list (G4)#474probicheaux wants to merge 1 commit intomainfrom
probicheaux wants to merge 1 commit intomainfrom
Conversation
Wraps the new public API routes from the agentic-surface-area onsite plan:
roboflow train cancel <project>/<version> [--continue-if-no-refund]
roboflow train stop <project>/<version>
roboflow train results <project>/<version>
roboflow model star <model-id> [--unstar]
Plus extends `roboflow model list -p <project>` with `-g/--group <modelGroup>`,
the canonical "list NAS models per run" path. When --group is set, the list
command hits the public /models endpoint (full enriched projection: hardware,
latency, map5095, paretoOptimalFor, recommended ★) instead of walking versions
via the SDK.
Adapter additions in roboflow/adapters/rfapi.py:
cancel_version_training, stop_version_training, get_training_results,
list_project_models (with optional group), get_model_by_url,
favorite_nas_model
Backend companions:
- roboflow#11603 (G1, validator)
- roboflow#11605 (G6, projection + ?group=)
- roboflow#11610 (G2, public train cancel/stop + favorite)
- roboflow#11612 (G3, training results)
Tests: +13 cases across test_train_handler.py and test_model_handler.py
covering register, success paths, 409 + MODEL_NOT_NAS hint surfacing,
unstar flow, and the --group endpoint switch. All 298 CLI tests pass
locally; ruff check + ruff format clean.
CLI-COMMANDS.md updated with two new sections (train lifecycle + NAS
list/star/deploy).
E2E: driven against staging (api.roboflow.one) on
peter-robicheaux/beer-can-hackathon:
- `train results .../410` returned full NAS bundle (52 models,
recommendedByHardware, modelGroup)
- `model list -p ... -g <modelGroup>` rendered 53-row leaderboard
table with HARDWARE / LATENCY / MAP50 / MAP5095 / REC columns
- `model star 14CwSGmGetWh6rB0EnjL` → success, favorites reflected
- `model star --unstar` flips state
- `train cancel .../318` (finished version) → 409 surfaces hint
"Cancel only applies to in-flight runs."
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Wraps the new public API routes from the agentic-surface-area onsite plan as CLI commands. Companion backend PRs:
New CLI commands
Plus
roboflow model list -p <project> -g/--group <modelGroup>— the canonical "list NAS models per run" path. When--groupis set, the list command hits the public/modelsendpoint with the enriched projection (hardware/latency/map5095/paretoOptimalFor/recommended) instead of walking versions via the SDK.Adapter additions
In
roboflow/adapters/rfapi.py:cancel_version_training,stop_version_trainingget_training_resultslist_project_models(with optionalgroup=),get_model_by_urlfavorite_nas_modelTests
+13 cases across
test_train_handler.pyandtest_model_handler.pycovering register, happy paths, the 409/CANNOT_CANCELhint surfacing, theMODEL_NOT_NAShint, the unstar flow, and the--groupendpoint switch. 298/298 CLI tests pass locally;ruff check+ruff formatclean.CLI-COMMANDS.mdgot two new sections — Train, monitor, cancel, stop and NAS models — list, star, deploy.E2E
Driven against staging (
api.roboflow.one) onpeter-robicheaux/beer-can-hackathon:E2E exposed one error-shape mismatch on the backend (flat
{error: "Conflict", message: ...}lost the descriptive message through the CLI's parser); fixed in roboflow#11610 (nested{error: {message, code, type}}).How tested
python -m pytest tests/cli/(298 passing) + manualroboflow ...invocations against staging.