ads.opctl.distributed package

Subpackages

Submodules

ads.opctl.distributed.certificates module

ads.opctl.distributed.certificates.download_certificates(auth, ca_file_name, cert_file_name, key_file_name)[source]

ads.opctl.distributed.cli module

ads.opctl.distributed.cmds module

ads.opctl.distributed.cmds.cancel_distributed_run(job_id, cluster_file_name, **kwargs)[source]
ads.opctl.distributed.cmds.dask_cmd(code_mount, oci_key_mount, config)[source]

CLI command to run Dask distributed framework on local

Parameters:
  • code_mount – source_folder to be mounted

  • oci_key_mount – oci keys to be mounted

  • config – Job config

  • Returns – List: CLI command

  • -------

ads.opctl.distributed.cmds.dev_mode_base_uri(cluster_type, version)[source]

Temporary method to mock initialization using bucket.

ads.opctl.distributed.cmds.docker_build_cmd(ini)[source]

Builds the docker image

Parameters:
  • ini – config.ini file dictionary

  • Returns – None

  • -------

ads.opctl.distributed.cmds.get_cmd(ini)[source]

Docker build command

Parameters:
  • ini – config.ini file dictionary

  • Returns – Docker build command

  • -------

ads.opctl.distributed.cmds.horovod_cmd(code_mount, oci_key_mount, config)[source]

CLI command to run horovod distributed framework on local

Parameters:
  • code_mount – source_folder to be mounted

  • oci_key_mount – oci keys to be mounted

  • config – Job config

  • Returns – List: CLI command

  • -------

ads.opctl.distributed.cmds.increment_tag(ini)[source]

Increments the tag of the image

Parameters:
  • ini – config.ini file dictionary

  • Returns – updated ini dict

  • -------

ads.opctl.distributed.cmds.increment_tag_in_ini(ini)[source]

increments tag of image and update latest in config.ini file

Parameters:
  • ini – config.ini file dictionary

  • Returns – updated config.ini file

  • -------

ads.opctl.distributed.cmds.initialize_workspace(cluster_type, version)[source]
ads.opctl.distributed.cmds.load_ini()[source]

Loads config.ini from local in dict Returns

None


ads.opctl.distributed.cmds.local_run(config, ini)[source]

Local run distributed framework on local based on input args

Parameters:
  • ini – config.ini file dictionary

  • config – Job run config

  • Returns – None

  • -------

ads.opctl.distributed.cmds.production_mode_base_uri(cluster_type, version)[source]
ads.opctl.distributed.cmds.pytorch_cmd(code_mount, oci_key_mount, config)[source]

CLI command to run Pytorch distributed framework on local

Parameters:
  • code_mount – source_folder to be mounted

  • oci_key_mount – oci keys to be mounted

  • config – Job config

  • Returns – List: CLI command

  • -------

ads.opctl.distributed.cmds.refresh_ini(ini, ini_file)[source]

write updated config.ini in local

Parameters:
  • ini – config.ini file dictionary

  • ini_file – Name of the config file

ads.opctl.distributed.cmds.run_cmd(cmd)[source]

Run cli command :param cmd: input cli command :param Returns: None :param ——-:

ads.opctl.distributed.cmds.show_config_info(job_id, work_dir, cluster_file_name, worker_info, **kwargs)[source]
ads.opctl.distributed.cmds.tensorflow_cmd(code_mount, oci_key_mount, config)[source]

CLI command to run Tensorflow distributed framework on local

Parameters:
  • code_mount – source_folder to be mounted

  • oci_key_mount – oci keys to be mounted

  • config – Job config

  • Returns – List: CLI command

  • -------

ads.opctl.distributed.cmds.update_config_image(config)[source]

updates image name in config

Parameters:
  • config – Job config

  • Returns – updated config dict

  • -------

ads.opctl.distributed.cmds.update_image(config, ini)[source]

Update Image name in job config with latest build image

Parameters:
  • config – Job run config

  • ini – config.ini file dictionary

  • Returns – Updated Job run config

  • -------

ads.opctl.distributed.cmds.update_ini(tag, registry, dockerfile, source_folder, config, nobuild)[source]

Stores and updates input args in config.ini in Local

Parameters:
  • tag – tag of image

  • registry – registry to push to

  • dockerfile – relative path to Dockerfile

  • source_folder – source scripts folder that will be mounted during a local run

  • config – Job config

  • nobuild – flag for building the docker

  • Returns – dict of config.ini file

  • -------

ads.opctl.distributed.cmds.verify_and_publish_image(nopush, config)[source]

verify existence of docker image in OCI registry and publish it :param nopush: Doesn’t push image to OCI registry :param config: Job run config :param Returns: None :param ——-:

ads.opctl.distributed.cmds.verify_image(img_name)[source]

Verify if the input image exists in OCI registry

Parameters:
  • img_name – Name of the docker image

  • Returns – None

  • -------

Module contents