On Wed, Oct 24, 2018 at 10:42 AM August Edwards Guldberg Mikkelsen [log in to unmask] wrote:

Hi again,

there was one question I forgot to ask in my previous email, which relates to the question about how to get the training error.

If I want to get the test error from my calculator object, I currently do the same as for the training error: I loop over my list of test images, attaching the trained calculator object for each iteration and use that to calculate the forces and energy. This approach works okay for the training images, since they have already been fingerprinted during the training. However for the test images, this is hugely inefficient since the test images are then fingerprinted one by one, rather than in parallel. Obviously it would make more sense if I first fingerprinted all my test images in parallel and then did the loop. Is there any simple way to do that?

I tried adding the following lines:

from amp import hash_images

hashed_images = hash(images)

calc.descriptor.calculate_fingerprints(hashed_images, calculate_derivatives = True, parallel = {‘cores’: 8})

The parallel keyword argument should work. I put some logging on the part of the code that requests parallel calculations and the structure of that dictionary in my case is:

parallel={'envcommand': None, 'cores': {'localhost': 8}}

The name localhost is printed in the line Parallel configuration determined from environment for SLURM: in the log file. Can you try and see if changing the structure of the parallel dictionary works for you, too?


Muammar W El Khatib Rodriguez
Postdoctoral Research Associate
Brown University School of Engineering
184 Hope Street
Providence, RI, 02912, USA