-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
DocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
Location of the issue
N/A.
Description of the issue
gh repo clone metatensor/metatrain
cd metatrain
uv venv -p 3.14
. .venv/bin/activate
uv pip install -e .
mtt export https://huggingface.co/lab-cosmo/upet/resolve/main/models/pet-mad-s-v1.0.2.ckptWhich generates an error log.
`error.log`
❯ cat error.log
Traceback (most recent call last):
File "/home/rgoswami/Git/Github/epfl/pixi_envs/orgs/metatensor/metatrain/metatrain/src/metatrain/__main__.py", line 95, in main
export_model(**args.__dict__)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/rgoswami/Git/Github/epfl/pixi_envs/orgs/metatensor/metatrain/metatrain/src/metatrain/cli/export.py", line 221, in export_model
model.save(path, collect_extensions=extensions_path)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rgoswami/Git/Github/epfl/tmp/.venv/lib/python3.14/site-packages/metatomic/torch/model.py", line 539, in save
module = torch.jit.script(module)
File "/home/rgoswami/Git/Github/epfl/tmp/.venv/lib/python3.14/site-packages/torch/jit/_script.py", line 1437, in script
ret = _script_impl(
obj=obj,
...<3 lines>...
example_inputs=example_inputs,
)
File "/home/rgoswami/Git/Github/epfl/tmp/.venv/lib/python3.14/site-packages/torch/jit/_script.py", line 1146, in _script_impl
return torch.jit._recursive.create_script_module(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
obj, torch.jit._recursive.infer_methods_to_compile
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/rgoswami/Git/Github/epfl/tmp/.venv/lib/python3.14/site-packages/torch/jit/_recursive.py", line 556, in create_script_module
AttributeTypeIsSupportedChecker().check(nn_module)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
File "/home/rgoswami/Git/Github/epfl/tmp/.venv/lib/python3.14/site-packages/torch/jit/_check.py", line 77, in check
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rgoswami/Git/Github/epfl/tmp/.venv/lib/python3.14/site-packages/torch/nn/modules/module.py", line 1964, in __getattr__
raise AttributeError(
f"'{type(self).__name__}' object has no attribute '{name}'"
)
AttributeError: 'AtomisticModel' object has no attribute '__annotations__'. Did you mean: '__annotate_func__'?Suggested fix or improvement (optional)
This actually is a version error, for example, downgrading to Python 3.12 works.
Additional context
I don't think it's much of a bug, but we might want to have better logging / documentation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DocumentationImprovements or additions to documentationImprovements or additions to documentation