class_docstr: Store models in cloud and fetch them when needed.
class_docstr_tok: ["Store","models","in","cloud","and","fetch","them","when","needed","."]
docstr: Uploads a model persisted in the `target_dir` to cloud storage.
docstr_tok: ["Uploads","a","model","persisted","in","the","`","target_dir","`","to","cloud","storage","."]
code: def persist(self, model_directory: Text, model_name: Text) -> None:
      """Uploads a model persisted in the `target_dir` to cloud storage."""
      if not os.path.isdir(model_directory):
          raise ValueError(
              f"Target directory '{model_directory}' not found."
          )
  
      file_key, tar_path = self._compress(model_directory, model_name)
      self._persist_tar(file_key, tar_path)
  
imports: import abc
  import logging
  import os
  import shutil
  from typing import Optional, Text, Tuple, TYPE_CHECKING
  import rasa.shared.utils.common
  import rasa.utils.common
label_desc: Use image node_id 1 for calling the Persistor obj's underlying member method code with example usage: obj.persist(model_directory, model_name) without return types