ads.opctl.backend package#
Submodules#
ads.opctl.backend.ads_dataflow module#
- class ads.opctl.backend.ads_dataflow.DataFlowBackend(config: Dict)[source]#
Bases:
Backend
Initialize a MLJobBackend object given config dictionary.
- Parameters:
config (dict) – dictionary of configurations
- init(uri: str | None = None, overwrite: bool = False, runtime_type: str | None = None, **kwargs: Dict) str | None [source]#
Generates a starter YAML specification for a Data Flow Application.
- Parameters:
overwrite ((bool, optional). Defaults to False.) – Overwrites the result specification YAML if exists.
uri ((str, optional), Defaults to None.) – The filename to save the resulting specification template YAML.
runtime_type ((str, optional). Defaults to None.) – The resource runtime type.
**kwargs (Dict) – The optional arguments.
- Returns:
The YAML specification for the given resource if uri was not provided. None otherwise.
- Return type:
Union[str, None]
- class ads.opctl.backend.ads_dataflow.DataFlowRuntimeFactory[source]#
Bases:
RuntimeFactory
Data Flow runtime factory.
ads.opctl.backend.ads_ml_job module#
- class ads.opctl.backend.ads_ml_job.JobRuntimeFactory[source]#
Bases:
RuntimeFactory
Job runtime factory.
- class ads.opctl.backend.ads_ml_job.MLJobBackend(config: Dict)[source]#
Bases:
Backend
Initialize a MLJobBackend object given config dictionary.
- Parameters:
config (dict) – dictionary of configurations
- init(uri: str | None = None, overwrite: bool = False, runtime_type: str | None = None, **kwargs: Dict) str | None [source]#
Generates a starter YAML specification for a Data Science Job.
- Parameters:
overwrite ((bool, optional). Defaults to False.) – Overwrites the result specification YAML if exists.
uri ((str, optional), Defaults to None.) – The filename to save the resulting specification template YAML.
runtime_type ((str, optional). Defaults to None.) – The resource runtime type.
**kwargs (Dict) – The optional arguments.
- Returns:
The YAML specification for the given resource if uri was not provided. None otherwise.
- Return type:
Union[str, None]
- class ads.opctl.backend.ads_ml_job.MLJobDistributedBackend(config: Dict)[source]#
Bases:
MLJobBackend
Initialize a MLJobDistributedBackend object given config dictionary.
- Parameters:
config (dict) – dictionary of configurations
- DIAGNOSTIC_COMMAND = 'python -m ads.opctl.diagnostics -t distributed'#
- run(cluster_info, dry_run=False) None [source]#
Creates Job Definition and starts main and worker jobruns from that job definition
The Job Definition will contain all the environment variables defined at the cluster/spec/config level, environment variables defined by the user at runtime/spec/env level and OCI__ derived from the yaml specification
The Job Run will have overrides provided by the user under cluster/spec/{main|worker}/config section and `OCI__MODE`={MASTER|WORKER} depending on the run type
ads.opctl.backend.ads_ml_pipeline module#
- class ads.opctl.backend.ads_ml_pipeline.PipelineBackend(config: Dict)[source]#
Bases:
Backend
Initialize a MLPipeline object given config dictionary.
- Parameters:
config (dict) – dictionary of configurations
- init(uri: str | None = None, overwrite: bool = False, runtime_type: str | None = None, **kwargs: Dict) str | None [source]#
Generates a starter YAML specification for an MLPipeline.
- Parameters:
overwrite ((bool, optional). Defaults to False.) – Overwrites the result specification YAML if exists.
uri ((str, optional), Defaults to None.) – The filename to save the resulting specification template YAML.
runtime_type ((str, optional). Defaults to None.) – The resource runtime type.
**kwargs (Dict) – The optional arguments.
- Returns:
The YAML specification for the given resource if uri was not provided. None otherwise.
- Return type:
Union[str, None]
ads.opctl.backend.base module#
- class ads.opctl.backend.base.Backend(config: Dict)[source]#
Bases:
object
Interface for backend