mlflow/mlflow · error · MlflowException

INVALID_PARAMETER_VALUE

INVALID_PARAMETER_VALUE

Error message

`item_type` must be TRACE; got proto enum value {proto}.

What it means

ReviewItemType.from_proto only recognizes the TRACE proto enum value; any other integer from the review-queue protobuf enum is rejected. It indicates deserializing an item type this client version doesn't support.

Source

Thrown at mlflow/genai/review_queues/review_queues.py:27

@experimental(version="3.14.0")
class ReviewItemType(StrEnum):
    """What kind of object a queue item points at.

    v1 ships ``trace`` only; the column is kept wide enough for
    ``session`` / ``span`` to land later without a migration.
    """

    TRACE = "trace"

    def to_proto(self) -> int:
        return _rq_pb.TRACE

    @classmethod
    def from_proto(cls, proto: int) -> "ReviewItemType":
        if proto == _rq_pb.TRACE:
            return cls.TRACE
        raise MlflowException(
            f"`item_type` must be TRACE; got proto enum value {proto}.",
            error_code=INVALID_PARAMETER_VALUE,
        )


@experimental(version="3.14.0")
class ReviewQueueType(StrEnum):
    """The flavor of a review queue.

    ``USER`` — ``name`` equals a user identifier and the queue has exactly
        one assigned user (that user). It is the reviewer's personal
        worklist and inherits *all* of the experiment's label schemas as
        its questions (no chooser, resolved live at read time), so creating
        one is just "assign these traces to this person".
    ``CUSTOM`` — an arbitrary, non-reserved ``name`` with 0..N assigned
        users and an explicitly-attached subset of label schemas. The
        analog of a Databricks ``LabelingSession``.
    """

View on GitHub (pinned to 6a27f2decc)

Solutions

  1. Upgrade the mlflow package to the latest version so the newer item_type enum is recognized
  2. Verify the proto source is a legitimate review-queue item_type value (TRACE)
  3. If a server returns this, check server/client version compatibility for the genai review-queue API
Defensive patterns

Strategy: type-guard

Validate before calling

from mlflow.genai.review_queues import review_queues_pb2 as _rq_pb
if proto != _rq_pb.TRACE:
    raise ValueError(f"Unsupported item_type proto: {proto}; upgrade mlflow")

Type guard

def is_supported_item_type(proto: int) -> bool:
    from mlflow.proto.databricks.review_queues_pb2 import TRACE
    return proto == TRACE

Try / catch

from mlflow.exceptions import MlflowException
try:
    item_type = ReviewItemType.from_proto(proto)
except MlflowException as e:
    if "item_type" in str(e):
        logging.warning("Unknown item_type %s; upgrade mlflow client", proto)
    else:
        raise

Prevention

When it happens

Trigger: Deserializing a ReviewItem whose proto item_type enum differs from _rq_pb.TRACE, typically from a server using a newer enum value than the installed MLflow client understands.

Common situations: Version skew between Databricks/MLflow server and an older client SDK; hand-crafted protos in tests; corrupted or forward-incompatible stored data.

Related errors


AI-assisted analysis of mlflow/mlflow@6a27f2decc (2026-08-29). Data as JSON: /api/errors/e1b8ac8fe8b7e5bd. Report an issue: GitHub.