pub struct MemoryKnowledgeBase { /* private fields */ }Expand description
In-memory knowledge base implementation.
The reference backend and the storage half of FileKnowledgeBase.
Implementations§
Source§impl MemoryKnowledgeBase
impl MemoryKnowledgeBase
Sourcepub fn records(&self) -> &[ExperimentRecord]
pub fn records(&self) -> &[ExperimentRecord]
Borrowed view, for callers inside this crate that would rather not clone (the trait itself hands out owned records on purpose).
Trait Implementations§
Source§impl Default for MemoryKnowledgeBase
impl Default for MemoryKnowledgeBase
Source§fn default() -> MemoryKnowledgeBase
fn default() -> MemoryKnowledgeBase
Returns the “default value” for a type. Read more
Source§impl KnowledgeBase for MemoryKnowledgeBase
impl KnowledgeBase for MemoryKnowledgeBase
Source§fn get(&self, id: &str) -> Result<Option<ExperimentRecord>>
fn get(&self, id: &str) -> Result<Option<ExperimentRecord>>
Indexed, unlike the linear default.
Source§fn record(&mut self, experiment: ExperimentRecord) -> Result<()>
fn record(&mut self, experiment: ExperimentRecord) -> Result<()>
Store a new experiment record.
Source§fn all(&self) -> Result<Vec<ExperimentRecord>>
fn all(&self) -> Result<Vec<ExperimentRecord>>
Every record this base holds, in insertion order.
Source§fn refresh(&mut self) -> Result<usize>
fn refresh(&mut self) -> Result<usize>
Pick up records another process appended since this handle was
opened. Returns how many were newly loaded. Read more
Source§fn search(
&self,
query: &str,
max_results: usize,
) -> Result<Vec<ExperimentRecord>>
fn search( &self, query: &str, max_results: usize, ) -> Result<Vec<ExperimentRecord>>
Substring search over name, hypothesis, notes, tags and pipeline. Read more
Source§fn retrieve(&self, query: &RetrievalQuery) -> Result<Vec<ScoredRecord>>
fn retrieve(&self, query: &RetrievalQuery) -> Result<Vec<ScoredRecord>>
Rank records against a query by relevance, structure, recency
and importance. See
crate::retrieval for the formula.Source§fn lineage(&self, id: &str) -> Result<Option<Lineage>>
fn lineage(&self, id: &str) -> Result<Option<Lineage>>
An experiment with its ancestors and descendants.
Source§fn experiments_in_line(&self, line: &str) -> Result<Vec<ExperimentRecord>>
fn experiments_in_line(&self, line: &str) -> Result<Vec<ExperimentRecord>>
List experiments in a research line, ordered chronologically.
Source§fn research_lines(&self) -> Result<Vec<ResearchLine>>
fn research_lines(&self) -> Result<Vec<ResearchLine>>
Get all research lines with trend analysis.
Source§fn promising_lines(&self, metric: &str) -> Result<Vec<ResearchLine>>
fn promising_lines(&self, metric: &str) -> Result<Vec<ResearchLine>>
Find promising research lines (improving trend, high metric values).
Source§fn trajectory(&self, line: &str, metric: &str) -> Result<Vec<(String, f64)>>
fn trajectory(&self, line: &str, metric: &str) -> Result<Vec<(String, f64)>>
Get the metric trajectory for a research line.
Source§fn change_points(
&self,
line: &str,
metric: &str,
threshold: f64,
) -> Result<Vec<ChangePoint>>
fn change_points( &self, line: &str, metric: &str, threshold: f64, ) -> Result<Vec<ChangePoint>>
Detect change points where metrics shifted significantly.
Auto Trait Implementations§
impl Freeze for MemoryKnowledgeBase
impl RefUnwindSafe for MemoryKnowledgeBase
impl Send for MemoryKnowledgeBase
impl Sync for MemoryKnowledgeBase
impl Unpin for MemoryKnowledgeBase
impl UnsafeUnpin for MemoryKnowledgeBase
impl UnwindSafe for MemoryKnowledgeBase
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