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, **kwargs
)
| 525 | |
| 526 | |
| 527 | def refresh( |
| 528 | config: dict | None = None, defaults: list[Mapping] = defaults, **kwargs |
| 529 | ) -> None: |
| 530 | """ |
| 531 | Update configuration by re-reading yaml files and env variables |
| 532 | |
| 533 | This mutates the global dask.config.config, or the config parameter if |
| 534 | passed in. |
| 535 | |
| 536 | This goes through the following stages: |
| 537 | |
| 538 | 1. Clearing out all old configuration |
| 539 | 2. Updating from the stored defaults from downstream libraries |
| 540 | (see update_defaults) |
| 541 | 3. Updating from yaml files and environment variables |
| 542 | 4. Automatically renaming deprecated keys (with a warning) |
| 543 | |
| 544 | Note that some functionality only checks configuration once at startup and |
| 545 | may not change behavior, even if configuration changes. It is recommended |
| 546 | to restart your python process if convenient to ensure that new |
| 547 | configuration changes take place. |
| 548 | |
| 549 | See Also |
| 550 | -------- |
| 551 | dask.config.collect: for parameters |
| 552 | dask.config.update_defaults |
| 553 | """ |
| 554 | if config is None: # Keep Sphinx autofunction documentation clean |
| 555 | config = global_config |
| 556 | |
| 557 | config.clear() |
| 558 | |
| 559 | for d in defaults: |
| 560 | update(config, d, priority="old") |
| 561 | |
| 562 | update(config, collect(**kwargs)) |
| 563 | rename(deprecations, config) |
| 564 | |
| 565 | |
| 566 | def get( |