Gibbs workflow error

42 views
Skip to first unread message

den...@gmail.com

unread,
Sep 11, 2017, 5:17:35 PM9/11/17
to atomate
Hi,

Running the Gibbs workflow in the atomate tutorial I, I get the following error on the Elastic Tensor Fitting Firework:


Traceback (most recent call last):

  File \"/global/homes/a/ardunn/.conda/envs/atomate_dev_env/lib/python2.7/site-packages/fireworks/core/rocket.py\", line 253, in run

    m_action = t.run_task(my_spec)

  File \"/global/u2/a/ardunn/tutorials/atomate_dev/codes/atomate/atomate/vasp/firetasks/parse_outputs.py\", line 547, in run_task

    coll.insert_one(gibbs_dict)

  File \"/global/homes/a/ardunn/.conda/envs/atomate_dev_env/lib/python2.7/site-packages/pymongo/collection.py\", line 670, in insert_one

    bypass_doc_val=bypass_document_validation),

  File \"/global/homes/a/ardunn/.conda/envs/atomate_dev_env/lib/python2.7/site-packages/pymongo/collection.py\", line 575, in _insert

    check_keys, manipulate, write_concern, op_id, bypass_doc_val)

  File \"/global/homes/a/ardunn/.conda/envs/atomate_dev_env/lib/python2.7/site-packages/pymongo/collection.py\", line 556, in _insert_one

    check_keys=check_keys)

  File \"/global/homes/a/ardunn/.conda/envs/atomate_dev_env/lib/python2.7/site-packages/pymongo/pool.py\", line 482, in command

    self._raise_connection_failure(error)

  File \"/global/homes/a/ardunn/.conda/envs/atomate_dev_env/lib/python2.7/site-packages/pymongo/pool.py\", line 610, in _raise_connection_failure

    raise error

InvalidDocument: Cannot encode object: array([-10.88950285])



All other fireworks (all transmuters, bulk optimization) launch and finish successfully . Has anyone else had this problem and/or know how to fix it?
If I'm not mistaken, this happens sometimes when trying to store numpy arrays with pymongo. 


Thanks,
Alex

Anubhav Jain

unread,
Sep 11, 2017, 5:33:35 PM9/11/17
to Alex Dunn, atomate, Kiran Mathew, Brandon Bocklund
Yes this would happen when trying to stick a numpy array in pymongo

Feel free to open a ticket in atomate Github issues. The quick fix is to use monty's jsanitize() on the object but it would be better if someone actually converted the numpy arrays to list first. Probably Kiran or Brandon would be the one to do it.

Best,
Anubhav



--
You received this message because you are subscribed to the Google Groups "atomate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to atomate+unsubscribe@googlegroups.com.
To post to this group, send email to ato...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/atomate/e447febb-98c3-426c-9cb6-ca330aa7fe1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Best,
Anubhav
Reply all
Reply to author
Forward
0 new messages