Add warning for task=classify with mode=track (#18621)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Ultralytics Assistant <135830346+UltralyticsAssistant@users.noreply.github.com>
This commit is contained in:
parent
9aaf6447a2
commit
9a89186b52
1 changed files with 6 additions and 1 deletions
|
|
@ -913,7 +913,12 @@ def entrypoint(debug=""):
|
||||||
# Task
|
# Task
|
||||||
task = overrides.pop("task", None)
|
task = overrides.pop("task", None)
|
||||||
if task:
|
if task:
|
||||||
if task not in TASKS:
|
if task == "classify" and mode == "track":
|
||||||
|
raise ValueError(
|
||||||
|
f"❌ Classification doesn't support 'mode=track'. Valid modes for classification are"
|
||||||
|
f" {MODES - {'track'}}.\n{CLI_HELP_MSG}"
|
||||||
|
)
|
||||||
|
elif task not in TASKS:
|
||||||
raise ValueError(f"Invalid 'task={task}'. Valid tasks are {TASKS}.\n{CLI_HELP_MSG}")
|
raise ValueError(f"Invalid 'task={task}'. Valid tasks are {TASKS}.\n{CLI_HELP_MSG}")
|
||||||
if "model" not in overrides:
|
if "model" not in overrides:
|
||||||
overrides["model"] = TASK2MODEL[task]
|
overrides["model"] = TASK2MODEL[task]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue