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}.json are used to count how many observation files fall inside a 2 × delta_time window. This is the same catalog the pipeline uses for file selection, so the estimate is always consistent. Falls back to n_files=1 if the catalog file does not exist yet.

Returns:

Same dict, with parallelism parameters filled in where appropriate.

Return type:

Dict