feat: add trial user attributes for logging and analysis

Add AttrValue enum (Float, Int, String, Bool) with From impls and
set_user_attr/user_attr/user_attrs methods on both Trial and
CompletedTrial. Attributes set during optimization are propagated
through complete_trial and prune_trial. AttrValue is re-exported
at crate root and in the prelude.
This commit is contained in:
Manuel Raimann
2026-02-11 17:18:17 +01:00
parent f67188e3a7
commit 52f3c074dc
10 changed files with 241 additions and 3 deletions
+1
View File
@@ -278,6 +278,7 @@ mod tests {
HashMap::new(),
0.0,
values.to_vec(),
HashMap::new(),
)
}
+1
View File
@@ -204,6 +204,7 @@ mod tests {
HashMap::new(),
0.0,
values.to_vec(),
HashMap::new(),
)
}
+1
View File
@@ -240,6 +240,7 @@ mod tests {
HashMap::new(),
0.0,
values.to_vec(),
HashMap::new(),
)
}
+1
View File
@@ -311,6 +311,7 @@ mod tests {
HashMap::new(),
value,
intermediate_values,
HashMap::new(),
)
}