docstr: Save model
  Args:
      model_path:
docstr_tok: ["Save","model","Args",":","model_path",":"]
code: def save(self, model_path: str) -> str:
      """
      Save model
      Args:
          model_path:
      """
      pathlib.Path(model_path).mkdir(exist_ok=True, parents=True)
      model_path = os.path.abspath(model_path)
  
      with open(
          os.path.join(model_path, "model_config.json"), "w"
      ) as f:
          f.write(
              json.dumps(self.to_dict(), indent=2, ensure_ascii=False)
          )
          f.close()
  
      self.encoder_embedding.embed_model.save_weights(
          os.path.join(model_path, "encoder_embed_weights.h5")
      )
      self.decoder_embedding.embed_model.save_weights(
          os.path.join(model_path, "decoder_embed_weights.h5")
      )
      self.encoder.save_weights(
          os.path.join(model_path, "encoder_weights.h5")
      )
      self.decoder.save_weights(
          os.path.join(model_path, "decoder_weights.h5")
      )
      logger.info(
          "model saved to {}".format(os.path.abspath(model_path))
      )
      return model_path
  
imports: import json
  import os
  import pathlib
  from typing import Any, Tuple, List, Dict
  import numpy
  import tensorflow
  import tqdm
  import kashgari
  from kashgari.embeddings import BareEmbedding
  from kashgari.embeddings.abc_embedding import ABCEmbedding
  from kashgari.generators import CorpusGenerator, Seq2SeqDataSet
  from kashgari.logger import logger
  from kashgari.processors import SequenceProcessor
  from kashgari.tasks.seq2seq.decoder import AttGRUDecoder
  from kashgari.tasks.seq2seq.encoder import GRUEncoder
  from kashgari.types import TextSamplesVar
label_desc: Use image node_id 9 for calling the Seq2Seq obj's underlying member method code with example usage: obj.save(model_path) and returns: model_path