Skip to content

input-dependent resource specification fails #2555

@fgvieira

Description

@fgvieira

Snakemake version

v8.0.1

Describe the bug

Lambda functions to define resources (runtime, mem or mem_mb) are not supported. For example, this code works:

resources:
    runtime = lambda w: "2 h",

but this fails:

resources:
    runtime = lambda w, attempt: f"{2 * attempt} h",

and also this:

resources:
    runtime = lambda w, attempt, input: f"{2 * attempt * input.size_mb} h",

Might be related to #2510 and #2423.

Logs

WorkflowError:
Cannot parse mem or disk value into size in MB for setting mem_mb resource: <TBD>

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions