From 83ef74396b2c64cb44b6917beffd228d08d5d88b Mon Sep 17 00:00:00 2001 From: Walter Martin Date: Tue, 2 Apr 2024 12:02:00 -0400 Subject: [PATCH] lint Signed-off-by: Walter Martin --- inference_schema/schema_decorators.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inference_schema/schema_decorators.py b/inference_schema/schema_decorators.py index 940b332..cf42dfb 100644 --- a/inference_schema/schema_decorators.py +++ b/inference_schema/schema_decorators.py @@ -44,8 +44,9 @@ def input_schema(param_name, param_type, convert_to_provided_type=True, optional @_schema_decorator(attr_name=INPUT_SCHEMA_ATTR, schema=swagger_schema, supported_versions=supported_versions) def decorator_input(user_run, instance, args, kwargs): args_keys = args[0].keys() + is_hftransformersv2 = len(args_keys) == 2 and "parameters" in args_keys and "input_string" in args_keys # skip all of this for hftransformersv2 - if convert_to_provided_type and not (len(args_keys) == 2 and "parameters" in args_keys and "input_string" in args_keys): + if convert_to_provided_type and not is_hftransformersv2: args = list(args) if param_name not in kwargs.keys() and not optional: decorators = _get_decorators(user_run)