<commit_before>NewsArticle.where("carrierwave_image IS NOT NULL").each do |article|
  puts "Retrieving image for NewsArticle##{article.id}"
  article.image.cache_stored_file!
  path_to_image = article.image.send(:cache_path)
  image = article.images.build(alt_text: article.image_alt_text, caption: article.image_caption, image_data_attributes: {file: File.open(path_to_image)})
  image.save(false)
end<commit_msg>API change in rails...<commit_after>NewsArticle.where("carrierwave_image IS NOT NULL").each do |article|
  puts "Retrieving image for NewsArticle##{article.id}"
  article.image.cache_stored_file!
  path_to_image = article.image.send(:cache_path)
  image = article.images.build(alt_text: article.image_alt_text, caption: article.image_caption, image_data_attributes: {file: File.open(path_to_image)})
  image.save(validate: false)
end
{'fraction_non_alphanumeric': 0.1180637544273908, 'fraction_numerical': 0.0, 'mean_word_length': 7.153846153846154, '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': '5985401', 'n_tokens_mistral': 284, 'n_tokens_neox': 274, 'n_words': 51}