class_docstr: The label model by `Snorkel <https://github.com/snorkel-team/snorkel/>`__.
  
  .. note:: It is not suited for multi-label classification and does not support it!
  
  Args:
      weak_labels: A `WeakLabels` object containing the weak labels and records.
      verbose: Whether to show print statements
      device: What device to place the model on ('cpu' or 'cuda:0', for example).
          Passed on to the `torch.Tensor.to()` calls.
  
  Examples:
      >>> from argilla.labeling.text_classification import WeakLabels
      >>> weak_labels = WeakLabels(dataset="my_dataset")
      >>> label_model = Snorkel(weak_labels)
      >>> label_model.fit()
      >>> records = label_model.predict()
class_docstr_tok: ["The","label","model","by","`","Snorkel","<","https",":","\/\/github.com\/snorkel-team\/snorkel\/",">","`","__",".","..","note",":",":","It","is","not","suited","for","multi-label","classification","and","does","not","support","it","!","Args",":","weak_labels",":","A","`","WeakLabels","`","object","containing","the","weak","labels","and","records",".","verbose",":","Whether","to","show","print","statements","device",":","What","device","to","place","the","model","on","(","'cpu","'","or","'cuda:0","'",",","for","example",")",".","Passed","on","to","the","`","torch.Tensor.to","(",")","`","calls",".","Examples",":",">",">",">","from","argilla.labeling.text_classification","import","WeakLabels",">",">",">","weak_labels","=","WeakLabels","(","dataset=","''","my_dataset","''",")",">",">",">","label_model","=","Snorkel","(","weak_labels",")",">",">",">","label_model.fit","(",")",">",">",">","records","=","label_model.predict","(",")"]
docstr: Fits the label model.
  
  Args:
      include_annotated_records: Whether to include annotated records in the fitting.
      **kwargs: Additional kwargs are passed on to Snorkel's
          `fit method <https://snorkel.readthedocs.io/en/latest/packages/_autosummary/labeling/snorkel.labeling.model.label_model.LabelModel.html#snorkel.labeling.model.label_model.LabelModel.fit>`__.
          They must not contain ``L_train``, the label matrix is provided automatically.
docstr_tok: ["Fits","the","label","model",".","Args",":","include_annotated_records",":","Whether","to","include","annotated","records","in","the","fitting",".","*","*","kwargs",":","Additional","kwargs","are","passed","on","to","Snorkel's","`","fit","method","<","https",":","\/\/snorkel.readthedocs.io\/en\/latest\/packages\/_autosummary\/labeling\/snorkel.labeling.model.label_model.LabelModel.html","#","snorkel.labeling.model.label_model.LabelModel.fit",">","`","__",".","They","must","not","contain","``","L_train","``",",","the","label","matrix","is","provided","automatically","."]
code: def fit(self, include_annotated_records: bool = False, **kwargs):
      """Fits the label model.
  
      Args:
          include_annotated_records: Whether to include annotated records in the fitting.
          **kwargs: Additional kwargs are passed on to Snorkel's
              `fit method <https://snorkel.readthedocs.io/en/latest/packages/_autosummary/labeling/snorkel.labeling.model.label_model.LabelModel.html#snorkel.labeling.model.label_model.LabelModel.fit>`__.
              They must not contain ``L_train``, the label matrix is provided automatically.
      """
      if "L_train" in kwargs:
          raise ValueError(
              "Your kwargs must not contain 'L_train', it is provided automatically."
          )
  
      l_train = self._weak_labels.matrix(
          has_annotation=None if include_annotated_records else False
      )
      if self._need_remap:
          l_train = self._copy_and_remap(l_train)
  
      self._model.fit(L_train=l_train, **kwargs)
  
imports: import hashlib
  import logging
  from enum import Enum
  from typing import Dict, List, Tuple, Union
  import numpy
  from argilla import DatasetForTextClassification, TextClassificationRecord
  from argilla.labeling.text_classification.weak_labels import WeakLabels, WeakMultiLabels
  from argilla.utils.dependency import requires_dependencies
label_desc: Use image node_id 2 for calling the Snorkel obj's underlying member method code with example usage: obj.fit(include_annotated_records) without return types