pub struct LearningDaemon { /* private fields */ }Expand description
継続的学習プロセス
Implementations§
Source§impl LearningDaemon
impl LearningDaemon
Sourcepub fn new(
config: DaemonConfig,
trigger: Arc<dyn TrainTrigger>,
) -> Result<Self, DaemonError>
pub fn new( config: DaemonConfig, trigger: Arc<dyn TrainTrigger>, ) -> Result<Self, DaemonError>
新しい Daemon を作成(In-Memory Store)
Sourcepub fn with_file_stores(
config: DaemonConfig,
trigger: Arc<dyn TrainTrigger>,
) -> Result<Self, DaemonError>
pub fn with_file_stores( config: DaemonConfig, trigger: Arc<dyn TrainTrigger>, ) -> Result<Self, DaemonError>
新しい Daemon を作成(File Store)
Sourcepub fn with_stores(
config: DaemonConfig,
trigger: Arc<dyn TrainTrigger>,
record_store: Arc<dyn RecordStore>,
episode_store: Arc<dyn EpisodeStore>,
learn_model: Arc<dyn LearnModel>,
) -> Result<Self, DaemonError>
pub fn with_stores( config: DaemonConfig, trigger: Arc<dyn TrainTrigger>, record_store: Arc<dyn RecordStore>, episode_store: Arc<dyn EpisodeStore>, learn_model: Arc<dyn LearnModel>, ) -> Result<Self, DaemonError>
カスタム Store で Daemon を作成
Sourcepub fn record_sender(&self) -> Sender<Vec<Record>>
pub fn record_sender(&self) -> Sender<Vec<Record>>
Record 送信チャンネルを取得
Sourcepub fn shutdown_sender(&self) -> Sender<()>
pub fn shutdown_sender(&self) -> Sender<()>
Shutdown 送信チャンネルを取得
Sourcepub fn config(&self) -> &DaemonConfig
pub fn config(&self) -> &DaemonConfig
設定を取得
Sourcepub fn stats(&self) -> &DaemonStats
pub fn stats(&self) -> &DaemonStats
統計情報を取得
Sourcepub async fn run(&mut self) -> Result<(), DaemonError>
pub async fn run(&mut self) -> Result<(), DaemonError>
メインループを実行
Sourcepub async fn train_now(&mut self) -> Result<ProcessResult, DaemonError>
pub async fn train_now(&mut self) -> Result<ProcessResult, DaemonError>
手動で学習を実行(Trigger 無視)
Sourcepub async fn apply_model(
&mut self,
model: &TrainedModel,
) -> Result<ApplyResult, DaemonError>
pub async fn apply_model( &mut self, model: &TrainedModel, ) -> Result<ApplyResult, DaemonError>
手動でモデルを適用(非同期)
Auto Trait Implementations§
impl Freeze for LearningDaemon
impl !RefUnwindSafe for LearningDaemon
impl Send for LearningDaemon
impl Sync for LearningDaemon
impl Unpin for LearningDaemon
impl !UnwindSafe for LearningDaemon
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