MCPcopy Create free account
hub / github.com/OpenSparseLLMs/Linear-MoE / jload

Method jload

linear_moe/data/starcoder.py:73–78  ·  view source on GitHub ↗

Load a .json file into a dictionary.

(self, f, mode='r')

Source from the content-addressed store, hash-verified

71 return f
72
73 def jload(self, f, mode='r'):
74 """Load a .json file into a dictionary."""
75 f = self._make_r_io_base(f, mode)
76 jdict = json.load(f)
77 f.close()
78 return jdict
79
80 def __len__(self):
81 return len(self.samples)

Callers 1

__init__Method · 0.95

Calls 1

_make_r_io_baseMethod · 0.95

Tested by

no test coverage detected