class_docstr: BuilderConfig for WitKaggle.
class_docstr_tok: ["BuilderConfig","for","WitKaggle","."]
docstr: BuilderConfig for WitKaggle.
  
  Args:
    sample_files: list of paths to the sample files.
    image_folder: path to the folder where image data lies.
    split_specific_features: tfds.features.FeaturesDict. The features for the
      specific WitKaggle split.
    resnet_embedding_shape: shape of resnet embeddings.
    **kwargs: keyword arguments forwarded to super.
docstr_tok: ["BuilderConfig","for","WitKaggle",".","Args",":","sample_files",":","list","of","paths","to","the","sample","files",".","image_folder",":","path","to","the","folder","where","image","data","lies",".","split_specific_features",":","tfds.features.FeaturesDict",".","The","features","for","the","specific","WitKaggle","split",".","resnet_embedding_shape",":","shape","of","resnet","embeddings",".","*","*","kwargs",":","keyword","arguments","forwarded","to","super","."]
code: def __init__(
      self,
      *,
      sample_files: Optional[List[str]] = None,
      image_folder: Optional[str] = None,
      split_specific_features: Optional[
          tfds.features.FeaturesDict
      ] = None,
      resnet_embedding_shape: int = 2048,
      **kwargs,
  ):
      """BuilderConfig for WitKaggle.
  
      Args:
        sample_files: list of paths to the sample files.
        image_folder: path to the folder where image data lies.
        split_specific_features: tfds.features.FeaturesDict. The features for the
          specific WitKaggle split.
        resnet_embedding_shape: shape of resnet embeddings.
        **kwargs: keyword arguments forwarded to super.
      """
      super(WitKaggleConfig, self).__init__(**kwargs)
      self.sample_files = sample_files
      self.image_folder = image_folder
  
      # Features common to all configs.
      common_features = tfds.features.FeaturesDict(
          {
              "caption_title_and_reference_description": (
                  tfds.features.Text()
              ),  # Caption for the image_url (if existent, else '').
              "image_url": tfds.features.Text(),
              "image": (
                  tfds.features.Image()
              ),  # Base64 encoded image bytes (if existent, else a blank image).
              "metadata_url": (
                  tfds.features.Text()
              ),  # Url to the image's commons page (if existent, else '').
              "embedding": tfds.features.Tensor(
                  shape=(resnet_embedding_shape,), dtype=np.float32
              ),  # A tensor of 2048 floats (if existent, else zeros).
          }
      )
      self.features = tfds.features.FeaturesDict(
          {**common_features, **split_specific_features}
      )
      self.split_specific_features = split_specific_features
      self.resnet_embedding_shape = resnet_embedding_shape
      # For missing images, we use a zeroed vector of dimensionality (2048,) as
      # resnet embedding.
      self.empty_resnet_embedding = [0] * resnet_embedding_shape
  
file_path: datasets/tensorflow_datasets/vision_language/wit_kaggle/wit_kaggle.py
imports: from __future__ import annotations
  import base64
  import csv
  import functools
  import gzip
  import io
  import sys
  from typing import List, Optional
  import numpy
  from tensorflow_datasets.core.utils import bool_utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 1 to create a new WitKaggleConfig object from inherited base classes: tfds.core with example: obj = WitKaggleConfig()