xinference.client.Client.register_model#
- Client.register_model(model_type: str, model: str, persist: bool, worker_ip: str | None = None)[源代码]#
Register a custom model.
- 参数:
model_type (str) -- The type of model.
model (str) -- The model definition. (refer to: https://inference.readthedocs.io/en/latest/models/custom.html)
worker_ip (Optional[str]) -- The IP address of the worker on which the model is running.
persist (bool)
- 抛出:
RuntimeError -- Report failure to register the custom model. Provide details of failure through error message.