How to debug the workflow?

43 views
Skip to first unread message

specter119

unread,
Jun 9, 2016, 9:57:52 AM6/9/16
to Materials Project Development Group

I have sth wrong with my workflows.

when I type commad lpad get_fws -i fw_id, some fw_id will get error like this:

kl_me2 environment
/lustre/home/umjzhh-1/kl_me2/codes/pymatgen/pymatgen/io/vasp/sets_deprecated.py:460: DeprecationWarning: __init__ is deprecated
All vasp input sets have been replaced by equivalents pymatgen.io.sets. Will be removed in pmg 4.0.
  return DictVaspInputSet(name, loadfn(filename), **kwargs)
Traceback (most recent call last):
  File "/lustre/home/umjzhh-1/kl_me2/virtenv_kl_me2/bin/lpad", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/lustre/home/umjzhh-1/kl_me2/codes/fireworks/scripts/lpad", line 6, in <module>
    lpad()
  File "/lustre/home/umjzhh-1/kl_me2/codes/fireworks/fireworks/scripts/lpad_run.py", line 863, in lpad
    args.func(args)
  File "/lustre/home/umjzhh-1/kl_me2/codes/fireworks/fireworks/scripts/lpad_run.py", line 208, in get_fws
    fw = lp.get_fw_by_id(id)
  File "/lustre/home/umjzhh-1/kl_me2/codes/fireworks/fireworks/core/launchpad.py", line 316, in get_fw_by_id
    return Firework.from_dict(self.get_fw_dict_by_id(fw_id))
  File "/lustre/home/umjzhh-1/kl_me2/codes/fireworks/fireworks/utilities/fw_serializers.py", line 148, in _decorator
    m_dict = func(self, *new_args, **kwargs)
  File "/lustre/home/umjzhh-1/kl_me2/codes/fireworks/fireworks/core/firework.py", line 325, in from_dict
    state, created_on, fw_id, updated_on=updated_on)
  File "/lustre/home/umjzhh-1/kl_me2/codes/fireworks/fireworks/core/firework.py", line 218, in __init__
    tasks]  # put tasks in a special location of the spec
  File "/lustre/home/umjzhh-1/kl_me2/codes/fireworks/fireworks/utilities/fw_serializers.py", line 161, in _decorator
    m_dict = func(self, *args, **kwargs)
  File "/lustre/home/umjzhh-1/kl_me2/codes/fireworks/fireworks/utilities/fw_serializers.py", line 133, in _decorator
    m_dict = recursive_dict(m_dict)
  File "/lustre/home/umjzhh-1/kl_me2/codes/fireworks/fireworks/utilities/fw_serializers.py", line 76, in recursive_dict
    return {recursive_dict(k, preserve_unicode): recursive_dict(v, preserve_unicode) for k, v in obj.items()}
  File "/lustre/home/umjzhh-1/kl_me2/codes/fireworks/fireworks/utilities/fw_serializers.py", line 76, in <dictcomp>
    return {recursive_dict(k, preserve_unicode): recursive_dict(v, preserve_unicode) for k, v in obj.items()}
  File "/lustre/home/umjzhh-1/kl_me2/codes/fireworks/fireworks/utilities/fw_serializers.py", line 79, in recursive_dict
    return [recursive_dict(v, preserve_unicode) for v in obj]
  File "/lustre/home/umjzhh-1/kl_me2/codes/fireworks/fireworks/utilities/fw_serializers.py", line 70, in recursive_dict
    return recursive_dict(obj.as_dict(), preserve_unicode)
  File "/lustre/home/umjzhh-1/kl_me2/codes/custodian/custodian/vasp/jobs.py", line 347, in as_dict
    default_vasp_input_set=self.default_vis.as_dict(),
AttributeError: 'dict' object has no attribute 'as_dict'

and the same error message with lpad get_fws -s but lpad get_wflows always work normally.

I almost lost in finding errors, will someone gives me more suggestions?

Donny Winston

unread,
Jun 10, 2016, 3:57:51 PM6/10/16
to Materials Project Development Group
What versions of all codes (pymatgen/fireworks/custodian) are you using? There were recent-ish changes to serialization (going between database-compatible dicts and Python objects) in our codes. I recommend upgrading to latest versions if you're running old versions, and re-creating workflows.

Joseph Montoya

unread,
Jun 10, 2016, 4:45:14 PM6/10/16
to Donny Winston, Materials Project Development Group
I’m able to replicate this error with the latest custodian/fireworks/pymatgen, seems like the deserialization works if you replace line 347 in jobs.py:
    default_vasp_input_set=self.default_vis.as_dict(),  
with
  default_vasp_input_set=self.default_vis,
Submitted a PR to custodian.  Note that this causes a deprecation warning to be issued, since the old MPVaspInputSet is the default in custodian.  We’ll probably want to replace that with MPRelaxSet, but it wasn’t immediately obvious to me how to refactor jobs.py to allow that, since the new input sets require a structure as input.

Best,
Joey

--
You received this message because you are subscribed to the Google Groups "Materials Project Development Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to matproj-devel...@googlegroups.com.
To post to this group, send email to matproj...@googlegroups.com.
Visit this group at https://groups.google.com/group/matproj-develop.

Patrick Huck

unread,
Jun 10, 2016, 4:51:02 PM6/10/16
to Joseph Montoya, Donny Winston, Materials Project Development Group

Joseph Montoya

unread,
Jun 10, 2016, 6:25:08 PM6/10/16
to ph...@lbl.gov, Donny Winston, Materials Project Development Group
Thanks Patrick.  Fireworks used to handle that appropriately, but it starts to crash for me on pymatgen commit 3b12b06.  It seems that the crash triggers when I change the import statement on line 31 of pymatgen.io.vasp.sets from * to the explicit list of deprecated input sets.  If I add DictVaspInputSet to the list of explicit imports, the deserialization works again.

Best,
Joey

specter119

unread,
Jun 11, 2016, 3:02:47 AM6/11/16
to Materials Project Development Group
Thank you. all with latest master version, how to re-creating workflows? 

在 2016年6月11日星期六 UTC+8上午3:57:51,Donny Winston写道:

specter119

unread,
Jun 11, 2016, 3:03:56 AM6/11/16
to Materials Project Development Group, dwin...@lbl.gov
Thank you, I tried and the error fixed.

在 2016年6月11日星期六 UTC+8上午4:45:14,Joseph Montoya写道:

specter119

unread,
Jun 11, 2016, 3:04:49 AM6/11/16
to Materials Project Development Group, mont...@lbl.gov, dwin...@lbl.gov
Thank you Patrick.

在 2016年6月11日星期六 UTC+8上午4:51:02,Patrick Huck写道:
Reply all
Reply to author
Forward
0 new messages