Skip to content

Commit 6fdeb3e

Browse files
Ygnasopenshift-merge-bot[bot]
authored andcommitted
Add entrypoint_memory parameter in Ray Job Submission Client
1 parent 29efd33 commit 6fdeb3e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/codeflare_sdk/job/ray_jobs.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
The ray_jobs sub-module contains methods needed to submit jobs and connect to Ray Clusters that were not created by CodeFlare.
1717
The SDK acts as a wrapper for the Ray Job Submission Client.
1818
"""
19+
1920
from ray.job_submission import JobSubmissionClient
2021
from ray.dashboard.modules.job.pydantic_models import JobDetails
2122
from typing import Iterator, Optional, Dict, Any, Union, List
@@ -62,6 +63,7 @@ def submit_job(
6263
submission_id: Optional[str] = None,
6364
entrypoint_num_cpus: Optional[Union[int, float]] = None,
6465
entrypoint_num_gpus: Optional[Union[int, float]] = None,
66+
entrypoint_memory: Optional[int] = None,
6567
entrypoint_resources: Optional[Dict[str, float]] = None,
6668
) -> str:
6769
"""
@@ -75,6 +77,7 @@ def submit_job(
7577
job_id -- DEPRECATED. This has been renamed to submission_id
7678
entrypoint_num_cpus -- The quantity of CPU cores to reserve for the execution of the entrypoint command, separately from any tasks or actors launched by it. Defaults to 0.
7779
entrypoint_num_gpus -- The quantity of GPUs to reserve for the execution of the entrypoint command, separately from any tasks or actors launched by it. Defaults to 0.
80+
entrypoint_memory –- The quantity of memory to reserve for the execution of the entrypoint command, separately from any tasks or actors launched by it. Defaults to 0.
7881
entrypoint_resources -- The quantity of custom resources to reserve for the execution of the entrypoint command, separately from any tasks or actors launched by it.
7982
"""
8083
return self.rayJobClient.submit_job(
@@ -85,6 +88,7 @@ def submit_job(
8588
submission_id=submission_id,
8689
entrypoint_num_cpus=entrypoint_num_cpus,
8790
entrypoint_num_gpus=entrypoint_num_gpus,
91+
entrypoint_memory=entrypoint_memory,
8892
entrypoint_resources=entrypoint_resources,
8993
)
9094

tests/unit_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2724,6 +2724,7 @@ def test_rjc_submit_job(ray_job_client, mocker):
27242724
submission_id=None,
27252725
entrypoint_num_cpus=None,
27262726
entrypoint_num_gpus=None,
2727+
entrypoint_memory=None,
27272728
entrypoint_resources=None,
27282729
)
27292730

0 commit comments

Comments
 (0)