docstr: Save a classifier to the S3 bucket supplied on __init__. Saves a
  serialized representaion of the model as well as a detailed set
  of metrics.
  
  local_model_path: path to serialized model in the local file system
  local_metric_path: path to serialized metrics in the local file system
docstr_tok: ["Save","a","classifier","to","the","S3","bucket","supplied","on","__init__",".","Saves","a","serialized","representaion","of","the","model","as","well","as","a","detailed","set","of","metrics",".","local_model_path",":","path","to","serialized","model","in","the","local","file","system","local_metric_path",":","path","to","serialized","metrics","in","the","local","file","system"]
code: def save_classifier_cloud(
      self, local_model_path, local_metric_path, delete_local=False
  ):
      """
      Save a classifier to the S3 bucket supplied on __init__. Saves a
      serialized representaion of the model as well as a detailed set
      of metrics.
  
      local_model_path: path to serialized model in the local file system
      local_metric_path: path to serialized metrics in the local file system
      """
  
      client = boto3.client(
          "s3",
          aws_access_key_id=self.aws_access_key,
          aws_secret_access_key=self.aws_secret_key,
      )
  
      if self.s3_folder:
          aws_model_path = os.path.join(
              self.s3_folder, local_model_path
          )
          aws_metric_path = os.path.join(
              self.s3_folder, local_metric_path
          )
      else:
          aws_model_path = local_model_path
          aws_metric_path = local_metric_path
  
      LOGGER.info(
          "Uploading model at %s to s3://%s/%s",
          local_model_path,
          self.s3_bucket,
          aws_model_path,
      )
      client.upload_file(
          local_model_path, self.s3_bucket, aws_model_path
      )
  
      LOGGER.info(
          "Uploading metric at %s to s3://%s/%s",
          local_metric_path,
          self.s3_bucket,
          aws_metric_path,
      )
      client.upload_file(
          local_metric_path, self.s3_bucket, aws_metric_path
      )
  
      if delete_local:
          LOGGER.info(
              "Deleting local copies of %s and %s",
              local_model_path,
              local_metric_path,
          )
          os.remove(local_model_path)
          os.remove(local_metric_path)
  
      return (
          "s3://{}/{}".format(self.s3_bucket, aws_model_path),
          "s3://{}/{}".format(self.s3_bucket, aws_metric_path),
      )
  
imports: from __future__ import absolute_import, unicode_literals
  import datetime
  import imp
  import logging
  import os
  import re
  import socket
  import traceback
  import warnings
  from builtins import object, str
  from collections import defaultdict
  import boto3
  import numpy
  from atm.classifier import Model
  from atm.constants import CUSTOM_CLASS_REGEX, SELECTORS, TUNERS
  from atm.database import ClassifierStatus, DBSession
  from atm.utilities import ensure_directory, get_instance, save_metrics, save_model, update_params
label_desc: Use image node_id 8 for calling the Worker obj's underlying member method code with example usage: obj.save_classifier_cloud(local_model_path, local_metric_path, delete_local) and returns: str,  str