Dynamic task resources docs => input directory size #6233
Replies: 7 comments 2 replies
-
At least when using GCP Batch, the following results in file sizes of 0 GB:
|
Beta Was this translation helpful? Give feedback.
-
You should be able to use the The snippet you referenced is only meant to be an example, not an exhaustive listing of everything you could do. You should be able to use the standard types and their methods to achieve whatever you need. |
Beta Was this translation helpful? Give feedback.
-
I don't think an exhaustive list is needed. The main inputs are either single files are directories, so it would be helpful to show how to handle directories. |
Beta Was this translation helpful? Give feedback.
-
I've tried |
Beta Was this translation helpful? Give feedback.
-
I would not recommend such pattern, traversing a path over an object storage can be an expensive operation. |
Beta Was this translation helpful? Give feedback.
-
Also, that example code doesn't work for setting dynamic resources |
Beta Was this translation helpful? Give feedback.
-
Given the amount of compute resources that could be saved by dynamically setting resources based on the input data, I'm surprised that most/all nf-core pipeline just use |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
New feature
The Dynamics task resources states:
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".
Beta Was this translation helpful? Give feedback.
All reactions