Skip to content

Commit

Permalink
added warning for not using input arguments in get transform method
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasMut committed Jun 18, 2024
1 parent 4e369f4 commit 9c921fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions thingsvision/core/extraction/extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ def get_default_transformation(
apply_center_crop: bool = True,
) -> Any:
if self.weights:
warnings.warn(
message="\nInput arguments are ignored because transforms are automatically infered transforms from model weights.\n",
category=UserWarning,
stacklevel=2,
)
transforms = self.weights.transforms()
else:
transforms = super().get_default_transformation(
Expand Down

0 comments on commit 9c921fd

Please sign in to comment.