MCPcopy
hub / github.com/dask/dask / refresh

Function refresh

dask/config.py:564–601  ·  view source on GitHub ↗

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,
)

Source from the content-addressed store, hash-verified

562
563
564def 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
604def get(

Callers 2

test_refreshFunction · 0.90
config.pyFile · 0.85

Calls 3

updateFunction · 0.85
collectFunction · 0.70
clearMethod · 0.45

Tested by 1

test_refreshFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…