MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / __init__

Method __init__

SwissArmyTransformer/sat/data_utils/datasets.py:71–78  ·  view source on GitHub ↗
(self, path, process_fn, with_heads=True, **kwargs)

Source from the content-addressed store, hash-verified

69
70class TSVDataset(Dataset):
71 def __init__(self, path, process_fn, with_heads=True, **kwargs):
72 self.process_fn = process_fn
73 with open(path, 'r') as fin:
74 if with_heads:
75 self.heads = fin.readline().split('\t')
76 else:
77 self.heads = None
78 self.items = [line.split('\t') for line in fin]
79
80 def __len__(self):
81 return len(self.items)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected