config dictionary at initialization and an options dictionary per call. Understanding the difference between static and dynamic configuration keys is essential for using the API correctly.
Static vs dynamic config
Configuration keys are divided into two categories:-
Static keys can only be set at initialization via
config={}. Attempting to override them per-call viaoptions={}raises aValueError. These keys affect model loading or resource allocation and cannot be changed between calls. -
Dynamic keys can be set at initialization via
config={}(setting a default) or overridden per-call viaoptions={}.
Setting config at initialization
Pass aconfig dictionary when creating the model:
Overriding per call
Pass anoptions dictionary to the prediction method:
Error behavior
Attempting to override a static key per-call raises aValueError:
