Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add argument to run for submitting targets without IO checks #417

Open
LudvigOlsen opened this issue Jul 20, 2024 · 5 comments
Open

Add argument to run for submitting targets without IO checks #417

LudvigOlsen opened this issue Jul 20, 2024 · 5 comments
Assignees

Comments

@LudvigOlsen
Copy link

LudvigOlsen commented Jul 20, 2024

For larger workflows, the file IO checks can take a long time. In many cases this is appropriate, but often I'll know that no files have changed since my last run, in which case it is unnecessary to perform these checks in order to run targets that match the name regex. If the dependencies don't actually exist, I assume the jobs will just fail.

E.g., say I am debugging a script and end up running the same target 5 times in a row. It would save a lot of time if I could tell it to just submit the job without checking dependencies. (This relates to why I like the context logging in #416 as I can copy the call and rerun interactively. But doing that for 100s of targets would be annoying :-) )

Perhaps a flag in gwf run could disable IO checks and just submit the jobs?

Something like:
gwf run --no_io *my_target*

would then submit all targets that match *my_target* without checking IO and (and therefore without running missing dependencies).

@dansondergaard
Copy link
Collaborator

I think that we could do something like this:

  1. Add a --force flag to gwf run. When the flag is given, gwf will not do any checks to see if a target should be submitted, but just submit it and their dependencies.
  2. Add a --no-deps flag to gwf run. When the flag is given, gwf run will only submit the targets matching the given pattern, but not their dependencies.

So running gwf run --force --no-deps *my_target* will submit the matching targets, without their dependencies, and without probing the filesystem for changes.

@LudvigOlsen
Copy link
Author

That sounds great!

I guess --force would run all dependencies then. Would it make sense to allow setting a number of "dependency levels" to compute? So where --no-deps would be 0, you could allow running N steps down the three?

@dansondergaard
Copy link
Collaborator

It's possible, but sounds like a very niche feature :) You could sounds the (almost) same problem by giving the dependencies to gwf run directly, like gwf run --force '*layer1*' '*layer2*', etc., which is already possible.

@LudvigOlsen
Copy link
Author

True! gwf run --force --no-deps would work for my situation for sure. And force would allow rerunning everything without removing files (could be a mess if it fails midway though).

@dansondergaard
Copy link
Collaborator

Great! I have commented on #416 separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants