dctools.utilities.machine_profile.auto_tune_config
- dctools.utilities.machine_profile.auto_tune_config(config, data_directory=None)
Fill auto-tuned parallelism parameters into config in-place.
Call this directly after loading the raw YAML dict, before converting it to an
argparse.Namespace.- Parameters:
config (Dict[str, Any]) – Raw dict loaded from the YAML file. Modified in-place and returned.
data_directory (str | None) – Path to the runtime output directory (e.g.
dc1_output/). When provided, the local catalog JSON files stored at{data_directory}/catalogs/{dataset_name}.jsonare used to count how many observation files fall inside a2 × delta_timewindow. This is the same catalog the pipeline uses for file selection, so the estimate is always consistent. Falls back ton_files=1if the catalog file does not exist yet.
- Returns:
Same dict, with parallelism parameters filled in where appropriate.
- Return type:
Dict