gentle-night-59824
03/24/2025, 3:10 PMrequests
and limits
, we can just specify an instance type for a task? maybe also a proportion to select like half of an instance for examplegentle-night-59824
03/24/2025, 3:14 PM@dataclass
class Resources(DataClassJSONMixin):
name: str
cpu: int
mem: int
gpu: Optional[int] = None
ephemeral_storage: int = field(default=1000)
with some presets e.g.
M5D_XLARGE: Resources = Resources(
name="m5d.xlarge", cpu=3900, mem=14162, gpu=None, ephemeral_storage=1000
)
and the class implements __truediv__
so can be dividedgentle-night-59824
03/24/2025, 3:17 PM@task(requests=DEFAULT.flyte_resource)
which is okay but it would be nicer if this was baked into flytekit to abstract out requests
, limits
and maybe even pod_template
- then, we can specify some instance type resources to come with a node selector/toleration like flyte natively does for gpusaverage-finland-92144
03/25/2025, 3:30 PMgentle-night-59824
03/25/2025, 3:33 PMclass Resources
and it could be up to users to define the list of instance types they want to supportgentle-night-59824
03/25/2025, 3:34 PMgentle-night-59824
03/25/2025, 3:35 PM@task
, and essentially will fill out the requests
, limits
and pod_template
for the usergentle-night-59824
03/25/2025, 3:36 PMwith_overrides
to think aboutgentle-night-59824
03/25/2025, 3:36 PMgentle-night-59824
03/26/2025, 2:10 PM