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

Method postprocess

modelscope/pipelines/base.py:429–442  ·  view source on GitHub ↗

If current pipeline support model reuse, common postprocess code should be write here. Args: inputs: input data post_params: post process parameters Return: dict of results: a dict containing outputs of model, each

(self, inputs: Dict[str, Any],
                    **post_params)

Source from the content-addressed store, hash-verified

427 return self.model(inputs, **forward_params)
428
429 def postprocess(self, inputs: Dict[str, Any],
430 **post_params) -> Dict[str, Any]:
431 """ If current pipeline support model reuse, common postprocess
432 code should be write here.
433
434 Args:
435 inputs: input data
436 post_params: post process parameters
437
438 Return:
439 dict of results: a dict containing outputs of model, each
440 output should have the standard output name.
441 """
442 raise NotImplementedError('postprocess')
443
444
445class DistributedPipeline(Pipeline):

Callers 6

_process_singleMethod · 0.95
_process_batchMethod · 0.95
_stream_singleMethod · 0.45
_stream_batchMethod · 0.45
export_saved_modelMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected