pub struct Settings {
pub worker: PathBuf,
pub model_dir: String,
pub model_sha256: String,
pub limits: Limits,
pub batch: NonZeroUsize,
pub ready: Duration,
pub call: Duration,
pub waiting: usize,
pub request_items: NonZeroUsize,
pub page_records: NonZeroUsize,
pub writer_wait: Duration,
pub windows: Option<Windows>,
}Expand description
The worker, the Start it is sent, and the service’s own bounds on it.
Fields§
§worker: PathBuf§model_dir: String§model_sha256: StringThe model’s manifest a worker’s Ready must name, or it is refused.
limits: Limits§batch: NonZeroUsizelimits.batch_items as a count of texts.
ready: DurationFrom Start until Ready.
call: DurationFrom each Embed until its Vectors.
waiting: usizeCallers that may wait for the one worker at once.
request_items: NonZeroUsizeTexts one request may ask for.
page_records: NonZeroUsizeRecords one page of the walk reads and commits once, from 1 to
PAGE_RECORDS_MOST.
writer_wait: Duration§windows: Option<Windows>EMB-E2: how a text longer than the model reads is embedded whole;
None keeps EMB1, where it gets no vector.
Implementations§
Source§impl Settings
impl Settings
Sourcepub fn document_call(&self) -> Duration
pub fn document_call(&self) -> Duration
EMB-E2 (h): the most one worker call of documents may take.
With windows on, a text may answer up to max_windows vectors, so the
call is given embed_call_ms for each: a page’s calls stay within
embed_call_ms × ⌈(texts + windows) / batch⌉ at their most.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.