Explorar el Código

Fix: limit the depth of DFS (#6101)

### What problem does this PR solve?

#6085

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.18.0
Kevin Hu hace 7 meses
padre
commit
485bc7d7d6
No account linked to committer's email address
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2
    0
      rag/nlp/rag_tokenizer.py

+ 2
- 0
rag/nlp/rag_tokenizer.py Ver fichero

@@ -118,6 +118,8 @@ class RagTokenizer:

def dfs_(self, chars, s, preTks, tkslist):
res = s
if len(tkslist) >= 2048:
return res
# if s > MAX_L or s>= len(chars):
if s >= len(chars):
tkslist.append(preTks)

Cargando…
Cancelar
Guardar