{"record":{"id":"0896858caefdebd4","repo":"tensorflow/models","slug":"when-used-with-multi-worker-mirrored-valid-valu","errorCode":null,"errorMessage":"When used with `multi_worker_mirrored`, valid values for all_reduce_alg are [`ring`, `nccl`].  Supplied value: {}","messagePattern":"When used with `multi_worker_mirrored`, valid values for all_reduce_alg are \\[`ring`, `nccl`\\]\\.  Supplied value: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/common/distribute_utils.py","lineNumber":41,"sourceCode":"  \"\"\"Return a CollectiveCommunication based on all_reduce_alg.\n\n  Args:\n    all_reduce_alg: a string specifying which collective communication to pick,\n      or None.\n\n  Returns:\n    tf.distribute.experimental.CollectiveCommunication object\n\n  Raises:\n    ValueError: if `all_reduce_alg` not in [None, \"ring\", \"nccl\"]\n  \"\"\"\n  collective_communication_options = {\n      None: tf.distribute.experimental.CollectiveCommunication.AUTO,\n      \"ring\": tf.distribute.experimental.CollectiveCommunication.RING,\n      \"nccl\": tf.distribute.experimental.CollectiveCommunication.NCCL\n  }\n  if all_reduce_alg not in collective_communication_options:\n    raise ValueError(\n        \"When used with `multi_worker_mirrored`, valid values for \"\n        \"all_reduce_alg are [`ring`, `nccl`].  Supplied value: {}\".format(\n            all_reduce_alg))\n  return collective_communication_options[all_reduce_alg]\n\n\ndef _mirrored_cross_device_ops(all_reduce_alg, num_packs):\n  \"\"\"Return a CrossDeviceOps based on all_reduce_alg and num_packs.\n\n  Args:\n    all_reduce_alg: a string specifying which cross device op to pick, or None.\n    num_packs: an integer specifying number of packs for the cross device op.\n\n  Returns:\n    tf.distribute.CrossDeviceOps object or None.\n\n  Raises:\n    ValueError: if `all_reduce_alg` not in [None, \"nccl\", \"hierarchical_copy\"].","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/common/distribute_utils.py#L23-L59","documentation":"Error \"When used with `multi_worker_mirrored`, valid values for all_reduce_alg are [`ring`, `nccl`].  Supplied value: {}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/common/distribute_utils.py:41 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"}