zernike_test.test failing
======================================================================
ERROR: zernike_test.test
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jkitchin/anaconda3/lib/python3.5/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/Users/jkitchin/vc/projects/neural-network/amp/tests/consistency_test/zernike_test.py", line 87, in test
calculate_derivatives=True)
File "/Users/jkitchin/vc/projects/neural-network/amp/amp/descriptor/zernike.py", line 199, in calculate_fingerprints
self.neighborlist.calculate_items(images, parallel=parallel, log=log)
File "/Users/jkitchin/vc/projects/neural-network/amp/amp/utilities.py", line 421, in calculate_items
workercommand, log)
File "/Users/jkitchin/vc/projects/neural-network/amp/amp/utilities.py", line 200, in setup_parallel
for workerhostname, nprocesses in parallel['cores'].items():
AttributeError: 'int' object has no attribute 'items'
That seems to coming from
descriptor.calculate_fingerprints(images,
parallel={'cores': cores},
log=None,
calculate_derivatives=True)
where parallel is a dictionary, but the cores entry is an integer.
Comments (3)
-
-
repo owner I can see the problem; it should be fixed in dc2b303. I'm confused why the bug didn't reproduce, though.
The cores and parallel variable could probably stand to be made a little more user-friendly, particularly in the deep parts of the code. The logic is that when
cores=1
it means it is either a worker or serial job, that is: "Don't start any workers: you are the worker so do the calculation". When cores has a dictionary form like {'localhost': 2} or {'node421': 16, 'node422': 16} it means "You are the master, start the workers specified in the dictionary and wait for their answers". (Those jobs started by the master will havecores=1
.)This makes me realize we should set up the tests more intelligently so they don't take over more than one core... I'll start a separate issue for that.
-
repo owner - changed status to resolved
Marking as resolved for now; just re-open if it continues to fail.
- Log in to comment
I wasn't able to reproduce this error neither on Linux nor macOS. I run directly the
tests/consistency_test/zernike_test.py
and I do not getAttributeError
.Also, when running tests, the only ones failing for me are those you reported in
#156.