class_docstr: Elastic Container Registry class.
docstr: Create an Elastic Container Registry from a config.
  
  Arguments:
      config (dict): The config.
  
  Returns:
      ElasticContainerRegistry: The Elastic Container Registry.
docstr_tok: ["Create","an","Elastic","Container","Registry","from","a","config",".","Arguments",":","config","(","dict",")",":","The","config",".","Returns",":","ElasticContainerRegistry",":","The","Elastic","Container","Registry","."]
code: def from_config(
      cls,
      config: Dict[str, str],
  ) -> "ElasticContainerRegistry":
      """Create an Elastic Container Registry from a config.
  
      Arguments:
          config (dict): The config.
  
      Returns:
          ElasticContainerRegistry: The Elastic Container Registry.
      """
      # TODO: Replace this with pydantic.
      acceptable_keys = {
          "uri",
          "type",
          "account_id",
          "region",
          "repo_name",
      }
      unsupported_keys = set(config.keys()) - acceptable_keys
      if unsupported_keys:
          raise LaunchError(
              f"The Elastic Container Registry config contains unsupported keys: "
              f"{unsupported_keys}. Please remove these keys. The acceptable "
              f"keys are: {acceptable_keys}."
          )
      return cls(
          uri=config.get("uri"),
          account_id=config.get("account_id"),
          region=config.get("region"),
          repo_name=config.get("repository"),
      )
  
file_path: wandb/wandb/sdk/launch/registry/elastic_container_registry.py
imports: import base64
  import logging
  from typing import Dict, Optional, Tuple
  from wandb.sdk.launch.errors import LaunchError
  from wandb.sdk.launch.registry.abstract import AbstractRegistry
  from wandb.sdk.launch.utils import ELASTIC_CONTAINER_REGISTRY_URI_REGEX, event_loop_thread_exec
  from wandb.util import get_module
label_desc: Use image node_id 2 for calling the ElasticContainerRegistry obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: cls