Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Walter Martin <[email protected]>
  • Loading branch information
wamartin-aml committed Apr 2, 2024
1 parent 5915d23 commit 83ef743
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inference_schema/schema_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 83ef743

Please sign in to comment.