jobflow icon indicating copy to clipboard operation
jobflow copied to clipboard

"Detours" should be called something else

Open computron opened this issue 1 year ago • 9 comments

In jobflow, a "detour" means something else than it does in FireWorks. Namely, in FireWorks a detour eventually routes back to the original workflow (which is the origin of the "detour" name, i.e. you eventually get back on the road you intend). In jobflow I don't think this is the case and the normal detour is handled by the Additions option

Suggest renaming "detour" in jobflow to avoid confusion, as this is a pretty specific term and people might easily think it means the same thing in both libraries.

computron avatar Jun 28 '23 20:06 computron

Linking this to #341, which needs further clarity because I also found the name confusing when I was writing up the documentation for that section.

Andrew-S-Rosen avatar Jun 29 '23 03:06 Andrew-S-Rosen

I agree that the wording is confusing because of the Fireworks context. That said, the detour does route back to the original workflow but the outputs can't be used. The main difference between detour and addition is the order of execution. A new detour job will always run before any other children are run. Whereas an addition job can get run before/after child jobs depending on the priority of the workflow manager.

detour/addition

The original detour in fireworks is more like "replace" in jobflow in the way that's its used.

replace

One question is whether we really need both addition and detour. Addition is just a special version of detour where the execution order doesn't matter. We could make the default behaviour of addition the same as detour and remove the detour option entirely.

If we decide to keep both detour and addition, some options for a new name could be:

  • Insert
  • Diversion

utf avatar Jun 29 '23 12:06 utf

Good that this issue is raised and it would indeed be good to clarify. We also had some thinking with @gpetretto about this. And we ended up thinking, if we cannot use the outputs of a detour (which is the case in jobflow), for which case is it useful (and I did not find a case where this would be needed, basically when we need the outputs, we always use replace as it is the "only" option for it) ? So we actually never use detour, only addition or replace.

davidwaroquiers avatar Jun 29 '23 12:06 davidwaroquiers

I think the actual detour is still useful in contrast to addition. You might want to run some post processing and update a file in place before the next job runs.

utf avatar Jun 29 '23 12:06 utf

I see, but that means this job needs to run in the directory of the previous one right ? Or at least access the path of the job from which the detour is made and perform it's updates of the said files there.

davidwaroquiers avatar Jun 29 '23 12:06 davidwaroquiers

@utf, I think that would be a great figure to add to the docs!

Andrew-S-Rosen avatar Jun 29 '23 16:06 Andrew-S-Rosen

This conversation is getting me a bit mixed up

@utf can you put diagrams of what all the current options are in jobflow? The FWs diagram is below:

image

computron avatar Jul 24 '23 22:07 computron

Hi @computron, the options available are in this comment: https://github.com/materialsproject/jobflow/issues/358#issuecomment-1613102577

There are also options to stop_children and stop_jobflow which are the equivalent of defuse_children and exit in fireworks.

utf avatar Jul 27 '23 08:07 utf

How about we change detour to insert?

utf avatar Aug 31 '23 09:08 utf