materialsproject / fireworks

The Fireworks Workflow Management Repo.
https://materialsproject.github.io/fireworks
Other
361 stars 185 forks source link

Issues about current actions of set category in FWorker #291

Closed specter119 closed 6 years ago

specter119 commented 6 years ago
  1. should auto attach category for every firework submit with current config? I think add a variable ADD_CATEGORY to atomate/vasp/config.py and set default as False will be a nice choice.

  2. should include fwoker.query in lpad query request? I not sure the detailed action in the past, but my current test shows not included.

here is my steps:

I add test_category to my_fworker.yaml , like:

name: SJTU_Pi
category: test_category
query: '{}'
env:
   <other settings>

and my FWorker.query:

{'$or': [{'spec._fworker': {'$exists': False}},
  {'spec._fworker': None},
  {'spec._fworker': 'SJTU_Pi'}],
 'spec._category': 'test_category'}

submit a workflow with category

from pymatgen.ext.matproj import MPRester
from fireworks.core.launchpad import LaunchPad
from atomate.vasp.workflows.presets.core import wf_structure_optimization
from atomate.vasp.powerups import set_execution_options

mpa = MPRester()
si_struct = mpa.get_structure_by_material_id('mp-149')

wf = wf_structure_optimization(si_struct)
wf = set_execution_options(wf, category='test_category')

lpad = LaunchPad.auto_load()
lpad.add_wf(wf)

and lpad get_wflows will get all available workflow, rather than the one I just submits.

computron commented 6 years ago

Please note: the only official channel for getting support is:

https://groups.google.com/forum/#!forum/fireworks

The Github issues is no longer used except for internal development purposes.

If you are unable to use the Google Group, you may submit an issue here, but you must clearly state the reason you are unable to use the Google Group in your ticket. Otherwise, your issue will be closed without response.

That said, unfortunately I do not really understand your question but I will try my best to answer.

  1. I think it's enough to have a powerup to do so. I'd rather not create too many global config options - it gets a little messy, and it also makes it less predictable what a certain piece of atomate code will do when a lot of the things are being overridden or changed by global config options that might change between people. If anything, I'd rather move in the opposite direction and take some of the existing global config options and make them powerups so that they are explicit.

  2. The lpad queries do not take into account the restrictions of a particular FireWorker. That is why your last question about lpad get_wflows is getting all the available workflows, not just the ones restricted to that particular fireworker. I think it would be interesting / useful to have an option / flag in the lpad command to give a my_fworker.yaml file path (or use the default config one) to further restrict the query. I'll add it as a feature request on this issues page, but don't know when I or someone else will have a chance to implement it.

specter119 commented 6 years ago

@computron Sorry, I will report to google group later.