docstr: Initializes a `FeedbackDataset` instance locally.
  
  Args:
      fields: contains the fields that will define the schema of the records in the dataset.
      questions: contains the questions that will be used to annotate the dataset.
      metadata_properties: contains the metadata properties that will be indexed
          and could be used to filter the dataset. Defaults to `None`.
      vectors_settings: contains the vectors settings that will define the configuration
          of the vectors associated to the records in the dataset and that would
          allow to perform vector search. Defaults to `None`.
      guidelines: contains the guidelines for annotating the dataset. Defaults to `None`.
      allow_extra_metadata: whether to allow extra metadata that has not been defined
          as a metadata property in the records. Defaults to `True`.
  
  Raises:
      TypeError: if `fields` is not a list of `FieldSchema`.
      ValueError: if `fields` does not contain at least one required field.
      TypeError: if `questions` is not a list of `TextQuestion`, `RatingQuestion`,
          `LabelQuestion`, and/or `MultiLabelQuestion`.
      ValueError: if `questions` does not contain at least one required question.
      TypeError: if `guidelines` is not None and not a string.
      ValueError: if `guidelines` is an empty string.
  
  Examples:
      >>> import argilla as rg
      >>> rg.init(api_url="...", api_key="...")
      >>> dataset = rg.FeedbackDataset(
      ...     fields=[
      ...         rg.TextField(name="text", required=True),
      ...         rg.TextField(name="label", required=True),
      ...     ],
      ...     questions=[
      ...         rg.TextQuestion(
      ...             name="question-1",
      ...             description="This is the first question",
      ...             required=True,
      ...         ),
      ...         rg.RatingQuestion(
      ...             name="question-2",
      ...             description="This is the second question",
      ...             required=True,
      ...             values=[1, 2, 3, 4, 5],
      ...         ),
      ...         rg.LabelQuestion(
      ...             name="question-3",
      ...             description="This is the third question",
      ...             required=True,
      ...             labels=["positive", "negative"],
      ...         ),
      ...         rg.MultiLabelQuestion(
      ...             name="question-4",
      ...             description="This is the fourth question",
      ...             required=True,
      ...             labels=["category-1", "category-2", "category-3"],
      ...         ),
      ...     ],
      ...     metadata_properties=[
      ...         rg.TermsMetadataProperty(
      ...             name="metadata-property-1",
      ...             values=["a", "b", "c"]
      ...         ),
      ...         rg.IntegerMetadataProperty(
      ...             name="metadata-property-2",
      ...             gt=0,
      ...             lt=10,
      ...         ),
      ...         rg.FloatMetadataProperty(
      ...             name="metadata-property-2",
      ...             gt=-10.0,
      ...             lt=10.0,
      ...         ),
      ...     ],
      ...     guidelines="These are the annotation guidelines.",
      ... )
docstr_tok: ["Initializes","a","`","FeedbackDataset","`","instance","locally",".","Args",":","fields",":","contains","the","fields","that","will","define","the","schema","of","the","records","in","the","dataset",".","questions",":","contains","the","questions","that","will","be","used","to","annotate","the","dataset",".","metadata_properties",":","contains","the","metadata","properties","that","will","be","indexed","and","could","be","used","to","filter","the","dataset",".","Defaults","to","`","None","`",".","vectors_settings",":","contains","the","vectors","settings","that","will","define","the","configuration","of","the","vectors","associated","to","the","records","in","the","dataset","and","that","would","allow","to","perform","vector","search",".","Defaults","to","`","None","`",".","guidelines",":","contains","the","guidelines","for","annotating","the","dataset",".","Defaults","to","`","None","`",".","allow_extra_metadata",":","whether","to","allow","extra","metadata","that","has","not","been","defined","as","a","metadata","property","in","the","records",".","Defaults","to","`","True","`",".","Raises",":","TypeError",":","if","`","fields","`","is","not","a","list","of","`","FieldSchema","`",".","ValueError",":","if","`","fields","`","does","not","contain","at","least","one","required","field",".","TypeError",":","if","`","questions","`","is","not","a","list","of","`","TextQuestion","`",",","`","RatingQuestion","`",",","`","LabelQuestion","`",",","and\/or","`","MultiLabelQuestion","`",".","ValueError",":","if","`","questions","`","does","not","contain","at","least","one","required","question",".","TypeError",":","if","`","guidelines","`","is","not","None","and","not","a","string",".","ValueError",":","if","`","guidelines","`","is","an","empty","string",".","Examples",":",">",">",">","import","argilla","as","rg",">",">",">","rg.init","(","api_url=","''","...","''",",","api_key=","''","...","''",")",">",">",">","dataset","=","rg.FeedbackDataset","(","...","fields=","[","...","rg.TextField","(","name=","''","text","''",",","required=True",")",",","...","rg.TextField","(","name=","''","label","''",",","required=True",")",",","...","]",",","...","questions=","[","...","rg.TextQuestion","(","...","name=","''","question-1","''",",","...","description=","''","This","is","the","first","question","''",",","...","required=True",",","...",")",",","...","rg.RatingQuestion","(","...","name=","''","question-2","''",",","...","description=","''","This","is","the","second","question","''",",","...","required=True",",","...","values=","[","1",",","2",",","3",",","4",",","5","]",",","...",")",",","...","rg.LabelQuestion","(","...","name=","''","question-3","''",",","...","description=","''","This","is","the","third","question","''",",","...","required=True",",","...","labels=","[","``","positive","''",",","``","negative","''","]",",","...",")",",","...","rg.MultiLabelQuestion","(","...","name=","''","question-4","''",",","...","description=","''","This","is","the","fourth","question","''",",","...","required=True",",","...","labels=","[","``","category-1","''",",","``","category-2","''",",","``","category-3","''","]",",","...",")",",","...","]",",","...","metadata_properties=","[","...","rg.TermsMetadataProperty","(","...","name=","''","metadata-property-1","''",",","...","values=","[","``","a","''",",","``","b","''",",","``","c","''","]","...",")",",","...","rg.IntegerMetadataProperty","(","...","name=","''","metadata-property-2","''",",","...","gt=0",",","...","lt=10",",","...",")",",","...","rg.FloatMetadataProperty","(","...","name=","''","metadata-property-2","''",",","...","gt=-10.0",",","...","lt=10.0",",","...",")",",","...","]",",","...","guidelines=","''","These","are","the","annotation","guidelines",".","``",",","...",")"]
code: def __init__(
      self,
      *,
      fields: List["AllowedFieldTypes"],
      questions: List["AllowedQuestionTypes"],
      metadata_properties: Optional[
          List["AllowedMetadataPropertyTypes"]
      ] = None,
      vectors_settings: Optional[List[VectorSettings]] = None,
      guidelines: Optional[str] = None,
      allow_extra_metadata: bool = True,
  ) -> None:
      """Initializes a `FeedbackDataset` instance locally.
  
      Args:
          fields: contains the fields that will define the schema of the records in the dataset.
          questions: contains the questions that will be used to annotate the dataset.
          metadata_properties: contains the metadata properties that will be indexed
              and could be used to filter the dataset. Defaults to `None`.
          vectors_settings: contains the vectors settings that will define the configuration
              of the vectors associated to the records in the dataset and that would
              allow to perform vector search. Defaults to `None`.
          guidelines: contains the guidelines for annotating the dataset. Defaults to `None`.
          allow_extra_metadata: whether to allow extra metadata that has not been defined
              as a metadata property in the records. Defaults to `True`.
  
      Raises:
          TypeError: if `fields` is not a list of `FieldSchema`.
          ValueError: if `fields` does not contain at least one required field.
          TypeError: if `questions` is not a list of `TextQuestion`, `RatingQuestion`,
              `LabelQuestion`, and/or `MultiLabelQuestion`.
          ValueError: if `questions` does not contain at least one required question.
          TypeError: if `guidelines` is not None and not a string.
          ValueError: if `guidelines` is an empty string.
  
      Examples:
          >>> import argilla as rg
          >>> rg.init(api_url="...", api_key="...")
          >>> dataset = rg.FeedbackDataset(
          ...     fields=[
          ...         rg.TextField(name="text", required=True),
          ...         rg.TextField(name="label", required=True),
          ...     ],
          ...     questions=[
          ...         rg.TextQuestion(
          ...             name="question-1",
          ...             description="This is the first question",
          ...             required=True,
          ...         ),
          ...         rg.RatingQuestion(
          ...             name="question-2",
          ...             description="This is the second question",
          ...             required=True,
          ...             values=[1, 2, 3, 4, 5],
          ...         ),
          ...         rg.LabelQuestion(
          ...             name="question-3",
          ...             description="This is the third question",
          ...             required=True,
          ...             labels=["positive", "negative"],
          ...         ),
          ...         rg.MultiLabelQuestion(
          ...             name="question-4",
          ...             description="This is the fourth question",
          ...             required=True,
          ...             labels=["category-1", "category-2", "category-3"],
          ...         ),
          ...     ],
          ...     metadata_properties=[
          ...         rg.TermsMetadataProperty(
          ...             name="metadata-property-1",
          ...             values=["a", "b", "c"]
          ...         ),
          ...         rg.IntegerMetadataProperty(
          ...             name="metadata-property-2",
          ...             gt=0,
          ...             lt=10,
          ...         ),
          ...         rg.FloatMetadataProperty(
          ...             name="metadata-property-2",
          ...             gt=-10.0,
          ...             lt=10.0,
          ...         ),
          ...     ],
          ...     guidelines="These are the annotation guidelines.",
          ... )
      """
  
      helpers.validate_fields(fields)
      helpers.validate_questions(questions)
      helpers.validate_metadata_properties(metadata_properties)
  
      if guidelines is not None:
          if not isinstance(guidelines, str):
              raise TypeError(
                  f"Expected `guidelines` to be either None (default) or a string, got {type(guidelines)} instead."
              )
          if len(guidelines) < 1:
              raise ValueError(
                  "Expected `guidelines` to be either None (default) or a non-empty string, minimum length is 1."
              )
  
      self._fields = fields or []
      self._questions = questions or []
      self._metadata_properties = metadata_properties or []
      self._guidelines = guidelines
      self._allow_extra_metadata = allow_extra_metadata
  
      if vectors_settings:
          self._vectors_settings = {
              vector_setting.name: vector_setting
              for vector_setting in vectors_settings
          }
      else:
          self._vectors_settings: Dict[str, VectorSettings] = {}
      self._records = []
  
