<commit_before>module Amber
  class Cluster
    @@env_hash : Hash(String, String)?

    def self.env_hash
      @@env_hash ||= begin
        env = ENV.to_h
        env["FORKED"] = "1"
        env["AMBER_ENV"] = Amber.env.to_s
      end
    end

    def self.fork
      Process.fork { Process.run(PROGRAM_NAME, nil, env_hash, true, false, input: Process::Redirect::Inherit, output: Process::Redirect::Inherit, error: Process::Redirect::Inherit) }
    end

    def self.master?
      (ENV["FORKED"]? || "0") == "0"
    end

    def self.worker?
      (ENV["FORKED"]? || "0") == "1"
    end
  end<commit_msg>fixed specs<commit_after>module Amber
  class Cluster
    @@env_hash : Hash(String, String)?

    def self.env_hash
      @@env_hash ||= begin
        env = ENV.to_h
        env["FORKED"] = "1"
        env["AMBER_ENV"] = Amber.env.to_s
        env
      end
    end

    def self.fork
      Process.fork { Process.run(PROGRAM_NAME, nil, env_hash, true, false, input: Process::Redirect::Inherit, output: Process::Redirect::Inherit, error: Process::Redirect::Inherit) }
    end

    def self.master?
      (ENV["FORKED"]? || "0") == "0"
    end

    def self.worker?
      (ENV["FORKED"]? || "0") == "1"
    end
  end
{'fraction_non_alphanumeric': 0.1557377049180328, 'fraction_numerical': 0.00819672131147541, 'mean_word_length': 2.601769911504425, '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': '5601220', 'n_tokens_mistral': 456, 'n_tokens_neox': 430, 'n_words': 95}