ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more

Registers a dataset with the service.

register_dataset registers a dataset with the service so that datasets can be created later with This is useful when the dataset is registered by one process, then used in another process. When the same process is both registering and reading from the dataset, it is simpler to use instead.

If the dataset is already registered with the service, register_dataset returns the already-registered dataset's id.

dispatcher =
dispatcher_address ="://")[1]
worker =
dataset =
dataset_id =, dataset)
dataset =
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

service A string or a tuple indicating how to connect to the service. If it's a string, it should be in the format [<protocol>://]<address>, where <address> identifies the dispatcher address and <protocol> can optionally be used to override the default protocol to use. If it's a tuple, it should be (protocol, address).
dataset A to register with the service.

A scalar int64 tensor of the registered dataset's id.