{"record":{"id":"a2c7260ff39c0292","repo":"tensorflow/models","slug":"layer-inputs-is-missing-features-missing-feature","errorCode":null,"errorMessage":"Layer inputs is missing features: {missing_features}","messagePattern":"Layer inputs is missing features: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/recommendation/uplift/layers/encoders/concat_features.py","lineNumber":59,"sourceCode":"    super().__init__(**kwargs)\n    self._feature_names = feature_names\n\n    # Validate feature names.\n    if not feature_names:\n      raise ValueError(\n          \"feature_names must be a non-empty list of strings but got\"\n          f\" {feature_names} instead.\"\n      )\n    if not all(isinstance(name, str) for name in feature_names):\n      raise TypeError(\n          \"feature_names must be a list of strings, but got types\"\n          f\" {list(map(type, feature_names))}\"\n      )\n\n  def build(self, input_shapes: Mapping[str, tf.TensorShape]) -> None:\n    missing_features = set(self._feature_names) - input_shapes.keys()\n    if missing_features:\n      raise ValueError(f\"Layer inputs is missing features: {missing_features}\")\n\n    feature_shapes = {\n        feature_name: tensor_shape\n        for feature_name, tensor_shape in input_shapes.items()\n        if feature_name in self._feature_names\n    }\n\n    most_specific_shape = tf.TensorShape(None)\n    for feature_name, shape in feature_shapes.items():\n      if not isinstance(shape, tf.TensorShape):\n        raise TypeError(\n            f\"Got unsupported tensor shape type for feature {feature_name}. The\"\n            \" feature tensor must be one of `tf.Tensor`, `tf.SparseTensor` or\"\n            \" `tf.RaggedTensor`, with a well defined tensor shape but got shape\"\n            f\" {shape} instead.\"\n        )\n\n      shape = shape[:-1]","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/recommendation/uplift/layers/encoders/concat_features.py#L41-L77","documentation":"Error \"Layer inputs is missing features: {missing_features}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/recommendation/uplift/layers/encoders/concat_features.py:59 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"}