(self, path, data_type, is_array=False, array_data_type=np.int32)
| 61 | |
| 62 | class 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): |
nothing calls this directly
no test coverage detected