mlflow/mlflow · error · MlflowException
INVALID_PARAMETER_VALUE
INVALID_PARAMETER_VALUE
Error message
Searching traces by model_id is not supported on the current tracking server.
What it means
RestStore.search_traces refuses any call that passes model_id, because filtering traces by model association is not implemented for remote (REST) tracking servers. It raises INVALID_PARAMETER_VALUE immediately instead of sending an unsupported filter to the server.
Source
Thrown at mlflow/store/tracking/rest_store.py:591
req_body,
endpoint=f"{_V3_TRACE_REST_API_PATH_PREFIX}/batchGetInfos",
)
return [TraceInfo.from_proto(proto) for proto in response_proto.trace_infos]
def search_traces(
self,
experiment_ids: list[str] | None = None,
filter_string: str | None = None,
max_results: int = SEARCH_TRACES_DEFAULT_MAX_RESULTS,
order_by: list[str] | None = None,
page_token: str | None = None,
model_id: str | None = None,
locations: list[str] | None = None,
):
locations = _resolve_experiment_ids_and_locations(experiment_ids, locations)
if model_id is not None:
raise MlflowException.invalid_parameter_value(
"Searching traces by model_id is not supported on the current tracking server.",
)
return self._search_traces(
locations=locations,
filter_string=filter_string,
max_results=max_results,
order_by=order_by,
page_token=page_token,
)
def _search_traces(
self,
locations: list[str],
filter_string: str | None = None,
max_results: int = SEARCH_TRACES_DEFAULT_MAX_RESULTS,
order_by: list[str] | None = None,
page_token: str | None = None,View on GitHub (pinned to 6a27f2decc)
Solutions
- Remove the model_id argument and filter traces with a filter_string on trace attributes/tags instead.
- Use the logged-model trace search API if your MLflow version supports it server-side.
- Use a local SQLAlchemy tracking store where model_id filtering is implemented, or upgrade the server to a version that supports it.
Example fix
// before client.search_traces(experiment_ids=["1"], model_id="m-123") // after client.search_traces(experiment_ids=["1"], filter_string="tags.model_id = 'm-123'")
Defensive patterns
Strategy: validation
Validate before calling
def assert_no_model_id(**kwargs):
if kwargs.get("model_id") is not None:
raise ValueError("REST store search_traces does not support model_id") Try / catch
try:
client.search_traces(experiment_ids=eids, model_id=mid)
except MlflowException as e:
if e.error_code == "INVALID_PARAMETER_VALUE":
pass # retry without model_id or with a filter_string Prevention
- Never pass model_id to search_traces against REST/Databricks backends.
- Filter with filter_string on tags/attributes instead.
- Gate model_id search code paths behind a backend-capability check.
When it happens
Trigger: Calling MlflowClient.search_traces(..., model_id="<id>") against a REST/Databricks tracking store — i.e., any non-local backend.
Common situations: Code that works against a local SQLAlchemy store (which supports model_id filtering) fails when pointed at a remote server; notebooks mixing logged-model queries with tracing on Databricks.
Related errors
- Invalid experiment ID format: {exp_id}. Error: {e!s}
- log_spans is not supported: could not identify MLflow server
- log_spans is not supported: MLflow server version {server_ve
- Artifact location not found in trace tags
- Invalid response format: missing trace_info: ${JSON.stringif
AI-assisted analysis of mlflow/mlflow@6a27f2decc (2026-08-29).
Data as JSON: /api/errors/0e104b098bd6f029.
Report an issue: GitHub.