Skip to content

Commit

Permalink
remove print
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyongchao committed Dec 19, 2024
1 parent 134c9d6 commit db63373
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion lazyllm/tools/rag/doc_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
5 changes: 0 additions & 5 deletions lazyllm/tools/rag/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit db63373

Please sign in to comment.