MCPcopy Create free account
hub / github.com/pytorch/pytorch / order_fn

Method order_fn

test/test_datapipe.py:427–429  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

425 datapipe2 = dp.iter.Grouper(datapipe1, group_key_fn=group_fn, group_size=2)
426
427 def order_fn(data):
428 data.sort(key=lambda f: f[0], reverse=True)
429 return data
430
431 datapipe3 = dp.iter.Mapper(datapipe2, fn=order_fn) # type: ignore[var-annotated]
432

Callers

nothing calls this directly

Calls 1

sortMethod · 0.80

Tested by

no test coverage detected