{"record":{"id":"ea6a8cc8a51ab101","repo":"mlflow/mlflow","slug":"not-implemented-yet-ea6a8c","errorCode":null,"errorMessage":"Not implemented yet","messagePattern":"Not implemented yet","errorType":"exception","errorClass":"MlflowException","httpStatus":null,"severity":"error","filePath":"mlflow/store/artifact/ftp_artifact_repo.py","lineNumber":133,"sourceCode":"                file_path = file_name if path is None else posixpath.join(path, file_name)\n                full_file_path = posixpath.join(list_dir, file_name)\n                if self._is_dir(ftp, full_file_path):\n                    infos.append(FileInfo(file_path, True, None))\n                else:\n                    size = self._size(ftp, full_file_path)\n                    infos.append(FileInfo(file_path, False, size))\n        return infos\n\n    def _download_file(self, remote_file_path, local_path):\n        remote_full_path = (\n            posixpath.join(self.path, remote_file_path) if remote_file_path else self.path\n        )\n        with self.get_ftp_client() as ftp:\n            with open(local_path, \"wb\") as f:\n                ftp.retrbinary(\"RETR \" + remote_full_path, f.write)\n\n    def delete_artifacts(self, artifact_path=None):\n        raise MlflowException(\"Not implemented yet\")\n","sourceCodeStart":115,"sourceCodeEnd":134,"githubUrl":"https://github.com/mlflow/mlflow/blob/6a27f2decc0b76eb1b54af31849784addb357dbc/mlflow/store/artifact/ftp_artifact_repo.py#L115-L134","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nclient.delete_artifacts(run_id, 'model')  # raises on ftp:// repo\n// after\nimport ftplib\nwith ftplib.FTP(host, user, pwd) as ftp:\n    for f in ftp.nlst(f'{base}/model'):\n        ftp.delete(f)","handlingStrategy":"fallback","validationCode":"from mlflow.store.artifact.ftp_artifact_repo import FtpArtifactRepository\nrepo = get_artifact_repository(client.get_run(run_id).info.artifact_uri)\nif isinstance(repo, FtpArtifactRepository):\n    # deletion unsupported: plan manual/FTP-client cleanup","typeGuard":null,"tryCatchPattern":"from mlflow.exceptions import MlflowException\ntry:\n    client.delete_artifacts(run_id, path)\nexcept MlflowException as e:\n    if 'Not implemented yet' in str(e):\n        ftp_delete_fallback(run_id, path)  # ftplib-based cleanup\n    else:\n        raise","preventionTips":["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"],"tags":["ftp","not-implemented","artifact-deletion"],"backgroundTag":"not-implemented","analyzedSha":"6a27f2decc0b76eb1b54af31849784addb357dbc","analyzedAt":"2026-08-29T20:54:51.419Z","schemaVersion":2},"datasetVersion":"2026-08-29T22:17:34.462Z"}