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

Method get_config_file_name

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

Source from the content-addressed store, hash-verified

15
16 @classmethod
17 def get_config_file_name(cls, params: Dict[str, Any]) -> str:
18 json_str = json.dumps(params, sort_keys=True)
19 json_str = json_str.replace(" ", "").replace("\n", "").replace('"', "").replace(":", "=")
20 filename = json_str
21 device_name = get_current_device_name().replace(" ", "_")
22 return f"{filename}_{device_name}.json"
23
24 @classmethod
25 @lru_cache(maxsize=None)

Callers 5

get_the_configMethod · 0.80
store_configMethod · 0.80
__call__Method · 0.80
_try_load_cacheMethod · 0.80
_autotuneMethod · 0.80

Calls 1

get_current_device_nameFunction · 0.90

Tested by

no test coverage detected