Delete an Amazon SageMaker Model.

        Args:
            model_name (str): Name of the Amazon SageMaker model to delete.
193644
def delete_model(self, model_name):
        
        LOGGER.info('Deleting model with name: {}'.format(model_name))
        self.sagemaker_client.delete_model(ModelName=model_name)
1264400
def model_deleted(sender, instance,
                          using,
                          **kwargs):
    
    opts = get_opts(instance)
    model = '.'.join([opts.app_label, opts.object_name])
    distill_model_event(instance, model, 'deleted')
383901
def delete(self, model_class, **where):
        '''
        
        '''
        assert hasattr(model_class, '_fields'), 'Not a valid class'
        table = model_class.__name__.lower()

        with Session() as conn:
            SQL = f'DELETE FROM {table} WHERE'
            if not where:
                raise ValueError('Specify WHERE conditions as kwargs')

            i = 1
            for k, v in where.items():
                SQL+= " %s = '%s' "%(k,v) if i ==1 else "AND %s = '%s' "%(k,v)
                i +=1

            c= conn.cursor()
            c.execute(SQL)
            conn.commit()
1253936
def delete(self, model_name):
    
    full_name = model_name
    if not model_name.startswith('projects/'):
      full_name = ('projects/%s/models/%s' % (self._project_id, model_name))
    response = self._api.projects().models().delete(name=full_name).execute()
    if 'name' not in response:
      raise Exception('Invalid response from service. "name" is not found.')
    _util.wait_for_long_running_operation(response['name'])
1024179
def delete(self, name):
    '''
    
    '''
    conn = self._client.connect()
    conn.execute( self._table.delete().where(self._table.c.name==name) )
311786
def delete_all(self, model_class):
        '''
        '''
        assert hasattr(model_class, '_fields'), 'Not a valid model class'

        table = model_class.__name__.lower()
        with Session() as conn:
            SQL = f'DELETE FROM {table}'
            conn.cursor().execute(SQL)
            conn.commit()
1163277
def get_model_string(model):
    
    name = model if isinstance(model, str) else model.__name__
    return normalize_string(name)
224834
def _map_table_name(self, model_names):
        

        for model in model_names:
            if isinstance(model, tuple):
                model = model[0]

            try:
                model_cls = getattr(self.models, model)
                self.table_to_class[class_mapper(model_cls).tables[0].name] = model
            except AttributeError:
                pass
1043207
def delete(self, dataset_name):
        
        url = "{0}/{1}".format(self._cached_datasets_url, dataset_name)
        self._get_json(HTTPMethods.DELETE, url, self._get_master_key())
        return True
634603
def set_model(self, name, model):
        
        # Careful to not use `hasattr`
        # https://hynek.me/articles/hasattr/
        try:
            self.__getattribute__('models')
        except AttributeError:
            object.__setattr__(self, 'models',odict())
        self.models[name] = model
725144
def remove(self, resource, **kwargs):
        
        log.info(
            "Removing {} '{}'...".format(self._model_name, resource.name))
        resource.remove(**kwargs)
        self._ids.remove(resource.id)
401098
def delete(self, model, commit=True):
        
        self.is_instance(model)
        db.session.delete(model)
        if commit:
            db.session.commit()

        return model
668200
def get_existing_model(model_name):
    
    try:
        model_cls = engine.get_document_cls(model_name)
        log.debug('Model `{}` already exists. Using existing one'.format(
            model_name))
        return model_cls
    except ValueError:
        log.debug('Model `{}` does not exist'.format(model_name))
314376
def del_graph(self, name):
        
        # make sure the graph exists before deleting anything
        self.get_graph(name)
        self.query.del_graph(name)
        if name in self._graph_objs:
            del self._graph_objs[name]
574691
def delete_model(self, name):
        
        try:
            ret = self.es.delete(index=self.index_name,
                                 doc_type=self.DOC_TYPE, id=name)
        except NotFoundError:
            return False
        # Make sure that the data is saved
        self.es.indices.flush(self.index_name)
        return ret['found']
1297501
def delete_entry(sender, instance, **kwargs):
    
    from ..models import Entry

    Entry.objects.get_for_model(instance)[0].delete()
574586
protected function deleteModel(Model $model)
    {
        $strategy = $this->getModelInformation()->deleteStrategy();

        if ( ! $strategy) {
            return $model->delete();
        }

        /** @var DeleteStrategyFactoryInterface $factory */
        $factory = app(DeleteStrategyFactoryInterface::class);
        $strategy = $factory->make($strategy);

        return $strategy->delete($model);
    }