Config.set()#

relationalai
#Config.set(name: str, value: Any) -> None

Set a configuration parameter value.

Parameters#

NameTypeDescription
namestrThe name of the configuration parameter to set.
valueAnyThe value to set the configuration parameter to.

Returns#

None

Example#

Use .set() to set the value of a configuration parameter:

#import relationalai as rai

# Get the current configuration.
cfg = rai.Config()

# Set the RAI engine name and size.
cfg.set("engine", "my_engine")
cfg.set("engine_size", "HIGHMEM_X64_M")

# Create a model with the new configuration.
model = rai.Model("MyModel", config=cfg)

Note that setting a value for a configuration key with .set() doesn’t edit the raiconfig.toml file. It only changes the value on the Config object for the current session.

See Valid Profile Keys for a list of configuration parameters.

See Also#