Skip to content

Commit

Permalink
Make CamelCase class
Browse files Browse the repository at this point in the history
  • Loading branch information
qubvel committed Jan 16, 2025
1 parent c17a8c8 commit 2d7a6b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/transformers/models/omdet_turbo/processing_omdet_turbo.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class OmDetTurboProcessorKwargs(ProcessingKwargs, total=False):
}


class _dict_with_warning(dict):
class DictWithDeprecationWarning(dict):
message = (
"The `classes` key is deprecated for `OmDetTurboProcessor.post_process_grounded_object_detection` "
"output dict and will be removed in a 4.51.0 version. Please use `text_labels` instead."
Expand Down Expand Up @@ -397,7 +397,9 @@ def post_process_grounded_object_detection(
nms_threshold=nms_threshold,
max_num_det=max_num_det,
)
result = _dict_with_warning({"boxes": boxes, "scores": scores, "labels": labels, "text_labels": None})
result = DictWithDeprecationWarning(
{"boxes": boxes, "scores": scores, "labels": labels, "text_labels": None}
)
results.append(result)

# Add text labels
Expand Down

0 comments on commit 2d7a6b2

Please sign in to comment.