Skip to content

ModelConfig

relationalai.config.config_fields

Configure model execution defaults.

This controls a few cross-cutting behaviors for running a Model, such as whether the model is kept after execution, run in isolation, and whether missing properties may be created implicitly.

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/directory (e.g. model.py).

ModelConfig.keep: bool

Keep the model after execution.

ModelConfig.isolated: bool

Run the model in isolated mode.

ModelConfig.nowait_durable: bool

Do not wait for durable operations.

ModelConfig.implicit_properties: bool

Allow undeclared properties to be created on first access (when True).

ModelConfigpydantic.BaseModel
RelationalAI Documentation
├──  Build With RelationalAI
│   └──  Understand how PyRel works > Build a semantic model
│       └──  Define base facts
└──  Release Notes
    └──  Python API Release Notes
        └──  What’s New in Version 1.0.5
            └──  Bug Fixes