(col: deeplake.ColumnDefinition)
| 12 | |
| 13 | |
| 14 | def _to_tensor_spec(col: deeplake.ColumnDefinition): |
| 15 | dtype = col.dtype.id |
| 16 | if dtype == "text": |
| 17 | dtype = "string" |
| 18 | |
| 19 | shape = col.dtype.shape |
| 20 | if not shape: |
| 21 | shape = () |
| 22 | |
| 23 | return tf.TensorSpec(shape=shape, dtype=dtype) |
| 24 | |
| 25 | |
| 26 | def _from_dataset(ds: deeplake.Dataset): |