From f26133094af2986db2527fd07ca2970e678ef348 Mon Sep 17 00:00:00 2001 From: Alexander Zhipa Date: Wed, 27 Nov 2024 10:08:38 -0500 Subject: [PATCH] feat: add aws_c5_18xlarge --- torchx/specs/named_resources_aws.py | 5 +++++ torchx/specs/test/named_resources_aws_test.py | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/torchx/specs/named_resources_aws.py b/torchx/specs/named_resources_aws.py index 555513a06..4f78af059 100644 --- a/torchx/specs/named_resources_aws.py +++ b/torchx/specs/named_resources_aws.py @@ -129,6 +129,10 @@ def aws_m5_2xlarge() -> Resource: cpu=8, gpu=0, memMB=32 * GiB, capabilities={K8S_ITYPE: "m5.2xlarge"} ) +def aws_c5_18xlarge() -> Resource: + return Resource( + cpu=72, gpu=0, memMB=144 * GiB, capabilities={K8S_ITYPE: "c5.18xlarge"} + ) def aws_g4dn_xlarge() -> Resource: return Resource( @@ -351,6 +355,7 @@ def aws_trn1_32xlarge() -> Resource: NAMED_RESOURCES: Mapping[str, Callable[[], Resource]] = { "aws_t3.medium": aws_t3_medium, "aws_m5.2xlarge": aws_m5_2xlarge, + "aws_c5.18xlarge": aws_c5_18xlarge, "aws_p3.2xlarge": aws_p3_2xlarge, "aws_p3.8xlarge": aws_p3_8xlarge, "aws_p3.16xlarge": aws_p3_16xlarge, diff --git a/torchx/specs/test/named_resources_aws_test.py b/torchx/specs/test/named_resources_aws_test.py index 3480fa463..800675fe3 100644 --- a/torchx/specs/test/named_resources_aws_test.py +++ b/torchx/specs/test/named_resources_aws_test.py @@ -32,6 +32,7 @@ aws_g6e_8xlarge, aws_g6e_xlarge, aws_m5_2xlarge, + aws_c5_18xlarge, aws_p3_16xlarge, aws_p3_2xlarge, aws_p3_8xlarge, @@ -237,6 +238,12 @@ def test_aws_m5_2xlarge(self) -> None: self.assertEqual(0, resource.gpu) self.assertEqual(32 * GiB, resource.memMB) + def test_aws_c5_18xlarge(self) -> None: + resource = aws_c5_18xlarge() + self.assertEqual(72, resource.cpu) + self.assertEqual(0, resource.gpu) + self.assertEqual(144 * GiB, resource.memMB) + def test_aws_t3_medium(self) -> None: resource = aws_t3_medium() self.assertEqual(2, resource.cpu)