Skip to content

Commit cf570a3

Browse files
committed
fix
Signed-off-by: Hemil Desai <[email protected]>
1 parent 0cb7da2 commit cf570a3

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/run/ray/test_kuberay.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -197,14 +197,14 @@ def test_create_basic_cluster(self, cluster_with_basic_executor, mock_k8s_client
197197
mock_api, _ = mock_k8s_clients
198198

199199
# Create expected body from artifact
200-
artifact_path = os.path.join(ARTIFACTS_DIR, "expected_kuberay_cluster_basic.yaml")
200+
os.path.join(ARTIFACTS_DIR, "expected_kuberay_cluster_basic.yaml")
201201

202202
# Mock the API response
203203
mock_api.create_namespaced_custom_object.return_value = {
204204
"metadata": {"name": "test-cluster"}
205205
}
206206

207-
result = cluster_with_basic_executor.create()
207+
cluster_with_basic_executor.create()
208208

209209
# Verify API was called
210210
assert mock_api.create_namespaced_custom_object.called
@@ -229,7 +229,7 @@ def test_create_advanced_cluster(self, cluster_with_advanced_executor, mock_k8s_
229229

230230
# Add pre-ray-start commands
231231
pre_commands = ["export PYTHONPATH=/app", "pip install -r requirements.txt"]
232-
result = cluster_with_advanced_executor.create(pre_ray_start_commands=pre_commands)
232+
cluster_with_advanced_executor.create(pre_ray_start_commands=pre_commands)
233233

234234
# Verify API was called
235235
assert mock_api.create_namespaced_custom_object.called
@@ -495,7 +495,7 @@ def test_start_basic_job(self, job_with_basic_executor, mock_k8s_clients):
495495
"""Test starting a basic Ray job."""
496496
mock_api, _ = mock_k8s_clients
497497

498-
result = job_with_basic_executor.start(
498+
job_with_basic_executor.start(
499499
command="python train.py",
500500
workdir=None,
501501
)
@@ -529,7 +529,7 @@ def test_start_job_with_workdir(self, job_with_basic_executor, mock_k8s_clients)
529529
with patch("nemo_run.core.execution.kuberay.subprocess.check_call") as mock_check_call:
530530
mock_check_call.return_value = None
531531

532-
result = job_with_basic_executor.start(
532+
job_with_basic_executor.start(
533533
command="python train.py",
534534
workdir="/local/path",
535535
)
@@ -553,7 +553,7 @@ def test_start_job_with_runtime_env(self, job_with_basic_executor, mock_k8s_clie
553553
"""
554554

555555
with patch("os.path.isfile", return_value=False): # Treat as string, not file
556-
result = job_with_basic_executor.start(
556+
job_with_basic_executor.start(
557557
command="python train.py",
558558
runtime_env_yaml=runtime_env,
559559
)
@@ -871,7 +871,7 @@ def test_populate_ray_head_without_dashboard_host(self):
871871
cluster = populate_meta({}, "test-cluster", "default", {}, "2.43.0")
872872
ray_start_params = {}
873873

874-
result = populate_ray_head(
874+
populate_ray_head(
875875
cluster,
876876
ray_image="rayproject/ray:2.43.0",
877877
service_type="ClusterIP",
@@ -1114,7 +1114,7 @@ def test_kuberay_executor_post_init_volume_reuse(self):
11141114

11151115
worker_group = KubeRayWorkerGroup(group_name="workers")
11161116

1117-
executor = KubeRayExecutor(
1117+
KubeRayExecutor(
11181118
volumes=volumes,
11191119
volume_mounts=volume_mounts,
11201120
worker_groups=[worker_group],
@@ -1693,7 +1693,7 @@ def mock_is_set():
16931693
mock_event_class.return_value = mock_stop_event
16941694

16951695
with patch("time.sleep"):
1696-
thread = cluster_with_basic_executor.port_forward(
1696+
cluster_with_basic_executor.port_forward(
16971697
port=8080, target_port=8265, wait=True
16981698
)
16991699

@@ -2111,7 +2111,7 @@ def test_cluster_create_without_lifecycle_kwargs(self, mock_k8s_clients):
21112111
"metadata": {"name": "test-cluster"}
21122112
}
21132113

2114-
result = cluster.create(pre_ray_start_commands=["echo test"])
2114+
cluster.create(pre_ray_start_commands=["echo test"])
21152115

21162116
# Should create lifecycle_kwargs and succeed
21172117
assert hasattr(executor, "lifecycle_kwargs")

0 commit comments

Comments
 (0)