core.components.benchmark.nvemd_reducer#
Copyright (c) Meta Platforms, Inc. and affiliates.
This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
Classes#
Benchmark reducer interface class. |
Functions#
|
|
|
Module Contents#
- core.components.benchmark.nvemd_reducer.moving_avg(x, window=20)#
- core.components.benchmark.nvemd_reducer.get_te_drift(filename)#
- class core.components.benchmark.nvemd_reducer.NVEMDReducer(benchmark_name: str)#
Bases:
fairchem.core.components.benchmark.benchmark_reducer.BenchmarkReducer
Benchmark reducer interface class.
Note
When running with the fairchemv2 cli, the job_config and runner_config attributes are set at runtime to those given in the config file.
See the Reducer interface class for implementation details.
- job_config#
a managed attribute that gives access to the job config
- Type:
DictConfig
- runner_config#
a managed attributed that gives access to the calling runner config
- Type:
DictConfig
- benchmark_name#
- property runner_type: type[fairchem.core.components.calculate.nve_md_runner.NVEMDRunner]#
The runner type this reducer is associated with.
- join_results(results_dir: str, glob_pattern: str) pandas.DataFrame #
Join results from multiple JSON files into a single DataFrame.
- Parameters:
results_dir – Directory containing result files
glob_pattern – Pattern to match result files
- Returns:
Combined DataFrame containing all results
- save_results(results: list, results_dir: str) None #
Save joined results to a compressed json file
- Parameters:
results – results: Combined results from join_results
results_dir – Directory containing result files
- compute_metrics(results: list, run_name: str) pandas.DataFrame #
Compute Matbench discovery metrics for relaxed energy and structure predictions.
- Parameters:
results – DataFrame containing prediction results with energy values
run_name – Identifier for the current evaluation run
- Returns:
DataFrame containing computed metrics for different material subsets
- save_metrics(metrics: pandas.DataFrame, results_dir: str) None #
Save computed metrics to a compressed JSON file.
- Parameters:
metrics – DataFrame containing the computed metrics
results_dir – Directory where metrics will be saved
- log_metrics(metrics: pandas.DataFrame, run_name: str) None #
Log metrics to the configured logger if available.
- Parameters:
metrics – DataFrame containing the computed metrics
run_name – Name of the current run
- save_state(checkpoint_location: str, is_preemption: bool = False) bool #
Save the current state of the reducer to a checkpoint.
- Parameters:
checkpoint_location – Location to save the checkpoint
is_preemption – Whether the save is due to preemption
- Returns:
Success status of the save operation
- Return type:
bool
- load_state(checkpoint_location: str | None) None #
Load reducer state from a checkpoint.
- Parameters:
checkpoint_location – Location to load the checkpoint from, or None