def profile_config_file(binary_path: PathLike, config_path: PathLike, output_config_path: PathLike, progress_bar: bool=True, profile_filename: str='profile_info.txt', qos_filename: str='final_accuracy') -> None:
    'Profile an HPVM configuration file with an HPVM binary,\n    and write the updated configuration file to a given location.\n    The configuration file must have the baseline as the first configuration.\n\n    :param binary_path: Path to binary to be executed in profiling.\n    :param config_path: Path to config file (HPVM configuration format)\n        with configs to enumerate for profiling.\n    :param output_config_path: Path where the output configs are written.\n        The output config file has the same configs as the input `config_path` file,\n        but the performance and energy readings are updated.\n    :param progress_bar: If `True`, show a progress bar for number of configs already profiled.\n    :param profile_filename: Name of profile file generated by the binary (in current directory).\n        This defaults to "profile_info.txt" and should not be changed for HPVM binaries.\n    :param qos_filename: Name of QoS file generated by the binary (in current directory).\n        It contains a single float number as the QoS of this run.\n        This defaults to "final_accuracy" and should not be changed for HPVM binaries.\n    '
    (header, configs) = read_hpvm_configs(Path(config_path))
    if (not configs):
        raise ValueError('Config file with no configs is unsupported.')
    profile_configs(binary_path, configs[1:], configs[0], progress_bar, profile_filename, qos_filename)
    write_hpvm_configs(header, configs, Path(output_config_path))
Profile an HPVM configuration file with an HPVM binary,
and write the updated configuration file to a given location.
The configuration file must have the baseline as the first configuration.

:param binary_path: Path to binary to be executed in profiling.
:param config_path: Path to config file (HPVM configuration format)
    with configs to enumerate for profiling.
:param output_config_path: Path where the output configs are written.
    The output config file has the same configs as the input `config_path` file,
    but the performance and energy readings are updated.
:param progress_bar: If `True`, show a progress bar for number of configs already profiled.
:param profile_filename: Name of profile file generated by the binary (in current directory).
    This defaults to "profile_info.txt" and should not be changed for HPVM binaries.
:param qos_filename: Name of QoS file generated by the binary (in current directory).
    It contains a single float number as the QoS of this run.
    This defaults to "final_accuracy" and should not be changed for HPVM binaries.
def profile_config_file(binary_path: PathLike, config_path: PathLike, output_config_path: PathLike, progress_bar: bool=True, profile_filename: str='profile_info.txt', qos_filename: str='final_accuracy') -> None:
    'Profile an HPVM configuration file with an HPVM binary,\n    and write the updated configuration file to a given location.\n    The configuration file must have the baseline as the first configuration.\n\n    :param binary_path: Path to binary to be executed in profiling.\n    :param config_path: Path to config file (HPVM configuration format)\n        with configs to enumerate for profiling.\n    :param output_config_path: Path where the output configs are written.\n        The output config file has the same configs as the input `config_path` file,\n        but the performance and energy readings are updated.\n    :param progress_bar: If `True`, show a progress bar for number of configs already profiled.\n    :param profile_filename: Name of profile file generated by the binary (in current directory).\n        This defaults to "profile_info.txt" and should not be changed for HPVM binaries.\n    :param qos_filename: Name of QoS file generated by the binary (in current directory).\n        It contains a single float number as the QoS of this run.\n        This defaults to "final_accuracy" and should not be changed for HPVM binaries.\n    '
    (header, configs) = read_hpvm_configs(Path(config_path))
    if (not configs):
        raise ValueError('Config file with no configs is unsupported.')
    profile_configs(binary_path, configs[1:], configs[0], progress_bar, profile_filename, qos_filename)
    write_hpvm_configs(header, configs, Path(output_config_path))