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

Function process_fn

SwissArmyTransformer/tests/test_train.py:111–114  ·  view source on GitHub ↗
(row)

Source from the content-addressed store, hash-verified

109 x = torch.randint(0, 100, (num_samples, num_features))
110
111 def process_fn(row):
112 return {'text': row[0],
113 'loss_mask': np.array([1]*len(row[0]))
114 }
115 return FakeDataset(process_fn, x)
116
117if __name__ == '__main__':

Callers 3

EncodeAsIdsMethod · 0.50
EncodeAsIdsMethod · 0.50
EncodeAsIdsMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected