Kevin Hu commited on
Commit
11daec5
·
1 Parent(s): fd3ed7b

refine the message of queuing a task (#3437)

Browse files

### What problem does this PR solve?



### Type of change

- [x] Refactoring

api/db/services/document_service.py CHANGED
@@ -334,7 +334,7 @@ class DocumentService(CommonService):
334
  def begin2parse(cls, docid):
335
  cls.update_by_id(
336
  docid, {"progress": random.random() * 1 / 100.,
337
- "progress_msg": "Task dispatched...",
338
  "process_begin_at": get_format_time()
339
  })
340
 
 
334
  def begin2parse(cls, docid):
335
  cls.update_by_id(
336
  docid, {"progress": random.random() * 1 / 100.,
337
+ "progress_msg": "Task is queued...",
338
  "process_begin_at": get_format_time()
339
  })
340
 
rag/nlp/rag_tokenizer.py CHANGED
@@ -171,7 +171,7 @@ class RagTokenizer:
171
  F += freq
172
  L += 0 if len(tk) < 2 else 1
173
  tks.append(tk)
174
- F /= len(tks)
175
  L /= len(tks)
176
  logging.debug("[SC] {} {} {} {} {}".format(tks, len(tks), L, F, B / len(tks) + L + F))
177
  return tks, B / len(tks) + L + F
 
171
  F += freq
172
  L += 0 if len(tk) < 2 else 1
173
  tks.append(tk)
174
+ #F /= len(tks)
175
  L /= len(tks)
176
  logging.debug("[SC] {} {} {} {} {}".format(tks, len(tks), L, F, B / len(tks) + L + F))
177
  return tks, B / len(tks) + L + F