Initializes the configuration by loading YAML files, and applying CLI, env, and kwarg overrides.
(argv: list[str], **kwargs)
| 198 | |
| 199 | |
| 200 | def initialize(argv: list[str], **kwargs) -> HyperParameters: |
| 201 | """Initializes the configuration by loading YAML files, and applying CLI, env, and kwarg overrides.""" |
| 202 | pydantic_config = initialize_pydantic(argv, **kwargs) |
| 203 | config = HyperParameters(pydantic_config) |
| 204 | |
| 205 | if config.log_config: |
| 206 | for k, v in sorted(config.get_keys().items()): |
| 207 | if k != "hf_access_token": |
| 208 | logger.info("Config param %s: %s", k, v) |
| 209 | |
| 210 | return config |
| 211 | |
| 212 | |
| 213 | def initialize_pydantic(argv: list[str], **kwargs) -> MaxTextConfig: |
nothing calls this directly
no test coverage detected