MCPcopy Index your code
hub / github.com/deepspeedai/DeepSpeedExamples / should_split

Function should_split

Megatron-LM/data_utils/__init__.py:29–38  ·  view source on GitHub ↗

given split proportions checks if should split Examples: >>> should_split([10,0,0]) False >>> should_split([1,.1,.2]) True

(split)

Source from the content-addressed store, hash-verified

27TEST_DATA = 2
28
29def should_split(split):
30 """
31 given split proportions checks if should split
32 Examples:
33 >>> should_split([10,0,0])
34 False
35 >>> should_split([1,.1,.2])
36 True
37 """
38 return max(split)/sum(split) != 1.
39
40def get_ext(path):
41 """gets path extension"""

Callers 1

make_datasetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected