pub struct ActionContext {
pub selection_logic: Option<String>,
pub exploration_node_id: Option<u64>,
pub from_guidance: bool,
pub previous_action: Option<String>,
pub lora: Option<LoraConfig>,
pub metadata: HashMap<String, String>,
}Expand description
行動のコンテキスト情報
なぜその行動が選択されたかの情報を保持。 学習時の特徴量として使用可能。
Fields§
§selection_logic: Option<String>選択に使用されたロジック(UCB1, Thompson, Greedy 等)
exploration_node_id: Option<u64>探索空間でのノードID
from_guidance: boolGuidance からの指示だったか
previous_action: Option<String>前回の行動(シーケンス分析用)
lora: Option<LoraConfig>使用した LoRA アダプター設定
metadata: HashMap<String, String>追加のメタデータ
Implementations§
Source§impl ActionContext
impl ActionContext
pub fn new() -> Self
pub fn with_selection_logic(self, logic: impl Into<String>) -> Self
pub fn with_exploration_node(self, node_id: u64) -> Self
pub fn with_guidance(self) -> Self
pub fn with_previous_action(self, action: impl Into<String>) -> Self
pub fn with_lora(self, lora: LoraConfig) -> Self
pub fn with_metadata( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Trait Implementations§
Source§impl Clone for ActionContext
impl Clone for ActionContext
Source§fn clone(&self) -> ActionContext
fn clone(&self) -> ActionContext
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 ActionContext
impl Debug for ActionContext
Source§impl Default for ActionContext
impl Default for ActionContext
Source§fn default() -> ActionContext
fn default() -> ActionContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ActionContext
impl RefUnwindSafe for ActionContext
impl Send for ActionContext
impl Sync for ActionContext
impl Unpin for ActionContext
impl UnwindSafe for ActionContext
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