ads.opctl package#

Subpackages#

Submodules#

ads.opctl.cli module#

ads.opctl.cmds module#

ads.opctl.constants module#

class ads.opctl.constants.BACKEND_NAME(value)[source]#

Bases: ExtendedEnum

An enumeration.

DATAFLOW = 'dataflow'#
JOB = 'job'#
LOCAL = 'local'#
MODEL_DEPLOYMENT = 'deployment'#
PIPELINE = 'pipeline'#
class ads.opctl.constants.RESOURCE_TYPE(value)[source]#

Bases: ExtendedEnum

An enumeration.

DATAFLOW = 'dataflow'#
JOB = 'job'#
MODEL_DEPLOYMENT = 'deployment'#
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, source_folder: str | None = None, dst_image: str | None = None) None[source]#

Build an image for opctl.

Parameters:
  • image_type (str) – specify the image to build, can take ‘job-local’ or ‘ads-ops-base’, former for running job with conda pack locally, latter for running operators

  • gpu (bool) – whether to use gpu version of image

  • source_folder (str) – source folder when building custom operator, to be included in custom image

  • dst_image (str) – image to save as when building custom operator

Return type:

None

ads.opctl.utils.get_docker_client() docker.client.DockerClient[source]#
ads.opctl.utils.get_namespace(auth: dict) str[source]#
ads.opctl.utils.get_oci_region(auth: dict) str[source]#
ads.opctl.utils.get_region_key(auth: dict) str[source]#
ads.opctl.utils.get_service_pack_prefix() Dict[source]#
ads.opctl.utils.is_in_notebook_session()[source]#
ads.opctl.utils.list_ads_operators() dict[source]#
ads.opctl.utils.parse_conda_uri(uri: str) Tuple[str, str, str, str][source]#
ads.opctl.utils.publish_image(image: str, registry: str | None = None) None[source]#

Publish an image.

Parameters:
  • image (str) – image name

  • registry (str) – registry to push to

Return type:

None

ads.opctl.utils.run_command(cmd: str | List[str], cwd: str | None = None, shell: bool = False) Popen[source]#
ads.opctl.utils.run_container(image: str, bind_volumes: Dict, env_vars: Dict, command: str = None, entrypoint: str = None, verbose: bool = False)[source]#
ads.opctl.utils.suppress_traceback(debug: bool = True) None[source]#

Decorator to suppress traceback when in debug mode.

Parameters:

debug (bool) – turn on debug mode or not

Return type:

None

Module contents#

ads.opctl.set_log_level(level)[source]#