smact.property_prediction.registry module#
Model registry for discovering and resolving pretrained models, including functions to query available properties, fidelities, and default model names.
Model registry for discovering and resolving pretrained models.
- smact.property_prediction.registry.get_available_models(include_cached: bool = True) list[str][source]#
Query for available pretrained models.
Attempts to fetch the model manifest from the remote server. Falls back to listing locally cached models if remote is unavailable.
- Parameters:
include_cached – Whether to include locally cached models in the list.
- Returns:
List of available model names.
- smact.property_prediction.registry.get_default_model(property_name: str, fidelity: str | None = None) str[source]#
Get the default model name for a property/fidelity combination.
- Parameters:
property_name – Name of the property (e.g., “band_gap”, “bulk_modulus”).
fidelity – Optional fidelity level (e.g., “pbe”, “hse06”). If None, uses the default fidelity for that property.
- Returns:
Model name string (e.g., “Roost-MP-2024.1.0-band_gap-pbe”).
- Raises:
ValueError – If property or fidelity is not supported.
- smact.property_prediction.registry.get_property_description(property_name: str) str[source]#
Get the description for a property.
- Parameters:
property_name – Name of the property.
- Returns:
Description string.
- smact.property_prediction.registry.get_property_fidelities(property_name: str) list[str] | None[source]#
Get available fidelity levels for a property.
- Parameters:
property_name – Name of the property.
- Returns:
List of available fidelities, or None if property has no fidelity variants.
- Raises:
ValueError – If property is not supported.
- smact.property_prediction.registry.get_property_unit(property_name: str) str[source]#
Get the unit string for a property.
- Parameters:
property_name – Name of the property.
- Returns:
Unit string (e.g., “eV”, “GPa”).
- smact.property_prediction.registry.get_supported_properties() list[str][source]#
Get list of properties with available models.
- Returns:
List of property names that have pretrained models.
- smact.property_prediction.registry.model_exists(model_name: str) bool[source]#
Check if a model exists locally or remotely.
- Parameters:
model_name – Name of the model to check.
- Returns:
True if model exists, False otherwise.
- smact.property_prediction.registry.parse_model_name(model_name: str) dict[str, str | None][source]#
Parse a model name into its components.
Model naming convention: Roost-<dataset>-<version>-<property>[-<fidelity>]
- Parameters:
model_name – Full model name string.
- Returns:
model_type, dataset, version, property, fidelity.
- Return type:
Dictionary with keys