MCPcopy Create free account
hub / github.com/CheckPointSW/Karta / storeKnowledge

Function storeKnowledge

src/config/utils.py:246–256  ·  view source on GitHub ↗

Store the .json configuration for the current binary file. Args: json_config (dict): json configuration content bin_path (str, Optional): path to the compiled binary file (None by default)

(json_config, bin_path=None)

Source from the content-addressed store, hash-verified

244 return config_dict
245
246def storeKnowledge(json_config, bin_path=None):
247 """Store the .json configuration for the current binary file.
248
249 Args:
250 json_config (dict): json configuration content
251 bin_path (str, Optional): path to the compiled binary file (None by default)
252 """
253 json_path = accumulatedKnowledgePath(bin_path)
254 fd = open(json_path, "w")
255 json.dump(json_config, fd)
256 fd.close()
257
258#########################
259## Adaptive heuristics ##

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls 1

accumulatedKnowledgePathFunction · 0.85

Tested by

no test coverage detected