-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
When trying to export a simple test function
from metatomic.torch import AtomisticModel, System
import vesin.metatomic
@torch.jit.script
def foo(systems: list[System], model: AtomisticModel) -> None:
vesin.metatomic.compute_requested_neighbors(
systems=systems, system_length_unit="nm", model=model
)I get an error for an unsupported annotation
AssertionError: Unsupported annotation typing.Union[metatomic.torch.model.AtomisticModel, metatomic.torch.model.ModelInterface] could not be resolved because None could not be resolved. At
File "/Users/philiploche/projects/water-benchmark/.venv/lib/python3.13/site-packages/vesin/metatomic/_model.py", line 17
systems: Union[List[System], System],
system_length_unit: str,
model: Union[AtomisticModel, ModelInterface],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
model_length_unit: Optional[str] = None,
check_consistency: bool = False,
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels