tfds.core.SplitDict

View source on GitHub

Class SplitDict

Split info object.

__init__

View source

__init__()

Initialize self. See help(type(self)) for accurate signature.

__new__

__new__(
    type,
    *args,
    **kwargs
)

Properties

total_num_examples

Return the total number of examples.

Methods

__contains__

__contains__(key)

__eq__

__eq__(value)

__ge__

__ge__(value)

__getitem__

View source

__getitem__(key)

x.getitem(y) <==> x[y]

__gt__

__gt__(value)

__iter__

__iter__()

__le__

__le__(value)

__len__

__len__()

__lt__

__lt__(value)

__ne__

__ne__(value)

add

View source

add(split_info)

Add the split info.

copy

View source

copy()

D.copy() -> a shallow copy of D

from_proto

View source

@classmethod
from_proto(
    cls,
    repeated_split_infos
)

Returns a new SplitDict initialized from the repeated_split_infos.

fromkeys

fromkeys(
    type,
    iterable,
    value
)

to_proto

View source

to_proto()

Returns a list of SplitInfo protos that we have.

update

View source

update(other)

D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]