<commit_before>module ProgressJob
  class Base
    def initialize(progress_max)
      @progress_max = progress_max
      super()
    end

    def before(job)
      @job = job
      @job.update_column(:progress_max, @progress_max)
    end

    def update_progress(step: 1)
      @job.update_column(:progress_current, @job.progress_current + step)
    end
  end
end<commit_msg>fix base<commit_after>module ProgressJob
  class Base

    def initialize(progress_max)
      @progress_max = progress_max
    end

    def before(job)
      @job = job
      @job.update_column(:progress_max, @progress_max)
    end

    def update_progress(step: 1)
      @job.update_column(:progress_current, @job.progress_current + step)
    end

    def update_stage(stage)
      @job.update_column(:progress_stage, stage)
    end

    def update_stage_progress(stage, step: 1)
      binding.pry
      update_stage(stage)
      update_progress(step: step)
    end
  end
end
{'fraction_non_alphanumeric': 0.08412197686645637, 'fraction_numerical': 0.0031545741324921135, 'mean_word_length': 3.0338983050847457, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6780924', 'n_tokens_mistral': 309, 'n_tokens_neox': 298, 'n_words': 65}