MCPcopy Create free account
hub / github.com/activeloopai/deeplake / generator

Function generator

python/deeplake/_tensorflow.py:33–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31 output_signature.append(_to_tensor_spec(col))
32
33 def generator():
34 for item in ds:
35 values = []
36 for i, col in enumerate(column_names):
37 value = item[col]
38 signature = output_signature[i]
39 if len(signature.shape.dims) == 0 and hasattr(value, "item"):
40 value = value.item()
41 values.append(value)
42 yield tuple(values)
43
44 return Dataset.from_generator(generator, output_signature=tuple(output_signature))

Callers

nothing calls this directly

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected