MCPcopy
hub / github.com/ModelTC/LightLLM / store_config

Method store_config

lightllm/common/kernel_config.py:46–57  ·  view source on GitHub ↗
(cls, params: Dict[str, Any], dest_json: dict)

Source from the content-addressed store, hash-verified

44
45 @classmethod
46 def store_config(cls, params: Dict[str, Any], dest_json: dict):
47 assert cls != KernelConfigs, "base class can not call this classmethod"
48
49 json_file_name = KernelConfigs.get_config_file_name(params)
50 config_dir_path = os.path.join(
51 os.path.dirname(os.path.abspath(__file__)), "all_kernel_configs", cls.kernel_name
52 )
53 os.makedirs(config_dir_path, exist_ok=True)
54 config_file_path = os.path.join(config_dir_path, json_file_name)
55 with open(config_file_path, mode="w") as file:
56 json.dump(dest_json, file)
57 return
58
59 @classmethod
60 @abstractmethod

Callers 8

save_configMethod · 0.80
save_configMethod · 0.80
save_configMethod · 0.80
save_configMethod · 0.80
save_configMethod · 0.80
save_configMethod · 0.80
save_configMethod · 0.80
save_configMethod · 0.80

Calls 1

get_config_file_nameMethod · 0.80

Tested by

no test coverage detected