parameters: (cls, model_dir, **args)
return_statement: return {
              "model_name"+"_"+cls.name: model_name
          }
docstring: save pickle model
          Args:
              model_dir: model dir
              model_name: model name
  
          Returns: saved json
docstring_summary: save pickle model
          Args:
              model_dir: model dir
              model_name: model name
docstring_tokens: save pickle model Args : model_dir : model dir model_name : model name
function: def persist(cls, model_dir, **args):
          """
          save pickle model
          Args:
              model_dir: model dir
              model_name: model name
  
          Returns: saved json
  
          """
          # type: (Text) -> Dict[Text, Any]
          """Persist this model into the passed directory. Returns the metadata necessary to load the model again."""
          import cloudpickle
          model_name = str(args["model_version"]) + "_" + cls.name + ".pickle"
          classifier_file = os.path.join(model_dir, model_name)
          with io.open(classifier_file, 'wb') as f:
              cloudpickle.dump(cls, f)
          return {
              "model_name"+"_"+cls.name: model_name
          }
function_tokens: def persist ( cls , model_dir , * * args ) : # type: (Text) -> Dict[Text, Any] """Persist this model into the passed directory. Returns the metadata necessary to load the model again.""" import cloudpickle model_name = str ( args [ "model_version" ] ) + "_" + cls . name + ".pickle" classifier_file = os . path . join ( model_dir , model_name ) with io . open ( classifier_file , 'wb' ) as f : cloudpickle . dump ( cls , f ) return { "model_name" + "_" + cls . name : model_name }