Skip to content

Commit de41cf9

Browse files
committed
Updated unit tests
1 parent 0585f1b commit de41cf9

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/codeflare_sdk/templates/base-template.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@ spec:
135135
command: ["/bin/sh","-c","ray stop"]
136136
resources:
137137
limits:
138-
cpu: "2"
138+
cpu: 2
139139
memory: "8G"
140-
nvidia.com/gpu: "0"
140+
nvidia.com/gpu: 0
141141
requests:
142-
cpu: "2"
142+
cpu: 2
143143
memory: "8G"
144-
nvidia.com/gpu: "0"
144+
nvidia.com/gpu: 0
145145
workerGroupSpecs:
146146
# the pod replicas in this group typed worker
147147
- replicas: 3

tests/test-case-cmd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ spec:
8888
cpu: 2
8989
memory: 8G
9090
nvidia.com/gpu: 0
91-
rayVersion: 1.12.0
91+
rayVersion: 2.1.0
9292
workerGroupSpecs:
9393
- groupName: small-group-unit-cmd-cluster
9494
maxReplicas: 2

tests/test-case.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ spec:
9999
cpu: 2
100100
memory: 8G
101101
nvidia.com/gpu: 0
102-
rayVersion: 1.12.0
102+
rayVersion: 2.1.0
103103
workerGroupSpecs:
104104
- groupName: small-group-unit-test-cluster
105105
maxReplicas: 2

tests/unit_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def test_config_creation():
224224
config.image
225225
== "ghcr.io/foundation-model-stack/base:ray2.1.0-py38-gpu-pytorch1.12.0cu116-20221213-193103"
226226
)
227-
assert config.template == f"{parent}/src/codeflare_sdk/templates/new-template.yaml"
227+
assert config.template == f"{parent}/src/codeflare_sdk/templates/base-template.yaml"
228228
assert config.instascale
229229
assert config.machine_types == ["cpu.small", "gpu.large"]
230230
return config
@@ -1983,7 +1983,7 @@ def test_AWManager_submit_remove(mocker, capsys):
19831983
# Make sure to keep this function and the following function at the end of the file
19841984
def test_cmd_line_generation():
19851985
os.system(
1986-
f"python3 {parent}/src/codeflare_sdk/utils/generate_yaml.py --name=unit-cmd-cluster --min-cpu=1 --max-cpu=1 --min-memory=2 --max-memory=2 --gpu=1 --workers=2 --template=src/codeflare_sdk/templates/new-template.yaml"
1986+
f"python3 {parent}/src/codeflare_sdk/utils/generate_yaml.py --name=unit-cmd-cluster --min-cpu=1 --max-cpu=1 --min-memory=2 --max-memory=2 --gpu=1 --workers=2 --template=src/codeflare_sdk/templates/base-template.yaml"
19871987
)
19881988
assert filecmp.cmp(
19891989
"unit-cmd-cluster.yaml", f"{parent}/tests/test-case-cmd.yaml", shallow=True

0 commit comments

Comments
 (0)