<commit_before>class BatchFilter
  include Filter

  def self.filter(relation, values)
    relation.where('batches.name' => values)
  end

  def self.valid_values
    Batch.uniq
      .order(name: :asc)
      .pluck(:name)
      .select { |b| b.variants.any? }
  end

  def self.param_name
    :batches
  end

  def self.filter_type
    :multiselect
  end<commit_msg>fix filter<commit_after>class BatchFilter
  include Filter

  def self.filter(relation, values)
    relation.where('batches.name' => values)
  end

  def self.valid_values
    Batch.uniq
      .order(name: :asc)
      .select { |b| b.variants.any? }
      .map(&:name)
  end

  def self.param_name
    :batches
  end

  def self.filter_type
    :multiselect
  end
{'fraction_non_alphanumeric': 0.10547945205479452, 'fraction_numerical': 0.0, 'mean_word_length': 2.691919191919192, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1653633', 'n_tokens_mistral': 268, 'n_tokens_neox': 257, 'n_words': 56}