Fix:limit random sampling range in check_embedding (#11337)

### What problem does this PR solve?
issue:
[#11319](https://github.com/infiniflow/ragflow/issues/11319)
change:
limit random sampling range in check_embedding

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
buua436
2025-11-18 15:24:27 +08:00
committed by GitHub
parent fea157ba08
commit ded9bf80c5

View File

@ -819,7 +819,7 @@ def check_embedding():
return []
n = min(n, total)
offsets = sorted(random.sample(range(total), n))
offsets = sorted(random.sample(range(min(total,1000)), n))
out = []
for off in offsets: