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

Method iter_source

axlearn/common/input_grain_test.py:420–426  ·  view source on GitHub ↗
(dispatch_config)

Source from the content-addressed store, hash-verified

418
419 # Test against iter ds.
420 def iter_source(dispatch_config):
421 iter_ds = fake_grain_source(list(range(10)))
422 iter_ds = maybe_to_iter_dataset(iter_ds)
423 iter_ds = iter_ds.map(lambda x: x + 1)
424 return per_feed_batch(
425 iter_ds, global_batch_size=10, dispatch_config=dispatch_config, drop_remainder=False
426 )
427
428 cfg = Input.default_config().set(source=iter_source, input_dispatcher=input_dispatcher)
429 x = cfg.set(name="test").instantiate(parent=None)

Callers

nothing calls this directly

Calls 4

fake_grain_sourceFunction · 0.90
maybe_to_iter_datasetFunction · 0.90
per_feed_batchFunction · 0.90
mapMethod · 0.80

Tested by

no test coverage detected