MCPcopy Create free account
hub / github.com/THUDM/GLM / should_split

Function should_split

data_utils/__init__.py:35–44  ·  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

33
34
35def should_split(split):
36 """
37 given split proportions checks if should split
38 Examples:
39 >>> should_split([10,0,0])
40 False
41 >>> should_split([1,.1,.2])
42 True
43 """
44 return max(split) / sum(split) != 1.
45
46
47def get_ext(path):

Callers 1

make_datasetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected