pub struct LearnedActionOrder {
pub discover: Vec<String>,
pub not_discover: Vec<String>,
pub action_set_hash: u64,
pub source: ActionOrderSource,
pub lora: Option<LoraConfig>,
pub validated_accuracy: Option<f64>,
}Expand description
学習済みアクション順序
DependencyGraph を LLM なしで即座に構築するためのキャッシュ。 同じアクション集合であれば、LLM を呼ばずにグラフを生成できる。
§フィールド
discover/not_discover: アクション実行順序action_set_hash: アクション集合の識別子(マッチング用)lora: このエントリに関連付けられた LoRA 設定validated_accuracy: 検証済み精度(オプション)
Fields§
§discover: Vec<String>Discover(NodeExpand)アクションの順序
not_discover: Vec<String>NotDiscover(NodeStateChange)アクションの順序
action_set_hash: u64アクション集合のハッシュ(キャッシュヒット判定用)
ハッシュが一致すれば同じアクション集合とみなす。
source: ActionOrderSource生成元の情報(デバッグ用)
lora: Option<LoraConfig>対応する LoRA 設定(オプション)
validated_accuracy: Option<f64>検証済み精度(オプション)
Implementations§
Source§impl LearnedActionOrder
impl LearnedActionOrder
Sourcepub fn new(
discover: Vec<String>,
not_discover: Vec<String>,
actions: &[String],
) -> Self
pub fn new( discover: Vec<String>, not_discover: Vec<String>, actions: &[String], ) -> Self
新しい LearnedActionOrder を作成
Sourcepub fn with_lora(self, lora: LoraConfig) -> Self
pub fn with_lora(self, lora: LoraConfig) -> Self
LoRA 設定を追加
Sourcepub fn with_accuracy(self, accuracy: f64) -> Self
pub fn with_accuracy(self, accuracy: f64) -> Self
検証済み精度を設定
Sourcepub fn with_source(self, source: ActionOrderSource) -> Self
pub fn with_source(self, source: ActionOrderSource) -> Self
生成元を設定
Sourcepub fn compute_hash(actions: &[String]) -> u64
pub fn compute_hash(actions: &[String]) -> u64
アクション集合のハッシュを計算
アクション名をソートしてハッシュすることで、順序に依存しないハッシュを生成。
Sourcepub fn is_exact_match(&self, actions: &[String]) -> bool
pub fn is_exact_match(&self, actions: &[String]) -> bool
アクション集合が完全一致するか判定(ハッシュで判定)
Note: matches_actions は is_exact_match のエイリアス(後方互換性)
Sourcepub fn matches_actions(&self, actions: &[String]) -> bool
pub fn matches_actions(&self, actions: &[String]) -> bool
is_exact_match のエイリアス(後方互換性のため維持)
Sourcepub fn match_rate(&self, actions: &[String]) -> f64
pub fn match_rate(&self, actions: &[String]) -> f64
一致率を計算(Jaccard 係数)
Trait Implementations§
Source§impl Clone for LearnedActionOrder
impl Clone for LearnedActionOrder
Source§fn clone(&self) -> LearnedActionOrder
fn clone(&self) -> LearnedActionOrder
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 LearnedActionOrder
impl Debug for LearnedActionOrder
Source§impl<'de> Deserialize<'de> for LearnedActionOrder
impl<'de> Deserialize<'de> for LearnedActionOrder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LearnedActionOrder
impl RefUnwindSafe for LearnedActionOrder
impl Send for LearnedActionOrder
impl Sync for LearnedActionOrder
impl Unpin for LearnedActionOrder
impl UnwindSafe for LearnedActionOrder
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