configuration
langroid/utils/configuration.py
update_global_settings(cfg, keys)
¶
Update global settings so modules can access them via (as an example):
Caution we do not want to have too many such global settings! Args: cfg: pydantic config, typically from a main script keys: which keys from cfg to use, to update the global settings objectSource code in langroid/utils/configuration.py
set_global(key_vals)
¶
temporary_settings(temp_settings)
¶
Temporarily update the global settings and restore them afterward.
Source code in langroid/utils/configuration.py
quiet_mode(quiet=True)
¶
Temporarily set quiet=True in global settings and restore afterward.
Source code in langroid/utils/configuration.py
set_env(settings)
¶
Set environment variables from a BaseSettings instance Args: settings (BaseSettings): desired settings Returns: