Read the config from specified JSON/YAML file or a dictionary and override the config content in the `self.config` dictionary. Args: f: filepath of the config file, the content must be a dictionary, if providing a list of files, wil merge the con
(self, f: PathLike | Sequence[PathLike] | dict, **kwargs: Any)
| 512 | self.set(self.load_config_files(f, **kwargs), self.meta_key) |
| 513 | |
| 514 | def read_config(self, f: PathLike | Sequence[PathLike] | dict, **kwargs: Any) -> None: |
| 515 | """ |
| 516 | Read the config from specified JSON/YAML file or a dictionary and |
| 517 | override the config content in the `self.config` dictionary. |
| 518 | |
| 519 | Args: |
| 520 | f: filepath of the config file, the content must be a dictionary, |
| 521 | if providing a list of files, wil merge the content of them. |
| 522 | if providing a dictionary directly, use it as config. |
| 523 | kwargs: other arguments for ``json.load`` or ``yaml.safe_load``, depends on the file format. |
| 524 | |
| 525 | """ |
| 526 | content = {self.meta_key: self.get(self.meta_key, {})} |
| 527 | content.update(self.load_config_files(f, **kwargs)) |
| 528 | self.set(config=content) |
| 529 | |
| 530 | def _do_resolve(self, config: Any, id: str = "") -> Any: |
| 531 | """ |