MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / test_float_balanced

Function test_float_balanced

tests/unit/runtime/utils/test_partition.py:161–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159
160
161def test_float_balanced():
162 weights = [0., 1.1, 1.9, 3., 3., 3.]
163 P = 4
164 parts = partition_balanced(weights, P)
165 assert_valid_partition(weights, parts, P)
166 assert parts == [0, 3, 4, 5, 6]
167
168
169@pytest.mark.skip(reason="Variance-minimizing partitioning returns different result.")

Callers

nothing calls this directly

Calls 2

partition_balancedFunction · 0.90
assert_valid_partitionFunction · 0.85

Tested by

no test coverage detected