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

Method _make_r_io_base

linear_moe/data/starcoder.py:68–71  ·  view source on GitHub ↗
(self, f, mode: str)

Source from the content-addressed store, hash-verified

66 print(' >> total number of samples: {}'.format(len(self.samples)))
67
68 def _make_r_io_base(self, f, mode: str):
69 if not isinstance(f, io.IOBase):
70 f = open(f, mode=mode, encoding='utf-8')
71 return f
72
73 def jload(self, f, mode='r'):
74 """Load a .json file into a dictionary."""

Callers 1

jloadMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected