ModelConfig
Configure model behavior.
These settings control cross-cutting behaviors for running a
Model. Most users
only need to use path and implicit_properties.
keep, isolated, nowait_durable, and reuse_model are legacy
execution controls retained for compatibility with PyRel v0 applications
and should only be used under guidance from RelationalAI support.
To configure where a model deploys, use the deployment section (see
DeploymentConfig);
the historical model.schema setting has moved to deployment.schema.
Examples
Minimal YAML (in raiconfig.yaml):
default_connection: sfconnections: sf: type: snowflake # ...model: path: model.py implicit_properties: falseConfigure model settings using a dict:
from relationalai.config import create_config
cfg = create_config( model={"implicit_properties": False},)Configure model settings using an explicit ModelConfig instance:
from relationalai.config import create_config, ModelConfig
cfg = create_config( model=ModelConfig(implicit_properties=False),)Attributes
.path
ModelConfig.path: (str, optional)Path to the model entry point script or directory (for example,
model.py). Defaults to None.
.implicit_properties
ModelConfig.implicit_properties: boolWhen True, undeclared properties may be created on first access.
Set to False to require every property to be declared before use,
so that accessing an unknown property raises an error. Defaults to
True.
.keep
ModelConfig.keep: boolLegacy v0 execution control. Keeps the RAI native app’s internal data
store for this model after execution instead of cleaning it up. Defaults
to True.
.isolated
ModelConfig.isolated: boolLegacy v0 execution control. Runs the model against an isolated copy
of the RAI native app’s internal data store. Defaults to True.
.nowait_durable
ModelConfig.nowait_durable: boolLegacy v0 execution control. Requests that execution not wait for
durable writes; only partially effective on current engines.
Defaults to True.
.reuse_model
ModelConfig.reuse_model: boolLegacy v0 execution control. Keeps the RAI native app’s internal data
store available for reuse after releasing the model index. Defaults to
True.
Inheritance Hierarchy
Referenced By
RelationalAI Documentation ├── Build With RelationalAI │ └── Understand how PyRel works │ ├── Configure PyRel │ │ └── Configure a model │ └── Build a semantic model │ └── Define base facts └── Release Notes └── Python API Release Notes └── What’s New in Version 1.0.5 └── Bug Fixes