MCPcopy Index your code
hub / github.com/OpenDriveLab/ReSim / should_split

Function should_split

SwissArmyTransformer/sat/data_utils/configure_data.py:262–271  ·  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

260 return [s/final_sum for s in splits]
261
262def should_split(split):
263 """
264 given split proportions checks if should split
265 Examples:
266 >>> should_split([10,0,0])
267 False
268 >>> should_split([1,.1,.2])
269 True
270 """
271 return max(split) / sum(split) != 1.
272
273def split_ds(ds, split=[.8,.2,.0], block_size = 10000, seed=131):
274 """

Callers 2

make_dataset_fullFunction · 0.85
make_loadersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected