Error when loading `.amp` files trained with Tensor Flow

Issue #111 resolved
Muammar El Khatib created an issue

Take the test located at amp/tests/test_gaussian_tflow.py. Run it and try to load calc.amp:

from amp import Amp
calc = Amp.load('train_test/calc.amp')

You get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/users/melkhati/git/amp/amp/__init__.py", line 176, in load
    Model = importhelper(p['model'].pop('importname'))
KeyError: 'importname'

Comments (9)

  1. Zachary Ulissi

    Should be easy to fix but not quite sure what the mechanism for loading things is. Currently I use Amp.load('calc.amp',Model=tflow.NeuralNetwork) to avoid importhelper and specify the model class directly.

  2. Muammar El Khatib reporter

    Thanks for your reply, Zachary!. I will load for the moments the .amp file as you suggested.

  3. Muammar El Khatib reporter

    I changed the status to open, because I will submit a pull request to be reviewed first.

  4. Muammar El Khatib reporter

    Merge branch 'master' into symmetryfunctions

    • master: More instances of "get" to "calculate". Fix spelling typo. Simplify example script. Change "get"s to "calculate"s. Can now turn off logging. commiting for merge Some cleanup to tensorflow module. Re-label plot. update the retraining doc Add SGE to assign_cores. Removed extra comma in init function inside tflow. This pull request should fix issue #111.

    → <<cset b63022f931d1>>

  5. Log in to comment