{"record":{"id":"2589445e520bf163","repo":"tensorflow/models","slug":"input-path-key-s-does-not-have-a-corresponding","errorCode":null,"errorMessage":"input_path key '%s' does not have a corresponding weight.","messagePattern":"input_path key '(.+?)' does not have a corresponding weight\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/vision/dataloaders/input_reader.py","lineNumber":75,"sourceCode":"    stop_on_empty_dataset = True\n\n  if params.weights:\n    # Combine multiple datasets using weighted sampling.\n    if (not isinstance(params.input_path, cfg.base_config.Config) or\n        not isinstance(params.weights, cfg.base_config.Config)):\n      raise ValueError(\n          'input_path and weights must both be a Config to use weighted '\n          'sampling.')\n    input_paths = params.input_path.as_dict()\n    weights = params.weights.as_dict()\n    if len(input_paths) != len(weights):\n      raise ValueError(\n          'The number of input_path and weights must be the same, but got %d '\n          'input_paths and %d weights.' % (len(input_paths), len(weights)))\n\n    for k in input_paths.keys():\n      if k not in weights:\n        raise ValueError(\n            'input_path key \\'%s\\' does not have a corresponding weight.' % k)\n\n    return build_weighted_sampling_combine_fn(weights, stop_on_empty_dataset)\n  return None\n\n\ndef calculate_batch_sizes(total_batch_size: int,\n                          pseudo_label_ratio: float,\n                          pseudo_label_batch_size: int = 0) -> Tuple[int, int]:\n  \"\"\"Calculates labeled and pseudo-labeled dataset batch sizes.\n\n  Returns (labeled_batch_size, pseudo_labeled_batch_size) given a\n  total batch size and pseudo-label data ratio.\n\n  Args:\n   total_batch_size: The total batch size for all data.\n   pseudo_label_ratio: A float ratio of pseudo-labeled to labeled data in a\n     batch. If it is negative, use `pseudo_label_batch_size` instead.","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/vision/dataloaders/input_reader.py#L57-L93","documentation":"Error \"input_path key '%s' does not have a corresponding weight.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/vision/dataloaders/input_reader.py:75 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"}