Skip to content

Commit cd8bce0

Browse files
dimakisopenshift-merge-bot[bot]
authored andcommitted
Changes in docs for release: v0.12.0
1 parent 7f25549 commit cd8bce0

File tree

2 files changed

+55
-3
lines changed

2 files changed

+55
-3
lines changed

docs/cluster/cluster.html

+52
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,16 @@ <h1 class="title">Module <code>codeflare_sdk.cluster.cluster</code></h1>
160160
print(f&#34;Priority class {priority_class} is not available in the cluster&#34;)
161161
return None
162162

163+
def validate_image_config(self):
164+
&#34;&#34;&#34;
165+
Validates that the image configuration is not empty.
166+
167+
:param image: The image string to validate
168+
:raises ValueError: If the image is not specified
169+
&#34;&#34;&#34;
170+
if self.config.image == &#34;&#34; or self.config.image == None:
171+
raise ValueError(&#34;Image must be specified in the ClusterConfiguration&#34;)
172+
163173
def create_app_wrapper(self):
164174
&#34;&#34;&#34;
165175
Called upon cluster object creation, creates an AppWrapper yaml based on
@@ -175,6 +185,9 @@ <h1 class="title">Module <code>codeflare_sdk.cluster.cluster</code></h1>
175185
f&#34;Namespace {self.config.namespace} is of type {type(self.config.namespace)}. Check your Kubernetes Authentication.&#34;
176186
)
177187

188+
# Validate image configuration
189+
self.validate_image_config()
190+
178191
# Before attempting to create the cluster AW, let&#39;s evaluate the ClusterConfig
179192
if self.config.dispatch_priority:
180193
if not self.config.mcad:
@@ -1095,6 +1108,16 @@ <h2 class="section-title" id="header-classes">Classes</h2>
10951108
print(f&#34;Priority class {priority_class} is not available in the cluster&#34;)
10961109
return None
10971110

1111+
def validate_image_config(self):
1112+
&#34;&#34;&#34;
1113+
Validates that the image configuration is not empty.
1114+
1115+
:param image: The image string to validate
1116+
:raises ValueError: If the image is not specified
1117+
&#34;&#34;&#34;
1118+
if self.config.image == &#34;&#34; or self.config.image == None:
1119+
raise ValueError(&#34;Image must be specified in the ClusterConfiguration&#34;)
1120+
10981121
def create_app_wrapper(self):
10991122
&#34;&#34;&#34;
11001123
Called upon cluster object creation, creates an AppWrapper yaml based on
@@ -1110,6 +1133,9 @@ <h2 class="section-title" id="header-classes">Classes</h2>
11101133
f&#34;Namespace {self.config.namespace} is of type {type(self.config.namespace)}. Check your Kubernetes Authentication.&#34;
11111134
)
11121135

1136+
# Validate image configuration
1137+
self.validate_image_config()
1138+
11131139
# Before attempting to create the cluster AW, let&#39;s evaluate the ClusterConfig
11141140
if self.config.dispatch_priority:
11151141
if not self.config.mcad:
@@ -1650,6 +1676,9 @@ <h3>Methods</h3>
16501676
f&#34;Namespace {self.config.namespace} is of type {type(self.config.namespace)}. Check your Kubernetes Authentication.&#34;
16511677
)
16521678

1679+
# Validate image configuration
1680+
self.validate_image_config()
1681+
16531682
# Before attempting to create the cluster AW, let&#39;s evaluate the ClusterConfig
16541683
if self.config.dispatch_priority:
16551684
if not self.config.mcad:
@@ -2088,6 +2117,28 @@ <h3>Methods</h3>
20882117
return _kube_api_error_handling(e)</code></pre>
20892118
</details>
20902119
</dd>
2120+
<dt id="codeflare_sdk.cluster.cluster.Cluster.validate_image_config"><code class="name flex">
2121+
<span>def <span class="ident">validate_image_config</span></span>(<span>self)</span>
2122+
</code></dt>
2123+
<dd>
2124+
<div class="desc"><p>Validates that the image configuration is not empty.</p>
2125+
<p>:param image: The image string to validate
2126+
:raises ValueError: If the image is not specified</p></div>
2127+
<details class="source">
2128+
<summary>
2129+
<span>Expand source code</span>
2130+
</summary>
2131+
<pre><code class="python">def validate_image_config(self):
2132+
&#34;&#34;&#34;
2133+
Validates that the image configuration is not empty.
2134+
2135+
:param image: The image string to validate
2136+
:raises ValueError: If the image is not specified
2137+
&#34;&#34;&#34;
2138+
if self.config.image == &#34;&#34; or self.config.image == None:
2139+
raise ValueError(&#34;Image must be specified in the ClusterConfiguration&#34;)</code></pre>
2140+
</details>
2141+
</dd>
20912142
<dt id="codeflare_sdk.cluster.cluster.Cluster.wait_ready"><code class="name flex">
20922143
<span>def <span class="ident">wait_ready</span></span>(<span>self, timeout: Optional[int] = None, dashboard_check: bool = True)</span>
20932144
</code></dt>
@@ -2182,6 +2233,7 @@ <h4><code><a title="codeflare_sdk.cluster.cluster.Cluster" href="#codeflare_sdk.
21822233
<li><code><a title="codeflare_sdk.cluster.cluster.Cluster.torchx_config" href="#codeflare_sdk.cluster.cluster.Cluster.torchx_config">torchx_config</a></code></li>
21832234
<li><code><a title="codeflare_sdk.cluster.cluster.Cluster.torchx_scheduler" href="#codeflare_sdk.cluster.cluster.Cluster.torchx_scheduler">torchx_scheduler</a></code></li>
21842235
<li><code><a title="codeflare_sdk.cluster.cluster.Cluster.up" href="#codeflare_sdk.cluster.cluster.Cluster.up">up</a></code></li>
2236+
<li><code><a title="codeflare_sdk.cluster.cluster.Cluster.validate_image_config" href="#codeflare_sdk.cluster.cluster.Cluster.validate_image_config">validate_image_config</a></code></li>
21852237
<li><code><a title="codeflare_sdk.cluster.cluster.Cluster.wait_ready" href="#codeflare_sdk.cluster.cluster.Cluster.wait_ready">wait_ready</a></code></li>
21862238
</ul>
21872239
</li>

docs/cluster/config.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ <h1 class="title">Module <code>codeflare_sdk.cluster.config</code></h1>
8080
instascale: bool = False
8181
mcad: bool = True
8282
envs: dict = field(default_factory=dict)
83-
image: str = &#34;quay.io/project-codeflare/ray:latest-py39-cu118&#34;
83+
image: str = &#34;&#34;
8484
local_interactive: bool = False
8585
image_pull_secrets: list = field(default_factory=list)
8686
dispatch_priority: str = None
@@ -100,7 +100,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
100100
<dl>
101101
<dt id="codeflare_sdk.cluster.config.ClusterConfiguration"><code class="flex name class">
102102
<span>class <span class="ident">ClusterConfiguration</span></span>
103-
<span>(</span><span>name: str, namespace: str = None, head_info: list = &lt;factory&gt;, head_cpus: int = 2, head_memory: int = 8, head_gpus: int = 0, machine_types: list = &lt;factory&gt;, min_cpus: int = 1, max_cpus: int = 1, num_workers: int = 1, min_memory: int = 2, max_memory: int = 2, num_gpus: int = 0, template: str = '/home/runner/work/codeflare-sdk/codeflare-sdk/src/codeflare_sdk/templates/base-template.yaml', instascale: bool = False, mcad: bool = True, envs: dict = &lt;factory&gt;, image: str = 'quay.io/project-codeflare/ray:latest-py39-cu118', local_interactive: bool = False, image_pull_secrets: list = &lt;factory&gt;, dispatch_priority: str = None, openshift_oauth: bool = False, ingress_options: dict = &lt;factory&gt;, ingress_domain: str = None)</span>
103+
<span>(</span><span>name: str, namespace: str = None, head_info: list = &lt;factory&gt;, head_cpus: int = 2, head_memory: int = 8, head_gpus: int = 0, machine_types: list = &lt;factory&gt;, min_cpus: int = 1, max_cpus: int = 1, num_workers: int = 1, min_memory: int = 2, max_memory: int = 2, num_gpus: int = 0, template: str = '/home/runner/work/codeflare-sdk/codeflare-sdk/src/codeflare_sdk/templates/base-template.yaml', instascale: bool = False, mcad: bool = True, envs: dict = &lt;factory&gt;, image: str = '', local_interactive: bool = False, image_pull_secrets: list = &lt;factory&gt;, dispatch_priority: str = None, openshift_oauth: bool = False, ingress_options: dict = &lt;factory&gt;, ingress_domain: str = None)</span>
104104
</code></dt>
105105
<dd>
106106
<div class="desc"><p>This dataclass is used to specify resource requirements and other details, and
@@ -132,7 +132,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
132132
instascale: bool = False
133133
mcad: bool = True
134134
envs: dict = field(default_factory=dict)
135-
image: str = &#34;quay.io/project-codeflare/ray:latest-py39-cu118&#34;
135+
image: str = &#34;&#34;
136136
local_interactive: bool = False
137137
image_pull_secrets: list = field(default_factory=list)
138138
dispatch_priority: str = None

0 commit comments

Comments
 (0)