Skip to content

Commit fc0a40b

Browse files
committed
actual_db_sizes.sh
1 parent f4eae5f commit fc0a40b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

DraftRetriever/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use ahash::AHashSet;
44
use byteorder::{ReadBytesExt, WriteBytesExt, ByteOrder, LittleEndian};
55
use parking_lot::Mutex;
66
use pyo3::exceptions;
7-
use pyo3::exceptions::PyValueError;
87
use pyo3::prelude::*;
98
use rayon::prelude::*;
109
use std::fs::File;
@@ -354,10 +353,9 @@ impl Reader {
354353

355354
let (draft_choices, max_branch) = get_draft_choices(paths.clone());
356355

357-
if draft_choices.len() > 64 {
356+
if draft_choices.len() > choices as usize {
358357
// It might not be cut enough because cut_to_choices() is best effort, as mentioned in the comment above
359-
// It's not the end of the world to just return an error in these cases
360-
return Err(PyErr::new::<PyValueError, _>("draft_choices was not cut enough"));
358+
return Err(exceptions::PyValueError::new_err("draft_choices was not cut enough"));
361359
}
362360

363361
let (draft_attn_mask, tree_indices, draft_position_ids, retrieve_indices) = generate_draft_buffers(draft_choices.clone(), max_branch);

experiments/actual_db_sizes.sh

Whitespace-only changes.

0 commit comments

Comments
 (0)