diff --git a/docs/cluster/cluster.html b/docs/cluster/cluster.html index 59294e774..79916c47e 100644 --- a/docs/cluster/cluster.html +++ b/docs/cluster/cluster.html @@ -95,6 +95,14 @@
codeflare_sdk.cluster.cluster
codeflare_sdk.cluster.cluster
codeflare_sdk.cluster.cluster
-def get_current_namespace() ‑> str
-
Returns the user's current working namespace.
def get_current_namespace() -> str:
- """
- Returns the user's current working namespace.
- """
- try:
- namespace = oc.invoke("project", ["-q"]).actions()[0].out.strip()
- except oc.OpenShiftPythonException as osp: # pragma: no cover
- error_msg = osp.result.err()
- if (
- "do not have rights" in error_msg
- or "Missing or incomplete configuration" in error_msg
- ):
- raise PermissionError(
- "Action not permitted, have you run auth.login() or cluster.up()?"
- )
- else:
- raise osp
- return namespace
-
def list_all_clusters(namespace: str, print_to_console: bool = True)
codeflare_sdk.cluster.config
codeflare_sdk.cluster.config
class ClusterConfiguration
-(name: str, namespace: str = 'default', head_info: list = <factory>, machine_types: list = <factory>, min_cpus: int = 1, max_cpus: int = 1, min_worker: int = 1, max_worker: int = 1, min_memory: int = 2, max_memory: int = 2, gpu: int = 0, template: str = '/home/meyceoz/Documents/codeflare-sdk/src/codeflare_sdk/templates/new-template.yaml', instascale: bool = False, envs: dict = <factory>, image: str = 'ghcr.io/foundation-model-stack/base:ray2.1.0-py38-gpu-pytorch1.12.0cu116-20221213-193103')
+(name: str, namespace: str = None, head_info: list = <factory>, machine_types: list = <factory>, min_cpus: int = 1, max_cpus: int = 1, min_worker: int = 1, max_worker: int = 1, min_memory: int = 2, max_memory: int = 2, gpu: int = 0, template: str = '/home/meyceoz/Documents/codeflare-sdk/src/codeflare_sdk/templates/new-template.yaml', instascale: bool = False, envs: dict = <factory>, image: str = 'ghcr.io/foundation-model-stack/base:ray2.1.0-py38-gpu-pytorch1.12.0cu116-20221213-193103')
This dataclass is used to specify resource requirements and other details, and @@ -108,7 +109,7 @@
codeflare_sdk.job.jobs
codeflare_sdk.job.jobs
codeflare_sdk.job.jobs
codeflare_sdk.job.jobs
codeflare_sdk.job.jobs
class DDPJobDefinition
-(script: Optional[str] = None, m: Optional[str] = None, script_args: Optional[List[str]] = None, name: Optional[str] = None, cpu: Optional[int] = None, gpu: Optional[int] = None, memMB: Optional[int] = None, h: Optional[str] = None, j: Optional[str] = None, env: Optional[Dict[str, str]] = None, max_retries: int = 0, mounts: Optional[List[str]] = None, rdzv_port: int = 29500, scheduler_args: Optional[Dict[str, str]] = None, image: Optional[str] = None)
+(script: Optional[str] = None, m: Optional[str] = None, script_args: Optional[List[str]] = None, name: Optional[str] = None, cpu: Optional[int] = None, gpu: Optional[int] = None, memMB: Optional[int] = None, h: Optional[str] = None, j: Optional[str] = None, env: Optional[Dict[str, str]] = None, max_retries: int = 0, mounts: Optional[List[str]] = None, rdzv_port: int = 29500, rdzv_backend: str = None, scheduler_args: Optional[Dict[str, str]] = None, image: Optional[str] = None, workspace: Optional[str] = 'file:///home/meyceoz/Documents/codeflare-sdk')