Skip to content

Changes in docs for release: v0.12.0 #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions docs/cluster/cluster.html
Original file line number Diff line number Diff line change
@@ -160,6 +160,16 @@ <h1 class="title">Module <code>codeflare_sdk.cluster.cluster</code></h1>
print(f&#34;Priority class {priority_class} is not available in the cluster&#34;)
return None

def validate_image_config(self):
&#34;&#34;&#34;
Validates that the image configuration is not empty.

:param image: The image string to validate
:raises ValueError: If the image is not specified
&#34;&#34;&#34;
if self.config.image == &#34;&#34; or self.config.image == None:
raise ValueError(&#34;Image must be specified in the ClusterConfiguration&#34;)

def create_app_wrapper(self):
&#34;&#34;&#34;
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>
f&#34;Namespace {self.config.namespace} is of type {type(self.config.namespace)}. Check your Kubernetes Authentication.&#34;
)

# Validate image configuration
self.validate_image_config()

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

def validate_image_config(self):
&#34;&#34;&#34;
Validates that the image configuration is not empty.

:param image: The image string to validate
:raises ValueError: If the image is not specified
&#34;&#34;&#34;
if self.config.image == &#34;&#34; or self.config.image == None:
raise ValueError(&#34;Image must be specified in the ClusterConfiguration&#34;)

def create_app_wrapper(self):
&#34;&#34;&#34;
Called upon cluster object creation, creates an AppWrapper yaml based on
@@ -1110,6 +1133,9 @@ <h2 class="section-title" id="header-classes">Classes</h2>
f&#34;Namespace {self.config.namespace} is of type {type(self.config.namespace)}. Check your Kubernetes Authentication.&#34;
)

# Validate image configuration
self.validate_image_config()

# Before attempting to create the cluster AW, let&#39;s evaluate the ClusterConfig
if self.config.dispatch_priority:
if not self.config.mcad:
@@ -1650,6 +1676,9 @@ <h3>Methods</h3>
f&#34;Namespace {self.config.namespace} is of type {type(self.config.namespace)}. Check your Kubernetes Authentication.&#34;
)

# Validate image configuration
self.validate_image_config()

# Before attempting to create the cluster AW, let&#39;s evaluate the ClusterConfig
if self.config.dispatch_priority:
if not self.config.mcad:
@@ -2088,6 +2117,28 @@ <h3>Methods</h3>
return _kube_api_error_handling(e)</code></pre>
</details>
</dd>
<dt id="codeflare_sdk.cluster.cluster.Cluster.validate_image_config"><code class="name flex">
<span>def <span class="ident">validate_image_config</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Validates that the image configuration is not empty.</p>
<p>:param image: The image string to validate
:raises ValueError: If the image is not specified</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def validate_image_config(self):
&#34;&#34;&#34;
Validates that the image configuration is not empty.

:param image: The image string to validate
:raises ValueError: If the image is not specified
&#34;&#34;&#34;
if self.config.image == &#34;&#34; or self.config.image == None:
raise ValueError(&#34;Image must be specified in the ClusterConfiguration&#34;)</code></pre>
</details>
</dd>
<dt id="codeflare_sdk.cluster.cluster.Cluster.wait_ready"><code class="name flex">
<span>def <span class="ident">wait_ready</span></span>(<span>self, timeout: Optional[int] = None, dashboard_check: bool = True)</span>
</code></dt>
@@ -2182,6 +2233,7 @@ <h4><code><a title="codeflare_sdk.cluster.cluster.Cluster" href="#codeflare_sdk.
<li><code><a title="codeflare_sdk.cluster.cluster.Cluster.torchx_config" href="#codeflare_sdk.cluster.cluster.Cluster.torchx_config">torchx_config</a></code></li>
<li><code><a title="codeflare_sdk.cluster.cluster.Cluster.torchx_scheduler" href="#codeflare_sdk.cluster.cluster.Cluster.torchx_scheduler">torchx_scheduler</a></code></li>
<li><code><a title="codeflare_sdk.cluster.cluster.Cluster.up" href="#codeflare_sdk.cluster.cluster.Cluster.up">up</a></code></li>
<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>
<li><code><a title="codeflare_sdk.cluster.cluster.Cluster.wait_ready" href="#codeflare_sdk.cluster.cluster.Cluster.wait_ready">wait_ready</a></code></li>
</ul>
</li>
6 changes: 3 additions & 3 deletions docs/cluster/config.html
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ <h1 class="title">Module <code>codeflare_sdk.cluster.config</code></h1>
instascale: bool = False
mcad: bool = True
envs: dict = field(default_factory=dict)
image: str = &#34;quay.io/project-codeflare/ray:latest-py39-cu118&#34;
image: str = &#34;&#34;
local_interactive: bool = False
image_pull_secrets: list = field(default_factory=list)
dispatch_priority: str = None
@@ -100,7 +100,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="codeflare_sdk.cluster.config.ClusterConfiguration"><code class="flex name class">
<span>class <span class="ident">ClusterConfiguration</span></span>
<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>
<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>
</code></dt>
<dd>
<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>
instascale: bool = False
mcad: bool = True
envs: dict = field(default_factory=dict)
image: str = &#34;quay.io/project-codeflare/ray:latest-py39-cu118&#34;
image: str = &#34;&#34;
local_interactive: bool = False
image_pull_secrets: list = field(default_factory=list)
dispatch_priority: str = None