Update configuration by re-reading yaml files and env variables This mutates the global dask.config.config, or the config parameter if passed in. This goes through the following stages: 1. Clearing out all old configuration 2. Updating from the stored defaults from down
(
config: dict | None = None,
defaults: list[Mapping] = defaults,
paths: list[str] = paths,
env: Mapping[str, str] | None = None,
)
| 562 | |
| 563 | |
| 564 | def refresh( |
| 565 | config: dict | None = None, |
| 566 | defaults: list[Mapping] = defaults, |
| 567 | paths: list[str] = paths, |
| 568 | env: Mapping[str, str] | None = None, |
| 569 | ) -> None: |
| 570 | """ |
| 571 | Update configuration by re-reading yaml files and env variables |
| 572 | |
| 573 | This mutates the global dask.config.config, or the config parameter if |
| 574 | passed in. |
| 575 | |
| 576 | This goes through the following stages: |
| 577 | |
| 578 | 1. Clearing out all old configuration |
| 579 | 2. Updating from the stored defaults from downstream libraries |
| 580 | (see update_defaults) |
| 581 | 3. Updating from yaml files and environment variables |
| 582 | 4. Automatically renaming deprecated keys (with a warning) |
| 583 | |
| 584 | Note that some functionality only checks configuration once at startup and |
| 585 | may not change behavior, even if configuration changes. It is recommended |
| 586 | to restart your python process if convenient to ensure that new |
| 587 | configuration changes take place. |
| 588 | |
| 589 | See Also |
| 590 | -------- |
| 591 | dask.config.collect: for parameters |
| 592 | dask.config.update_defaults |
| 593 | """ |
| 594 | if config is None: # Keep Sphinx autofunction documentation clean |
| 595 | config = global_config |
| 596 | |
| 597 | config.clear() |
| 598 | |
| 599 | for d in defaults: |
| 600 | update(config, d, priority="old") |
| 601 | update(config, collect(paths=paths, env=env)) |
| 602 | |
| 603 | |
| 604 | def get( |
searching dependent graphs…