imports: import logging
  import textwrap
  import warnings
  from typing import TYPE_CHECKING, Any, Dict, Iterator, List, Optional, Tuple, Union
  from argilla.client.feedback.constants import FETCHING_BATCH_SIZE
  from argilla.client.feedback.dataset import helpers
  from argilla.client.feedback.dataset.base import FeedbackDatasetBase, R
  from argilla.client.feedback.dataset.local.mixins import ArgillaMixin, TaskTemplateMixin
  from argilla.client.feedback.dataset.mixins import MetricsMixin, UnificationMixin
  from argilla.client.feedback.integrations.huggingface.dataset import HuggingFaceDatasetMixin
  from argilla.client.feedback.schemas.enums import RecordSortField, SortOrder
  from argilla.client.feedback.schemas.records import FeedbackRecord
  from argilla.client.feedback.schemas.vector_settings import VectorSettings
  from argilla.client.feedback.training.schemas.base import TrainingTaskForChatCompletion, TrainingTaskForDPO, TrainingTaskForPPO, TrainingTaskForQuestionAnswering, TrainingTaskForRM, TrainingTaskForSentenceSimilarity, TrainingTaskForSFT, TrainingTaskForTextClassification, TrainingTaskTypes
  from argilla.client.models import Framework
label_desc: Use image node_id 1 to create a new FeedbackDataset object from inherited base classes: ArgillaMixin, HuggingFaceDatasetMixin, FeedbackDatasetBase, TaskTemplateMixin, MetricsMixin, UnificationMixin with example: obj = FeedbackDataset()