"...text-generation-inference.git" did not exist on "c5de7cd88679bc0331185c9cee75e4f68412243d"
Unverified Commit d416b2c2 authored by Nicolas Hug's avatar Nicolas Hug Committed by GitHub
Browse files

Fix `handle_legacy_interface` when passing strings (#5063)

parent 65438e9e
...@@ -43,6 +43,7 @@ def handle_legacy_interface(**weights: Tuple[str, Union[Optional[W], Callable[[D ...@@ -43,6 +43,7 @@ def handle_legacy_interface(**weights: Tuple[str, Union[Optional[W], Callable[[D
if ( if (
(weights_param not in kwargs and pretrained_param not in kwargs) (weights_param not in kwargs and pretrained_param not in kwargs)
or isinstance(weights_arg, WeightsEnum) or isinstance(weights_arg, WeightsEnum)
or (isinstance(weights_arg, str) and weights_arg != "legacy")
or weights_arg is None or weights_arg is None
): ):
continue continue
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment