pub struct WorkerTaskLearn { /* private fields */ }Expand description
Worker タスク完了ベースの LearnModel
TaskId ごとにアクション列をグループ化し、done で終わるシーケンスを Episode として構築。
Implementations§
Source§impl WorkerTaskLearn
impl WorkerTaskLearn
pub fn new() -> Self
pub fn with_system_prompt(self, prompt: impl Into<String>) -> Self
pub fn with_min_actions(self, min: usize) -> Self
Trait Implementations§
Source§impl Default for WorkerTaskLearn
impl Default for WorkerTaskLearn
Source§impl LearnModel for WorkerTaskLearn
impl LearnModel for WorkerTaskLearn
Source§fn evaluate(&self, context: &EpisodeContext) -> Outcome
fn evaluate(&self, context: &EpisodeContext) -> Outcome
Records から Success/Failure を判定 Read more
Source§fn build_episodes(&self, records: &[Record]) -> Vec<Episode>
fn build_episodes(&self, records: &[Record]) -> Vec<Episode>
Record のストリームから Episode を構築 Read more
Source§fn convert(&self, episode: &Episode) -> Result<TrainingData, LearnError>
fn convert(&self, episode: &Episode) -> Result<TrainingData, LearnError>
Episode を TrainingData に変換
Source§fn convert_batch(&self, episodes: &[Episode]) -> Vec<TrainingData>
fn convert_batch(&self, episodes: &[Episode]) -> Vec<TrainingData>
複数 Episode を一括変換(デフォルト実装)
Source§fn build_episodes_from_actions(&self, actions: &[ActionEvent]) -> Vec<Episode>
fn build_episodes_from_actions(&self, actions: &[ActionEvent]) -> Vec<Episode>
便利メソッド: ActionEvent[] から直接変換
Auto Trait Implementations§
impl Freeze for WorkerTaskLearn
impl RefUnwindSafe for WorkerTaskLearn
impl Send for WorkerTaskLearn
impl Sync for WorkerTaskLearn
impl Unpin for WorkerTaskLearn
impl UnwindSafe for WorkerTaskLearn
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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more