MCPcopy Create free account
hub / github.com/apple/axlearn / sort

Method sort

axlearn/cloud/common/utils.py:361–363  ·  view source on GitHub ↗

Sorts the table. Heading remains unchanged.

(self, key: Callable[[_Row], Any], reverse: bool = False)

Source from the content-addressed store, hash-verified

359 return [[row[i] for i in idx] for row in self.rows]
360
361 def sort(self, key: Callable[[_Row], Any], reverse: bool = False):
362 """Sorts the table. Heading remains unchanged."""
363 self.rows.sort(key=key, reverse=reverse)
364
365 def __eq__(self, other: Any) -> bool:
366 return (

Callers 9

_usage_tableFunction · 0.95
test_sortMethod · 0.95
test_basicMethod · 0.45
alignMethod · 0.45
alignment_to_segmentsFunction · 0.45
similar_namesFunction · 0.45
index_to_shardFunction · 0.45

Calls

no outgoing calls

Tested by 3

test_sortMethod · 0.76
test_basicMethod · 0.36