Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugs: Fix an f-string bug in Tranformers framework. #3753

Merged
merged 1 commit into from
Apr 10, 2023
Merged
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
4 changes: 2 additions & 2 deletions src/bentoml/_internal/frameworks/transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ def save_model(
# backward compatibility
if pipeline is not None:
warnings.warn(
f"The '{pipeline=}' argument is deprecated and will be removed in the future. Please use 'pretrained_or_pipeline' instead.",
f"The 'pipeline={pipeline}' argument is deprecated and will be removed in the future. Please use 'pretrained_or_pipeline' instead.",
DeprecationWarning,
)
pretrained_or_pipeline = pipeline
Expand Down Expand Up @@ -834,7 +834,7 @@ def save_model(
pretrained = t.cast("PreTrainedProtocol", pretrained_or_pipeline)
assert all(
hasattr(pretrained, defn) for defn in ("save_pretrained", "from_pretrained")
), f"'{pretrained=}' is not a valid Transformers object. It must have 'save_pretrained' and 'from_pretrained' methods."
), f"'pretrained={pretrained}' is not a valid Transformers object. It must have 'save_pretrained' and 'from_pretrained' methods."
if metadata is None:
metadata = {}

Expand Down