tempo.serve.utils moduleΒΆ

tempo.serve.utils.model(name: str, local_folder: str = None, uri: str = None, platform: tempo.serve.metadata.ModelFramework = <ModelFramework.Custom: 'custom'>, inputs: Optional[Union[Type, List, Dict[str, Type]]] = None, outputs: Optional[Union[Type, List, Dict[str, Type]]] = None, conda_env: str = None, protocol: tempo.serve.protocol.Protocol = V2Protocol(), runtime_options: Union[tempo.serve.metadata.KubernetesRuntimeOptions, tempo.serve.metadata.DockerOptions, tempo.serve.metadata.EnterpriseRuntimeOptions] = DockerOptions(runtime='tempo.seldon.SeldonDockerRuntime', state_options=StateOptions(state_type=<StateTypes.LOCAL: 'LOCAL'>, key_prefix='', host='', port=''), insights_options=InsightsOptions(worker_endpoint='', batch_size=1, parallelism=1, retries=3, window_time=0, mode_type=<InsightRequestModes.NONE: 'NONE'>, in_asyncio=False), ingress_options=IngressOptions(ingress='tempo.ingress.istio.IstioIngress', ssl=False, verify_ssl=True)), description: str = '')ΒΆ
Parameters
  • name – Name of the model. Needs to be Kubernetes compliant.

  • protocol – tempo.serve.protocol.Protocol. Defaults to KFserving V2.

  • local_folder – Location of local artifacts.

  • uri – Location of remote artifacts.

  • inputs – The input types.

  • outputs – The output types.

  • conda_env – The conda environment name to use. If not specified will look for conda.yaml in local_folder or generate from current running environment.

  • runtime_options – The runtime options. Can be left empty and set when creating a runtime.

  • platform – The tempo.serve.metadata.ModelFramework

  • description – Description of the model

Returns

A decorated function or class as a Tempo Model.

tempo.serve.utils.pipeline(name: str, protocol: tempo.serve.protocol.Protocol = V2Protocol(), local_folder: str = None, uri: str = None, models: tempo.serve.pipeline.PipelineModels = None, inputs: Optional[Union[Type, List, Dict[str, Type]]] = None, outputs: Optional[Union[Type, List, Dict[str, Type]]] = None, conda_env: str = None, runtime_options: Union[tempo.serve.metadata.KubernetesRuntimeOptions, tempo.serve.metadata.DockerOptions, tempo.serve.metadata.EnterpriseRuntimeOptions] = DockerOptions(runtime='tempo.seldon.SeldonDockerRuntime', state_options=StateOptions(state_type=<StateTypes.LOCAL: 'LOCAL'>, key_prefix='', host='', port=''), insights_options=InsightsOptions(worker_endpoint='', batch_size=1, parallelism=1, retries=3, window_time=0, mode_type=<InsightRequestModes.NONE: 'NONE'>, in_asyncio=False), ingress_options=IngressOptions(ingress='tempo.ingress.istio.IstioIngress', ssl=False, verify_ssl=True)), description: str = '')ΒΆ

A decorator for a class or function to make it a Tempo Pipeline.

Parameters
  • name – Name of the pipeline. Needs to be Kubernetes compliant.

  • protocol – tempo.serve.protocol.Protocol. Defaults to KFserving V2.

  • local_folder – Location of local artifacts.

  • uri – Location of remote artifacts.

  • models – A list of models defined as PipelineModels.

  • inputs – The input types.

  • outputs – The output types.

  • conda_env – The conda environment name to use. If not specified will look for conda.yaml in local_folder or generate from current running environment.

  • runtime_options – The runtime options. Can be left empty and set when creating a runtime.

  • description – Description of the pipeline

Returns

A decorated class or function.

tempo.serve.utils.predictmethod(f)ΒΆ