pub struct ActionRecord {Show 13 fields
pub task_id: TaskId,
pub group_id: Option<GroupId>,
pub tick: u64,
pub worker_id: usize,
pub action: String,
pub target: Option<String>,
pub success: bool,
pub error: Option<String>,
pub duration_ms: u64,
pub selection_logic: Option<String>,
pub from_guidance: bool,
pub previous_action: Option<String>,
pub lora: Option<String>,
}Expand description
アクション実行の記録
ActionEvent から変換可能。
Fields§
§task_id: TaskIdタスク ID(どのタスクの一部か)
group_id: Option<GroupId>グループ ID(同条件の複数試行をグループ化、Learn 用)
tick: u64Tick
worker_id: usizeWorker ID
action: Stringアクション名
target: Option<String>ターゲット
success: bool成功/失敗
error: Option<String>エラーメッセージ
duration_ms: u64実行時間(ミリ秒)
selection_logic: Option<String>選択ロジック(UCB1, Greedy 等)
from_guidance: boolGuidance からの指示だったか
previous_action: Option<String>前回のアクション
lora: Option<String>使用した LoRA
Implementations§
Source§impl ActionRecord
impl ActionRecord
pub fn new( tick: u64, worker_id: usize, action: impl Into<String>, ) -> ActionRecord
Sourcepub fn task_id(self, task_id: TaskId) -> ActionRecord
pub fn task_id(self, task_id: TaskId) -> ActionRecord
タスク ID を設定
Sourcepub fn group_id(self, group_id: GroupId) -> ActionRecord
pub fn group_id(self, group_id: GroupId) -> ActionRecord
グループ ID を設定
pub fn target(self, target: impl Into<String>) -> ActionRecord
pub fn success(self, success: bool) -> ActionRecord
pub fn error(self, error: impl Into<String>) -> ActionRecord
pub fn duration_ms(self, duration_ms: u64) -> ActionRecord
pub fn selection_logic(self, logic: impl Into<String>) -> ActionRecord
pub fn from_guidance(self) -> ActionRecord
pub fn previous_action(self, action: impl Into<String>) -> ActionRecord
pub fn lora(self, lora: impl Into<String>) -> ActionRecord
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
終端アクション(タスク完了)かどうか
Trait Implementations§
Source§impl Clone for ActionRecord
impl Clone for ActionRecord
Source§fn clone(&self) -> ActionRecord
fn clone(&self) -> ActionRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ActionRecord
impl Debug for ActionRecord
Source§impl<'de> Deserialize<'de> for ActionRecord
impl<'de> Deserialize<'de> for ActionRecord
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ActionRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ActionRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&ActionEvent> for ActionRecord
impl From<&ActionEvent> for ActionRecord
Source§fn from(event: &ActionEvent) -> ActionRecord
fn from(event: &ActionEvent) -> ActionRecord
Converts to this type from the input type.
Source§impl From<ActionRecord> for Record
impl From<ActionRecord> for Record
Source§fn from(record: ActionRecord) -> Record
fn from(record: ActionRecord) -> Record
Converts to this type from the input type.
Source§impl FromRecord for ActionRecord
impl FromRecord for ActionRecord
fn from_record(record: &Record) -> Option<&ActionRecord>
Source§impl Serialize for ActionRecord
impl Serialize for ActionRecord
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ActionRecord
impl RefUnwindSafe for ActionRecord
impl Send for ActionRecord
impl Sync for ActionRecord
impl Unpin for ActionRecord
impl UnwindSafe for ActionRecord
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> 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> 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