cog
0f4cf3da - Support kwargs predictors (#2345)

Commit
307 days ago
Support kwargs predictors (#2345) This change allows a predictor input to be defined exclusively as `**kwargs`. This is an experimental change that allows a model to be used as a proxy where any inputs will be passed through directly without modification. ```py import json def predict(**kwargs) -> str: return json.dumps(kwargs) ``` This change restricts the use of `**kwargs` to functions/methods that accept only that as an argument to avoid the complexity of having to support both dynamic and fixed inputs. The OpenAPI schema for such a model will be: ```json { "properties": {}, "additionalProperties": true, "type": "object", "title": "Input" } ```
Author
Parents
Loading