English
Generated from Trainer
Inference Endpoints
Michael Brunzel commited on
Commit
2d660d0
1 Parent(s): 8c88b7a

Exclude unnecessary params

Browse files
Files changed (1) hide show
  1. handler.py +4 -0
handler.py CHANGED
@@ -47,6 +47,10 @@ class EndpointHandler:
47
 
48
  # pass inputs with all kwargs in data
49
  if parameters is not None:
 
 
 
 
50
  outputs = self.pipe(
51
  prompts,
52
  **parameters)
 
47
 
48
  # pass inputs with all kwargs in data
49
  if parameters is not None:
50
+ # Make endpoint compatible with hf client library
51
+ exclude_list = ["stop", "watermark", "details", "decoder_input_details"]
52
+ parameters = {name: val for name, val in parameters.items if name not in exclude_list}
53
+
54
  outputs = self.pipe(
55
  prompts,
56
  **parameters)