ads.opctl package¶
Subpackages¶
- ads.opctl.backend package
- Submodules
- ads.opctl.backend.ads_dataflow module
- ads.opctl.backend.ads_ml_job module
- ads.opctl.backend.ads_ml_pipeline module
- ads.opctl.backend.base module
- ads.opctl.backend.local module
- Module contents
- ads.opctl.conda package
- ads.opctl.config package
- ads.opctl.diagnostics package
- ads.opctl.distributed package
- Subpackages
- ads.opctl.distributed.common package
- Submodules
- ads.opctl.distributed.common.abstract_cluster_provider module
- ads.opctl.distributed.common.abstract_framework_spec_builder module
- ads.opctl.distributed.common.cluster_config_helper module
- ads.opctl.distributed.common.cluster_provider_factory module
- ads.opctl.distributed.common.cluster_runner module
- ads.opctl.distributed.common.framework_factory module
- Module contents
- ads.opctl.distributed.common package
- Submodules
- ads.opctl.distributed.certificates module
- ads.opctl.distributed.cli module
- ads.opctl.distributed.cmds module
cancel_distributed_run()
dask_cmd()
dev_mode_base_uri()
docker_build_cmd()
get_cmd()
horovod_cmd()
increment_tag()
increment_tag_in_ini()
initialize_workspace()
load_ini()
local_run()
production_mode_base_uri()
pytorch_cmd()
refresh_ini()
run_cmd()
show_config_info()
tensorflow_cmd()
update_config_image()
update_image()
update_ini()
verify_and_publish_image()
verify_image()
- Module contents
- Subpackages
- ads.opctl.spark package
Submodules¶
ads.opctl.cli module¶
ads.opctl.cmds module¶
- class ads.opctl.cmds.DataScienceResource[source]¶
Bases:
str
- DATAFLOW = 'dataflowapplication'¶
- JOB = 'datasciencejob'¶
- MODEL = 'datasciencemodel'¶
- MODEL_DEPLOYMENT = 'datasciencemodeldeployment'¶
- PIPELINE = 'datasciencepipeline'¶
- class ads.opctl.cmds.DataScienceResourceRun[source]¶
Bases:
str
- DATAFLOW_RUN = 'dataflowrun'¶
- JOB_RUN = 'datasciencejobrun'¶
- MODEL_DEPLOYMENT = 'datasciencemodeldeployment'¶
- PIPELINE_RUN = 'datasciencepipelinerun'¶
- ads.opctl.cmds.activate(**kwargs) None [source]¶
Activate a ModelDeployment.
- Parameters:
kwargs (dict) – keyword argument, stores command line args
- Return type:
None
- ads.opctl.cmds.cancel(**kwargs) None [source]¶
Cancel a MLJob/DataFlow run.
- Parameters:
kwargs (dict) – keyword argument, stores command line args
- Return type:
None
- ads.opctl.cmds.configure() None [source]¶
Save default configurations for opctl.
- Parameters:
ml_job (bool) – turn on/off saving configurations for ML Job
- Return type:
None
- ads.opctl.cmds.deactivate(**kwargs) None [source]¶
Deactivate a ModelDeployment.
- Parameters:
kwargs (dict) – keyword argument, stores command line args
- Return type:
None
- ads.opctl.cmds.delete(**kwargs) None [source]¶
Delete a MLJob/DataFlow run.
- Parameters:
kwargs (dict) – keyword argument, stores command line args
- Return type:
None
- ads.opctl.cmds.init(resource_type: str, runtime_type: str | None = None, output: str | None = None, overwrite: bool = False, ads_config: str = '~/.ads_ops', **kwargs) str | None [source]¶
Generates a starter specification template YAML for the Data Science resource.
- Parameters:
resource_type (str) – The resource type to generate the specification YAML.
runtime_type ((str, optional). Defaults to None.) – The resource runtime type.
output ((str, optional). Defaults to None.) – The path to the file to save the resulting specification template YAML.
overwrite ((bool, optional). Defaults to False.) – Whether to overwrite the result specification YAML if exists.
ads_config ((str, optional)) – The folder where the ads opctl config located.
kwargs ((Dict, optional).) – Any optional kwargs arguments.
- Returns:
The YAML specification for the given resource if output was not provided, path to the specification otherwise.
- Return type:
Union[str, None]
- Raises:
ValueError – If resource_type not specified.
- ads.opctl.cmds.init_vscode(**kwargs) None [source]¶
Create a .devcontainer.json file for local development.
- Parameters:
kwargs – keyword arguments, stores command line args
- Return type:
None
- ads.opctl.cmds.predict(**kwargs) None [source]¶
Make prediction using the model with the payload.
- Parameters:
kwargs (dict) – keyword argument, stores command line args
- Return type:
None
- ads.opctl.cmds.run(config: Dict, **kwargs) Dict [source]¶
Run a job given configuration and command line args passed in (kwargs).
ads.opctl.constants module¶
- class ads.opctl.constants.BACKEND_NAME(value)[source]¶
Bases:
ExtendedEnum
An enumeration.
- DATAFLOW = 'dataflow'¶
- JOB = 'job'¶
- LOCAL = 'local'¶
- MARKETPLACE = 'marketplace'¶
- MODEL_DEPLOYMENT = 'deployment'¶
- OPERATOR_LOCAL = 'operator.local'¶
- PIPELINE = 'pipeline'¶
- class ads.opctl.constants.RESOURCE_TYPE(value)[source]¶
Bases:
ExtendedEnum
An enumeration.
- DATAFLOW = 'dataflow'¶
- JOB = 'job'¶
- MARKETPLACE = 'marketplace'¶
- MODEL_DEPLOYMENT = 'deployment'¶
- OPERATOR = 'operator'¶
- PIPELINE = 'pipeline'¶
- class ads.opctl.constants.RUNTIME_TYPE(value)[source]¶
Bases:
ExtendedEnum
An enumeration.
- CONDA = 'conda'¶
- CONTAINER = 'container'¶
- DATAFLOW = 'dataFlow'¶
- DATAFLOWNOTEBOOK = 'dataFlowNotebook'¶
- GITPYTHON = 'gitPython'¶
- NOTEBOOK = 'notebook'¶
- OPERATOR = 'operator'¶
- PYTHON = 'python'¶
- SCRIPT = 'script'¶
ads.opctl.utils module¶
- ads.opctl.utils.build_image(image_type: str, gpu: bool = False) None [source]¶
Build an image for opctl.
- ads.opctl.utils.publish_image(image: str, registry: str | None = None) None [source]¶
Publish an image.
- ads.opctl.utils.run_command(cmd: str | List[str], cwd: str | None = None, shell: bool = False) Popen [source]¶