{"record":{"id":"cd74b4bdae583651","repo":"tensorflow/models","slug":"shared-tf-data-service-does-not-support-round-robi","errorCode":null,"errorMessage":"Shared tf.data service does not support round-robin tf.data service.","messagePattern":"Shared tf\\.data service does not support round-robin tf\\.data service\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/core/input_reader.py","lineNumber":539,"sourceCode":"  ) -> tf.data.Dataset:\n    \"\"\"Potentially distributes a dataset.\"\"\"\n    if self._enable_tf_data_service and input_context:\n      if self._enable_round_robin_tf_data_service:\n        replicas_per_input_pipeline = input_context.num_replicas_in_sync // (\n            input_context.num_input_pipelines)\n        base_consumer_index = input_context.input_pipeline_id * (\n            replicas_per_input_pipeline)\n        num_consumers = input_context.num_input_pipelines * (\n            replicas_per_input_pipeline)\n        range_dataset = tf.data.Dataset.range(replicas_per_input_pipeline)\n        tfds_kwargs = {\n            'processing_mode': 'parallel_epochs',\n            'service': self._tf_data_service_address,\n            'job_name': self._tf_data_service_job_name,\n            'num_consumers': num_consumers\n        }\n        if self._enable_shared_tf_data_service_between_parallel_trainers:\n          raise ValueError('Shared tf.data service does not support round-robin'\n                           ' tf.data service.')\n        dataset = range_dataset.map(lambda i: dataset.apply(  # pylint: disable=g-long-lambda\n            tf.data.experimental.service.distribute(\n                consumer_index=base_consumer_index + i, **tfds_kwargs)))\n        # Use parallel interleave to read multiple batches from a tf.data\n        # service worker in parallel.\n        dataset = dataset.interleave(\n            lambda x: x,\n            cycle_length=replicas_per_input_pipeline,\n            num_parallel_calls=replicas_per_input_pipeline,\n            deterministic=True)\n      else:\n        tfds_kwargs = {\n            'processing_mode': 'parallel_epochs',\n            'service': self._tf_data_service_address,\n            'job_name': self._tf_data_service_job_name,\n        }\n        if self._enable_shared_tf_data_service_between_parallel_trainers:","sourceCodeStart":521,"sourceCodeEnd":557,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/core/input_reader.py#L521-L557","documentation":"Error \"Shared tf.data service does not support round-robin tf.data service.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/core/input_reader.py:539 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}