Skip to content

ModelConfig

relationalai.config.config_fields

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.

Minimal YAML (in raiconfig.yaml):

default_connection: sf
connections:
sf:
type: snowflake
# ...
model:
path: model.py
implicit_properties: false

Configure 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),
)
ModelConfig.path: (str, optional)

Path to the model entry point script or directory (for example, model.py). Defaults to None.

ModelConfig.implicit_properties: bool

When 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.

ModelConfig.keep: bool

Legacy 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.

ModelConfig.isolated: bool

Legacy v0 execution control. Runs the model against an isolated copy of the RAI native app’s internal data store. Defaults to True.

ModelConfig.nowait_durable: bool

Legacy v0 execution control. Requests that execution not wait for durable writes; only partially effective on current engines. Defaults to True.

ModelConfig.reuse_model: bool

Legacy v0 execution control. Keeps the RAI native app’s internal data store available for reuse after releasing the model index. Defaults to True.

ModelConfigpydantic.BaseModel
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
        └──  What’s New in Version 1.26.0
            └──  New Features and Enhancements