{"record":{"id":"384c7e4482511ba9","repo":"tensorflow/models","slug":"unknown-value-type-parameter","errorCode":null,"errorMessage":"Unknown value_type parameter - {}","messagePattern":"Unknown value_type parameter - (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/vision/data/tfrecord_lib.py","lineNumber":86,"sourceCode":"  elif value_type == 'int64_list':\n    value = np.asarray(value).astype(np.int64).reshape(-1)\n    return tf.train.Feature(int64_list=tf.train.Int64List(value=value))\n\n  elif value_type == 'float':\n    return tf.train.Feature(float_list=tf.train.FloatList(value=[value]))\n\n  elif value_type == 'float_list':\n    value = np.asarray(value).astype(np.float32).reshape(-1)\n    return tf.train.Feature(float_list=tf.train.FloatList(value=value))\n\n  elif value_type == 'bytes':\n    return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value]))\n\n  elif value_type == 'bytes_list':\n    return tf.train.Feature(bytes_list=tf.train.BytesList(value=value))\n\n  else:\n    raise ValueError('Unknown value_type parameter - {}'.format(value_type))\n\n\ndef image_info_to_feature_dict(height, width, filename, image_id,\n                               encoded_str, encoded_format):\n  \"\"\"Convert image information to a dict of features.\"\"\"\n\n  key = hashlib.sha256(encoded_str).hexdigest()\n\n  return {\n      'image/height': convert_to_feature(height),\n      'image/width': convert_to_feature(width),\n      'image/filename': convert_to_feature(filename.encode('utf8')),\n      'image/source_id': convert_to_feature(str(image_id).encode('utf8')),\n      'image/key/sha256': convert_to_feature(key.encode('utf8')),\n      'image/encoded': convert_to_feature(encoded_str),\n      'image/format': convert_to_feature(encoded_format.encode('utf8')),\n  }\n","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/vision/data/tfrecord_lib.py#L68-L104","documentation":"Error \"Unknown value_type parameter - {}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/vision/data/tfrecord_lib.py:86 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"}