#[non_exhaustive]pub enum ParameterKind {
Temperature,
TopP,
TopK,
FrequencyPenalty,
PresencePenalty,
RetrievalTopK,
SimilarityThreshold,
TemporalDecay,
}Expand description
Identifies a tunable parameter in the experiment search space.
Each variant corresponds to a field in ConfigSnapshot and maps to a
named key in SearchSpace via ParameterKind::as_str.
The enum is #[non_exhaustive] — new parameters may be added in future
versions without a breaking change.
§Examples
use zeph_experiments::ParameterKind;
assert_eq!(ParameterKind::Temperature.as_str(), "temperature");
assert!(ParameterKind::TopK.is_integer());
assert!(!ParameterKind::TopP.is_integer());Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Temperature
LLM sampling temperature (float, typically [0.0, 2.0]).
TopP
Top-p (nucleus) sampling probability (float, [0.0, 1.0]).
TopK
Top-k sampling cutoff (integer).
FrequencyPenalty
Frequency penalty applied to already-seen tokens (float, [-2.0, 2.0]).
PresencePenalty
Presence penalty applied to already-seen topics (float, [-2.0, 2.0]).
RetrievalTopK
Number of memory chunks to retrieve per query (integer).
SimilarityThreshold
Minimum cosine similarity score for cross-session memory recall (float).
TemporalDecay
Half-life in days for temporal memory decay (float).
Implementations§
Source§impl ParameterKind
impl ParameterKind
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Return the canonical snake_case name of this parameter.
The returned string matches the key used in config files and experiment
storage. It is identical to the #[serde(rename_all = "snake_case")]
serialization form.
§Examples
use zeph_experiments::ParameterKind;
assert_eq!(ParameterKind::FrequencyPenalty.as_str(), "frequency_penalty");Sourcepub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
Returns true if this parameter has integer semantics.
Integer parameters produce a VariationValue::Int in ConfigSnapshot::diff
and are rounded before being applied to generation overrides.
§Examples
use zeph_experiments::ParameterKind;
assert!(ParameterKind::TopK.is_integer());
assert!(ParameterKind::RetrievalTopK.is_integer());
assert!(!ParameterKind::Temperature.is_integer());Trait Implementations§
Source§impl Clone for ParameterKind
impl Clone for ParameterKind
Source§fn clone(&self) -> ParameterKind
fn clone(&self) -> ParameterKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParameterKind
impl Debug for ParameterKind
Source§impl<'de> Deserialize<'de> for ParameterKind
impl<'de> Deserialize<'de> for ParameterKind
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>,
Source§impl Display for ParameterKind
impl Display for ParameterKind
Source§impl Hash for ParameterKind
impl Hash for ParameterKind
Source§impl PartialEq for ParameterKind
impl PartialEq for ParameterKind
Source§impl Serialize for ParameterKind
impl Serialize for ParameterKind
impl Copy for ParameterKind
impl Eq for ParameterKind
impl StructuralPartialEq for ParameterKind
Auto Trait Implementations§
impl Freeze for ParameterKind
impl RefUnwindSafe for ParameterKind
impl Send for ParameterKind
impl Sync for ParameterKind
impl Unpin for ParameterKind
impl UnsafeUnpin for ParameterKind
impl UnwindSafe for ParameterKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.