core.components.benchmark.uma_speed_benchmark#

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#

InferenceBenchRunner

Represents an abstraction over things that run in a loop and can save/load state.

Functions#

seed_everywhere(seed)

ase_to_graph(atoms, neighbors, cutoff[, external_graph])

get_fcc_carbon_xtal(neighbors, radius, num_atoms[, ...])

get_qps(data, predictor[, warmups, timeiters])

trace_handler(p, name, save_loc)

make_profile(data, predictor, name, save_loc)

Module Contents#

core.components.benchmark.uma_speed_benchmark.seed_everywhere(seed)#
core.components.benchmark.uma_speed_benchmark.ase_to_graph(atoms, neighbors: int, cutoff: float, external_graph=True)#
core.components.benchmark.uma_speed_benchmark.get_fcc_carbon_xtal(neighbors: int, radius: float, num_atoms: int, lattice_constant: float = 3.8, external_graph: bool = True)#
core.components.benchmark.uma_speed_benchmark.get_qps(data, predictor, warmups: int = 10, timeiters: int = 100)#
core.components.benchmark.uma_speed_benchmark.trace_handler(p, name, save_loc)#
core.components.benchmark.uma_speed_benchmark.make_profile(data, predictor, name, save_loc)#
class core.components.benchmark.uma_speed_benchmark.InferenceBenchRunner(run_dir_root, natoms_list: list[int], model_checkpoints: dict[str, str], timeiters: int = 10, seed: int = 1, device='cuda', overrides: dict | None = None, inference_settings: fairchem.core.units.mlip_unit.api.inference.InferenceSettings = inference_settings_default(), generate_traces: bool = False)#

Bases: fairchem.core.components.runner.Runner

Represents an abstraction over things that run in a loop and can save/load state.

ie: Trainers, Validators, Relaxation all fall in this category.

Note

When running with the fairchemv2 cli, the job_config and attribute is set at runtime to those given in the config file.

job_config#

a managed attribute that gives access to the job config

Type:

DictConfig

natoms_list#
device#
seed#
timeiters#
model_checkpoints#
run_dir#
overrides#
inference_settings#
generate_traces#
run() None#
save_state(_)#
load_state(_)#