mlflow/mlflow · error · MlflowException
Not implemented yet
Error message
Not implemented yet
What it means
FtpArtifactRepository.delete_artifacts is a stub: MLflow's FTP artifact store can list, upload, and download artifacts but has not implemented deletion. Calling it raises MlflowException('Not implemented yet') unconditionally.
Source
Thrown at mlflow/store/artifact/ftp_artifact_repo.py:133
file_path = file_name if path is None else posixpath.join(path, file_name)
full_file_path = posixpath.join(list_dir, file_name)
if self._is_dir(ftp, full_file_path):
infos.append(FileInfo(file_path, True, None))
else:
size = self._size(ftp, full_file_path)
infos.append(FileInfo(file_path, False, size))
return infos
def _download_file(self, remote_file_path, local_path):
remote_full_path = (
posixpath.join(self.path, remote_file_path) if remote_file_path else self.path
)
with self.get_ftp_client() as ftp:
with open(local_path, "wb") as f:
ftp.retrbinary("RETR " + remote_full_path, f.write)
def delete_artifacts(self, artifact_path=None):
raise MlflowException("Not implemented yet")
View on GitHub (pinned to 6a27f2decc)
Solutions
- Delete the files directly on the FTP server using an FTP client (ftplib/paramiko), resolving the path from the artifact URI.
- Switch the experiment's artifact location to a backend that supports deletion (local, S3, GCS, Azure).
- Implement a custom ArtifactRepository subclass overriding delete_artifacts and register it via mlflow.register_artifact_repository.
- Wrap the call and treat NotImplementedError-style cleanup as manual follow-up.
Example fix
// before
client.delete_artifacts(run_id, 'model') # raises on ftp:// repo
// after
import ftplib
with ftplib.FTP(host, user, pwd) as ftp:
for f in ftp.nlst(f'{base}/model'):
ftp.delete(f) Defensive patterns
Strategy: fallback
Validate before calling
from mlflow.store.artifact.ftp_artifact_repo import FtpArtifactRepository
repo = get_artifact_repository(client.get_run(run_id).info.artifact_uri)
if isinstance(repo, FtpArtifactRepository):
# deletion unsupported: plan manual/FTP-client cleanup Try / catch
from mlflow.exceptions import MlflowException
try:
client.delete_artifacts(run_id, path)
except MlflowException as e:
if 'Not implemented yet' in str(e):
ftp_delete_fallback(run_id, path) # ftplib-based cleanup
else:
raise Prevention
- Check the artifact store backend before designing deletion workflows
- Prefer object-store artifact locations (S3/GCS/Azure) for experiments that need lifecycle cleanup
- Track FTP-backed runs in a cleanup queue instead of calling delete_artifacts
When it happens
Trigger: Calling MlflowClient().delete_artifacts(run_id, path) (or repo.delete_artifacts()) when the run's artifact URI scheme is ftp:// or sftp://, i.e. the artifact repository resolves to FtpArtifactRepository.
Common situations: Cleanup scripts that delete old run artifacts working fine on local/S3 repos but failing on FTP-backed experiments; generic artifact-retention tooling that assumes delete is supported everywhere.
Related errors
- Model listing is not supported for provider '{self.name}'
- Model listing is not supported for provider '{self.name}'
- NotImplementedError
- NotImplementedError
- This method is not implemented for `MlflowDeploymentClient`.
AI-assisted analysis of mlflow/mlflow@6a27f2decc (2026-08-29).
Data as JSON: /api/errors/ea6a8cc8a51ab101.
Report an issue: GitHub.