Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding 'disk' parameter to @resources decorator #1500

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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):
"""
saikonen marked this conversation as resolved.
Show resolved Hide resolved

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

@saikonen saikonen Aug 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1504 opened for this, the shared_memory is not yet supported for Kubernetes.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://outerbounds-community.slack.com/archives/C020U025QJK/p1691751137791999 earlier discussions with context on why disk has been missing.

}