neural_compressor.common.utils.save_load
The module for save/load config.
Functions
|
Save config mapping to json file. |
|
Reload config mapping from json file. |
Module Contents
- neural_compressor.common.utils.save_load.save_config_mapping(config_mapping, qconfig_file_path)[source]
Save config mapping to json file.
- Parameters:
config_mapping (dict) – config mapping.
qconfig_file_path (str) – path to saved json file.
- neural_compressor.common.utils.save_load.load_config_mapping(qconfig_file_path, config_name_mapping)[source]
Reload config mapping from json file.
- Parameters:
qconfig_file_path (str) – path to saved json file.
config_name_mapping (dict) – map config name to config object. For example: ConfigRegistry.get_all_configs()[“torch”]
- Returns:
config mapping.
- Return type:
config_mapping (dict)