MCPcopy Create free account
hub / github.com/modelscope/modelscope / _sanitize_parameters

Method _sanitize_parameters

modelscope/pipelines/base.py:252–263  ·  view source on GitHub ↗

this method should sanitize the keyword args to preprocessor params, forward params and postprocess params on '__call__' or '_process_single' method considered to be a normal classmethod with default implementation / output Default Returns: Dict[str, str

(self, **pipeline_parameters)

Source from the content-addressed store, hash-verified

250 return output
251
252 def _sanitize_parameters(self, **pipeline_parameters):
253 """
254 this method should sanitize the keyword args to preprocessor params,
255 forward params and postprocess params on '__call__' or '_process_single' method
256 considered to be a normal classmethod with default implementation / output
257
258 Default Returns:
259 Dict[str, str]: preprocess_params = {}
260 Dict[str, str]: forward_params = {}
261 Dict[str, str]: postprocess_params = pipeline_parameters
262 """
263 return {}, {}, pipeline_parameters
264
265 def _process_iterator(self, input: Input, *args, **kwargs):
266 for ele in input:

Callers 2

__call__Method · 0.95
stream_generateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected