Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,15 @@ def validate(self) -> "BlockManifest":
raise ValueError(
"Must pass list of classes to this block when using gemini or claude"
)
if (
self.model_type == "florence-2"
and self.task_type == "open-vocabulary-object-detection"
and self.classes is None
):
raise ValueError(
"Must pass list of classes to this block when using florence-2 "
"with open-vocabulary-object-detection task"
)

return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,15 @@ def validate(self) -> "BlockManifest":
raise ValueError(
"Must pass list of classes to this block when using gemini or claude"
)
if (
self.model_type == "florence-2"
and self.task_type == "open-vocabulary-object-detection"
and self.classes is None
):
raise ValueError(
"Must pass list of classes to this block when using florence-2 "
"with open-vocabulary-object-detection task"
)

return self

Expand Down
Loading