Skip to content

Configure compilation behavior

When you deploy a model, PyRel compiles its definitions into a plan for creating and refreshing the model’s outputs. Compilation can catch problems such as incompatible types before PyRel applies that plan.

Use this table to choose which setting to change:

SettingUse it when
Dry-run modeYou want to compile the model without applying the resulting plan or triggering its refreshes. The surrounding deployment workflow can still write metadata.
Soft type errorsYou want compilation to continue after reporting type-inference errors while you investigate them.

Set compiler.dry_run to true to compile the model without executing the resulting plan or starting its refreshes. The setting defaults to false.

Dry-run mode doesn’t show what a deployment would change in Snowflake. For that, review a deployment plan instead.

Select the tab for your preferred configuration method to see how to set it up.

  1. Set compiler.dry_run in raiconfig.yaml

    connections:
    # ...
    compiler:
    dry_run: true
  2. Inspect the parsed config

    from relationalai.semantics import Model
    m = Model("MyModel")
    print(m.config.compiler.dry_run)

    A printed value of True confirms that PyRel loaded the dry_run setting from your config.

Each example should print True. This confirms only that PyRel loaded the setting, not that the model compiles or that deployment is free of side effects. If the value is different, check the active profile and configuration overrides in Load configuration from files.

Set compiler.soft_type_errors to true to let compilation continue after reporting errors found during type inference. The setting applies when PyRel compiles a model for deployment and defaults to false, so those errors normally stop compilation.

Select the tab for your preferred configuration method to see how to set it up.

  1. Set compiler.soft_type_errors in raiconfig.yaml

    connections:
    # ...
    compiler:
    soft_type_errors: true
  2. Inspect the parsed config

    from relationalai.semantics import Model
    m = Model("MyModel")
    print(m.config.compiler.soft_type_errors)

    A printed value of True confirms that PyRel loaded the soft_type_errors setting from your config.

Each example should print True. This confirms only that PyRel loaded the setting. If the value is different, check the active profile and configuration overrides in Load configuration from files.