Skip to content

Commit

Permalink
Adding 'disk' parameter to @resources decorator (#1500)
Browse files Browse the repository at this point in the history
* Adding defautl value for disk to resources decorator

* Adding docstring to resources decorator

* Setting default value for disk to none

---------

Co-authored-by: Jason Garcia <jason.garcia@dtn.com>
  • Loading branch information
jaypond and Jason Garcia authored Oct 26, 2023
1 parent 6f1c354 commit 15cd63f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion metaflow/plugins/resources_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class ResourcesDecorator(StepDecorator):
Number of CPUs required for this step.
gpu : int, default: 0
Number of GPUs required for this step.
disk : int, optional
Disk size (in MB) required for this step. Only applies on Kubernetes.
memory : int, default: 4096
Memory size (in MB) required for this step.
shared_memory : int, optional
Expand All @@ -33,4 +35,10 @@ class ResourcesDecorator(StepDecorator):
"""

name = "resources"
defaults = {"cpu": "1", "gpu": "0", "memory": "4096", "shared_memory": None}
defaults = {
"cpu": "1",
"gpu": "0",
"disk": None,
"memory": "4096",
"shared_memory": None,
}

0 comments on commit 15cd63f

Please sign in to comment.