MCPcopy Create free account
hub / github.com/pytorch/pytorch / make_source_dataset

Function make_source_dataset

caffe2/python/dataio_test.py:33–42  ·  view source on GitHub ↗
(ws, size=100, offset=0, name=None)

Source from the content-addressed store, hash-verified

31
32
33def make_source_dataset(ws, size=100, offset=0, name=None):
34 name = name or "src"
35 src_init = core.Net("{}_init".format(name))
36 with core.NameScope(name):
37 src_values = Struct(('label', np.array(range(offset, offset + size))))
38 src_blobs = NewRecord(src_init, src_values)
39 src_ds = Dataset(src_blobs, name=name)
40 FeedRecord(src_blobs, src_values, ws)
41 ws.run(src_init)
42 return src_ds
43
44
45def make_destination_dataset(ws, schema, name=None):

Callers 5

setupMethod · 0.85
test_composite_readerMethod · 0.85
test_runtime_threadsMethod · 0.85
_build_source_readerMethod · 0.85

Calls 8

StructClass · 0.90
NewRecordFunction · 0.90
DatasetClass · 0.90
FeedRecordFunction · 0.90
NetMethod · 0.80
rangeFunction · 0.50
formatMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…