openmm-ml
openmm-ml copied to clipboard
Errors with ANI
I'm trying to use this on a new computer (an ARM Mac) for the first time, and I ran into an error I've never seen before. When it tries to compile the TorchANI model to TorchScript, I get the exception
RuntimeError: Could not cast attribute '_species_to_tensor' to type __torch__.torchani.utils.ChemicalSymbolsToInts (of Python compilation unit at: 0x600002facc98): Could not cast attribute 'rev_species' to type Dict[Tensor, int]: Unable to cast Python instance to C++ type (compile in debug mode for details)
I have PyTorch 1.10.0 and TorchANI 2.2, both installed from conda-forge. Has anyone seen this before?
TorchANI 2.2 or 2.2.2?
2.2. That's the most recent version available on conda-forge. They have 2.2.2 for linux-64 and osx-64, but only 2.2 for everything else.
2.2 is also the most recent release at https://github.com/aiqm/torchani.
The same issue like https://github.com/aiqm/torchani/issues/598. You need TorchANI 2.2.2.
2.2 is also the most recent release at https://github.com/aiqm/torchani.
They released TorchANI 2.2.2 (https://github.com/conda-forge/torchani-feedstock/pull/3), but not updated https://github.com/aiqm/torchani
Where can I get it from? It's neither on conda-forge nor github.
I installed the latest TorchANI code from the main branch on github. I don't know whether that corresponds to 2.2.2, but it fixed the problem. We should make sure the noarch conda build gets updated before we release OpenMM-ML. Otherwise, we'll be getting a lot of bug reports from Mac and Windows users.
Can we add this to the GitHub Actions CI on @mikemhenry's box?
I installed the latest TorchANI code from the main branch on github. I don't know whether that corresponds to 2.2.2, but it fixed the problem.
Yes, it is on master
(https://github.com/aiqm/torchani/releases/tag/2.2.2)
We should make sure the noarch conda build gets updated before we release OpenMM-ML. Otherwise, we'll be getting a lot of bug reports from Mac and Windows users.
Since TorchANI 2.2.1, it is not longer noarch
, because of cuAEV
(https://github.com/aiqm/torchani/blob/master/torchani/cuaev/README.md). It seems only Linux supported fully (https://anaconda.org/conda-forge/torchani/files). The Mac packages are built without CUDA. The Windows packages don't exist.
Ping @yueyericardo
No CUDA on Mac is fine, but there's only a package for x86, not ARM.
Hi, sorry for that! We will release a new version for noarch
soon (maybe today or tomorrow).
Thanks!
Hi, osx_arm64 2.2.2
is added at https://github.com/conda-forge/torchani-feedstock/pull/4, but sorry that we currently don't have time to investigate the ways to build windows
version.
For osx_arm64 it could be installed with
conda install -c conda-forge torchani==2.2.2
torchani==2.2.2
is necessary, otherwise it will install noarch
which is 2.2