mlflow/mlflow · error · MlflowException
AsyncArtifactsLoggingQueue is not activated.
Error message
AsyncArtifactsLoggingQueue is not activated.
What it means
AsyncArtifactsLoggingQueue.log_artifacts_async refuses to enqueue work when the queue has not been activated (`_is_activated` is False). Activation happens in `start()`; without it there is no consumer thread, so artifacts would never be uploaded. MLflow raises MlflowException to fail fast instead of silently dropping artifacts.
Source
Thrown at mlflow/utils/async_logging/async_artifacts_logging_queue.py:203
"""Asynchronously logs runs artifacts.
Args:
filename: Filename of the artifact to be logged.
artifact_path: Directory within the run's artifact directory in which to log the
artifact.
artifact: The artifact to be logged.
Returns:
mlflow.utils.async_utils.RunOperations: An object that encapsulates the
asynchronous operation of logging the artifact of run data.
The object contains a list of `concurrent.futures.Future` objects that can be used
to check the status of the operation and retrieve any exceptions
that occurred during the operation.
"""
from mlflow import MlflowException
if not self._is_activated:
raise MlflowException("AsyncArtifactsLoggingQueue is not activated.")
artifact = RunArtifact(
filename=filename,
artifact_path=artifact_path,
artifact=artifact,
completion_event=threading.Event(),
)
self._queue.put(artifact)
operation_future = self._artifact_status_check_threadpool.submit(
self._wait_for_artifact, artifact
)
return RunOperations(operation_futures=[operation_future])
def is_active(self) -> bool:
return self._is_activated
def _set_up_logging_thread(self) -> None:
"""Sets up the logging thread.
View on GitHub (pinned to 6a27f2decc)
Solutions
- Call `queue.start()` before the first `log_artifacts_async` call.
- If using MlflowClient high-level API, let the client manage activation (log via client.log_artifact with async mode) rather than constructing the queue yourself.
- If the queue was stopped, create a new AsyncArtifactsLoggingQueue and start it rather than restarting the old one.
- Check `is_active()` before enqueueing and fall back to synchronous artifact logging when inactive.
Example fix
# before queue = AsyncArtifactsLoggingQueue() queue.log_artifacts_async(run_id, "model.pkl", "model") # after queue = AsyncArtifactsLoggingQueue() queue.start() queue.log_artifacts_async(run_id, "model.pkl", "model")
Defensive patterns
Strategy: validation
Validate before calling
if not queue.is_active() if hasattr(queue, 'is_active') else not queue._is_activated:
queue.start()
queue.log_artifacts_async(run_id, filename, artifact_path, artifact) Type guard
def is_queue_ready(queue) -> bool:
return bool(getattr(queue, "_is_activated", False)) Try / catch
from mlflow.exceptions import MlflowException
try:
queue.log_artifacts_async(run_id, filename, artifact_path, artifact)
except MlflowException as e:
if "not activated" in str(e):
queue.start()
queue.log_artifacts_async(run_id, filename, artifact_path, artifact)
else:
raise Prevention
- Always call start() immediately after constructing AsyncArtifactsLoggingQueue.
- Let MlflowClient manage the queue lifecycle instead of manual instantiation.
- Never reuse a queue object after stop(); create a new one.
- Check is_active() before every async enqueue in long-running services.
When it happens
Trigger: Calling `log_artifacts_async` (or `_log_artifact_async` / `_send_artifact` paths) on an AsyncArtifactsLoggingQueue instance whose `start()` was never called, or after `stop()`/termination deactivated it.
Common situations: Instantiating AsyncArtifactsLoggingQueue manually instead of via the client's managed lifecycle; calling log_artifacts_async after the client shut down the queue; reusing a queue object across processes/after pickling without restarting it.
Related errors
- AsyncLoggingQueue is not activated.
- Exception inside the run data logging thread: {e}
- Artifact location not found in trace tags
- Expected mlflow-artifacts:// URI, got ${url.protocol}
- The MLflow Tracing client is not configured. Please call ini
AI-assisted analysis of mlflow/mlflow@6a27f2decc (2026-08-29).
Data as JSON: /api/errors/bfca1540ec2d3909.
Report an issue: GitHub.