xnn.gnn.models.aimnet2_foundation.detect_artifact#

xnn.gnn.models.aimnet2_foundation.detect_artifact(path)[source]#

Whether path is an AIMNet2 artifact file or directory.

A .safetensors file, a directory of config.json and ensemble_<k>.safetensors, or a torch.save file whose pickle names the state_dict and model_yaml keys (read from the zip without loading the tensors). Paths that do not exist are not artifacts.

Parameters:

path (str or Path) – The candidate.

Returns:

True for an AIMNet2 artifact.

Return type:

bool