class_docstr: Text classification service
class_docstr_tok: ["Text","classification","service"]
docstr: Delete a rule from a dataset by its defined query string
docstr_tok: ["Delete","a","rule","from","a","dataset","by","its","defined","query","string"]
code: def delete_labeling_rule(
      self, dataset: ServiceTextClassificationDataset, rule_query: str
  ):
      """Delete a rule from a dataset by its defined query string"""
      new_rules_set = [
          r for r in dataset.rules if r.query != rule_query
      ]
      if len(dataset.rules) != new_rules_set:
          dataset.rules = new_rules_set
          self.__datasets__.raw_dataset_update(dataset)
  
imports: from typing import Iterable, List, Optional, Tuple
  from fastapi import Depends
  from argilla.server.errors.base_errors import EntityAlreadyExistsError, EntityNotFoundError, MissingDatasetRecordsError
  from argilla.server.services.datasets import DatasetsService
  from argilla.server.services.metrics import MetricsService
  from argilla.server.services.search.model import ServiceSearchResults, ServiceSortableField, ServiceSortConfig
  from argilla.server.services.search.service import SearchRecordsService
  from argilla.server.services.storage.service import RecordsStorageService
  from argilla.server.services.tasks.commons import BulkResponse
  from argilla.server.services.tasks.text_classification.metrics import TextClassificationMetrics
  from argilla.server.services.tasks.text_classification.model import DatasetLabelingRulesMetricsSummary, DatasetLabelingRulesSummary, LabelingRuleMetricsSummary, LabelingRuleSummary, ServiceLabelingRule, ServiceTextClassificationDataset, ServiceTextClassificationQuery, ServiceTextClassificationRecord
label_desc: Use image node_id 11 for calling the TextClassificationService obj's underlying member method code with example usage: obj.delete_labeling_rule(dataset, rule_query) without return types