-
Notifications
You must be signed in to change notification settings - Fork 634
Dry run doesn't work with input-based resource allocation #2575
Description
Snakemake version
8.0.1
Describe the bug
This is probably considered in the gray area between a bug and a feature but I have rules with resource specifications defined like this:
...
resources:
runtime=lambda wc, input: max(MIN_RUNTIME, input.size_mb / 5),
...
and when I use the -n flag to do a dry run of the pipeline I get WorkflowError: Cannot parse runtime value into minutes for setting runtime resource: <TBD>. It makes sense that it wouldn't be able to calculate resource requirements without any inputs but it would be nice to be able to use -n in tandem with this way of defining resources.
Is this something you'd consider changing the behavior of (e.g. allow the resource spec to take a value like TBD for dryruns only) or is it something where I should just wrap the resource function with something to catch this and provide a default?