Преглед на файлове

refine the message of queuing a task (#3437)

### What problem does this PR solve?



### Type of change

- [x] Refactoring
tags/v0.14.0
Kevin Hu преди 11 месеца
родител
ревизия
cb3b9d7ada
No account linked to committer's email address
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1
    1
      api/db/services/document_service.py
  2. 1
    1
      rag/nlp/rag_tokenizer.py

+ 1
- 1
api/db/services/document_service.py Целия файл

def begin2parse(cls, docid): def begin2parse(cls, docid):
cls.update_by_id( cls.update_by_id(
docid, {"progress": random.random() * 1 / 100., docid, {"progress": random.random() * 1 / 100.,
"progress_msg": "Task dispatched...",
"progress_msg": "Task is queued...",
"process_begin_at": get_format_time() "process_begin_at": get_format_time()
}) })



+ 1
- 1
rag/nlp/rag_tokenizer.py Целия файл

F += freq F += freq
L += 0 if len(tk) < 2 else 1 L += 0 if len(tk) < 2 else 1
tks.append(tk) tks.append(tk)
F /= len(tks)
#F /= len(tks)
L /= len(tks) L /= len(tks)
logging.debug("[SC] {} {} {} {} {}".format(tks, len(tks), L, F, B / len(tks) + L + F)) logging.debug("[SC] {} {} {} {} {}".format(tks, len(tks), L, F, B / len(tks) + L + F))
return tks, B / len(tks) + L + F return tks, B / len(tks) + L + F

Loading…
Отказ
Запис