MCPcopy Create free account
hub / github.com/SqueezeAILab/TinyAgent / initialize_data_objects

Function initialize_data_objects

src/utils/data_utils.py:165–175  ·  view source on GitHub ↗
(json_path: str)

Source from the content-addressed store, hash-verified

163
164
165def initialize_data_objects(json_path: str) -> dict[str, Data]:
166 if not os.path.exists(json_path):
167 with open(json_path, "w") as file:
168 file.write("{}")
169 data_objects = {}
170 else:
171 with open(json_path, "r") as file:
172 data_objects = json.load(file)
173
174 data_objects = deserialize_data(data_objects)
175 return data_objects

Callers

nothing calls this directly

Calls 1

deserialize_dataFunction · 0.85

Tested by

no test coverage detected