<commit_before>export TrainingSummary

type TrainingSummary <: Coffee
  dispIter :: Bool
  dispObj_val :: Bool
  dispLR :: Bool
  dispMom:: Bool
  
  #Default Constructor
  #Put the "string" parameter to make the rest be optional
  function TrainingSummary(string="dontuseme";showIter=true,showObj_val=true,showLR=false,showMom=false)
    newTrainingSummary = new(showIter,showObj_val,showLR,showMom)

    return newTrainingSummary
  end

  TrainingSummary() = new(true,true,false,false)

end

function enjoy(lounge::CoffeeLounge, coffee::TrainingSummary, ::Net, state::SolverState)
  # we do not report objective value at iteration 0 because it has not been computed yet
  if coffee.dispIter
    txtIter = @sprintf("ITER = %06d",state.iter)
  else
    txtIter = ""
  end

  if coffee.dispObj_val
    txtObj_val = @sprintf(":: TRAIN obj-val = %.8f",state.obj_val)
  else
    txtObj_val = ""
  end

  if coffee.dispLR
    txtLR = @sprintf(":: LR = %.8f",state.learning_rate)<commit_msg>removed dummy variable, not needed<commit_after>export TrainingSummary

type TrainingSummary <: Coffee
  dispIter :: Bool
  dispObj_val :: Bool
  dispLR :: Bool
  dispMom:: Bool
  
  #Default Constructor
  function TrainingSummary(;showIter=true,showObj_val=true,showLR=false,showMom=false)
    newTrainingSummary = new(showIter,showObj_val,showLR,showMom)

    return newTrainingSummary
  end

end

function enjoy(lounge::CoffeeLounge, coffee::TrainingSummary, ::Net, state::SolverState)
  # we do not report objective value at iteration 0 because it has not been computed yet
  if coffee.dispIter
    txtIter = @sprintf("ITER = %06d",state.iter)
  else
    txtIter = ""
  end

  if coffee.dispObj_val
    txtObj_val = @sprintf(":: TRAIN obj-val = %.8f",state.obj_val)
  else
    txtObj_val = ""
  end

  if coffee.dispLR
    txtLR = @sprintf(":: LR = %.8f",state.learning_rate)
{'fraction_non_alphanumeric': 0.1046137339055794, 'fraction_numerical': 0.00536480686695279, 'mean_word_length': 4.469208211143695, 'pattern_counts': {'":': 4, '<': 5, '<?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': '7533338', 'n_tokens_mistral': 644, 'n_tokens_neox': 606, 'n_words': 151}