MCPcopy Create free account
hub / github.com/THUDM/GLM / __init__

Method __init__

data_utils/lazy_loader.py:63–72  ·  view source on GitHub ↗
(self, path, data_type, is_array=False, array_data_type=np.int32)

Source from the content-addressed store, hash-verified

61
62class LazyWriter:
63 def __init__(self, path, data_type, is_array=False, array_data_type=np.int32):
64 lazypath = get_lazy_path(path)
65 if not os.path.exists(lazypath):
66 os.makedirs(lazypath)
67 self.datapath = os.path.join(lazypath, data_type)
68 self.lenpath = os.path.join(lazypath, data_type + '.len.pkl')
69 self.array_data_type = array_data_type
70 self.output = open(self.datapath, 'wb')
71 self.lengths = []
72 self.is_array = is_array
73
74 @staticmethod
75 def get_len_path(path, data_type):

Callers

nothing calls this directly

Calls 2

get_lazy_pathFunction · 0.85
existsMethod · 0.45

Tested by

no test coverage detected