pub struct ReproducibilityManager {
pub environments: HashMap<String, EnvironmentSnapshot>,
pub reports: Vec<ReproducibilityReport>,
pub verifications: Vec<VerificationResult>,
pub config: ReproducibilityConfig,
}Expand description
Reproducibility manager for tracking experiment reproducibility
Fields§
§environments: HashMap<String, EnvironmentSnapshot>Environment snapshots
reports: Vec<ReproducibilityReport>Reproducibility reports
verifications: Vec<VerificationResult>Verification results
config: ReproducibilityConfigConfiguration
Implementations§
Source§impl ReproducibilityManager
impl ReproducibilityManager
Sourcepub fn new(config: ReproducibilityConfig) -> Self
pub fn new(config: ReproducibilityConfig) -> Self
Create a new reproducibility manager
Sourcepub fn capture_environment(&mut self, random_seeds: &[u64]) -> Result<String>
pub fn capture_environment(&mut self, random_seeds: &[u64]) -> Result<String>
Capture current environment snapshot.
random_seeds should be the actual seed(s) the experiment being
snapshotted used; pass an empty slice if none were recorded. This
used to be hardcoded to vec![42] regardless of what the experiment
actually did, which made the “random seed documented” checklist item
trivially true for every snapshot rather than reflecting reality.
Sourcepub fn generate_report(
&mut self,
experiment_id: &str,
environment_id: &str,
) -> Result<String>
pub fn generate_report( &mut self, experiment_id: &str, environment_id: &str, ) -> Result<String>
Generate reproducibility report for experiment
Sourcepub fn verify_reproducibility(
&mut self,
original_experiment_id: &str,
reproduction_experiment_id: &str,
original_metrics: &HashMap<String, f64>,
reproduction_metrics: &HashMap<String, f64>,
original_environment_id: Option<&str>,
reproduction_environment_id: Option<&str>,
) -> Result<String>
pub fn verify_reproducibility( &mut self, original_experiment_id: &str, reproduction_experiment_id: &str, original_metrics: &HashMap<String, f64>, reproduction_metrics: &HashMap<String, f64>, original_environment_id: Option<&str>, reproduction_environment_id: Option<&str>, ) -> Result<String>
Verify reproducibility between two experiment runs by comparing their actual final metrics.
Every key present in either original_metrics or
reproduction_metrics is compared (relative to
config.numerical_tolerance); a key named with a performance-ish
marker (time/memory/latency/throughput/duration/speed) is scored as
performance_similarity, everything else as result_similarity, so
wall-clock jitter between runs cannot mask (or be masked by) an
actual difference in the computed result, or vice versa.
When original_environment_id/reproduction_environment_id are
both supplied and resolve to a captured EnvironmentSnapshot,
environment_similarity is computed for real from OS/architecture
and pinned-dependency-set overlap; otherwise it is None rather
than a fabricated number. configuration_similarity is always
None: this function has no experiment-configuration data to
compare against.
Trait Implementations§
Source§impl Clone for ReproducibilityManager
impl Clone for ReproducibilityManager
Source§fn clone(&self) -> ReproducibilityManager
fn clone(&self) -> ReproducibilityManager
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReproducibilityManager
impl Debug for ReproducibilityManager
Source§impl<'de> Deserialize<'de> for ReproducibilityManager
impl<'de> Deserialize<'de> for ReproducibilityManager
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>,
Auto Trait Implementations§
impl Freeze for ReproducibilityManager
impl RefUnwindSafe for ReproducibilityManager
impl Send for ReproducibilityManager
impl Sync for ReproducibilityManager
impl Unpin for ReproducibilityManager
impl UnsafeUnpin for ReproducibilityManager
impl UnwindSafe for ReproducibilityManager
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.