Description
New feature
The Dynamics task resources states:
Task resources can also be defined in terms of task inputs. For example:
process hello {
memory { 8.GB + 1.GB * Math.ceil(input_file.size() / 1024 ** 3) }
input:
path input_file
script:
"""
your_command --here
"""
}
In this example, each task requests 8 GB of memory, plus the size of the input file rounded up to the next GB. This way, each task requests only as much memory as it needs based on the size of the inputs. The specific function that you use should be tuned for each process
However, the case of input directories is not covered. As far as I can tell, one cannot simply using input_dir.size()
to get the total size of all files in the input directory. input_dir.listFiles().sum{ it.size() }
also does not work.
If there is no way to get the total size of an input directory, then this limitation should be explicitly stated, given that the current docs state "Task resources can also be defined in terms of task inputs.", and not "task input files".