From db63373f0dc2a2c8f85e5a8a60e1842d234f6fea Mon Sep 17 00:00:00 2001 From: zhangyongchao Date: Thu, 19 Dec 2024 20:37:47 +0800 Subject: [PATCH] remove print --- lazyllm/tools/rag/doc_manager.py | 1 - lazyllm/tools/rag/utils.py | 5 ----- 2 files changed, 6 deletions(-) diff --git a/lazyllm/tools/rag/doc_manager.py b/lazyllm/tools/rag/doc_manager.py index 841998fe..471c95c9 100644 --- a/lazyllm/tools/rag/doc_manager.py +++ b/lazyllm/tools/rag/doc_manager.py @@ -69,7 +69,6 @@ def upload_files(self, files: List[UploadFile], override: bool = False, # noqa file_paths = [os.path.join(self._manager._path, user_path or '', file.filename) for file in files] file_paths = [gen_unique_filepaths(ele) for ele in file_paths] - print("FILE PATHS", file_paths) ids = self._manager.add_files(file_paths, metadatas=metadatas, status=DocListManager.Status.working) assert len(files) == len(ids), "len(files) uploaded vs len(ids) recored" results = [] diff --git a/lazyllm/tools/rag/utils.py b/lazyllm/tools/rag/utils.py index 37045432..fd544259 100644 --- a/lazyllm/tools/rag/utils.py +++ b/lazyllm/tools/rag/utils.py @@ -126,13 +126,10 @@ def init_tables(self) -> 'DocListManager': return self def delete_files(self, file_ids: List[str]) -> List[KBDocument]: - print("Delete files:", file_ids) document_list = self.update_file_status_by_cond( file_ids, self.DELETE_SAFE_STATUS_LIST, DocListManager.Status.deleting ) - print("document_list: ", document_list) safe_delete_ids = [doc.doc_id for doc in document_list] - print("Input file ids:", file_ids, ", safe delete ids:", safe_delete_ids) self.update_kb_group_file_status(file_ids=safe_delete_ids, status=DocListManager.Status.deleting) return document_list @@ -231,7 +228,6 @@ def __init__(self, path, name): root_dir = os.path.expanduser(os.path.join(config['home'], '.dbs')) os.makedirs(root_dir, exist_ok=True) self._db_path = os.path.join(root_dir, f'.lazyllm_dlmanager.{self._id}.db') - print(f"Database path: {self._db_path}") self._db_lock = FileLock(self._db_path + '.lock') # ensure that this connection is not used in another thread when sqlite3 is not threadsafe self._check_same_thread = not sqlite3_check_threadsafety() @@ -414,7 +410,6 @@ def update_file_status_by_cond( .values(status=new_status) .returning(KBDocument.doc_id, KBDocument.path) ) - print("raw sql: ", str(stmt.compile(compile_kwargs={"literal_binds": True}))) rows = session.execute(stmt).fetchall() session.commit() return rows