<commit_before>-- BLOCK select_recent_images
SELECT DISTINCT q.external_grading_image
FROM grading_jobs AS gj
JOIN submissions AS s ON (s.id = gj.submission_id)
JOIN variants AS v ON (v.id = s.variant_id)
JOIN instance_questions AS iq ON (iq.id = v.instance_question_id)
JOIN assessment_questions AS aq ON (aq.id = iq.assessment_question_id)
JOIN questions AS q ON (q.id = aq.question_id)
WHERE gj.grading_requested_at >= (NOW() - INTERVAL '1 hour');<commit_msg>Only select valid images from recent grading jobs<commit_after>-- BLOCK select_recent_images
SELECT DISTINCT q.external_grading_image
FROM grading_jobs AS gj
JOIN submissions AS s ON (s.id = gj.submission_id)
JOIN variants AS v ON (v.id = s.variant_id)
JOIN instance_questions AS iq ON (iq.id = v.instance_question_id)
JOIN assessment_questions AS aq ON (aq.id = iq.assessment_question_id)
JOIN questions AS q ON (q.id = aq.question_id)
WHERE q.grading_method = 'External'
AND q.external_grading_image IS NOT NULL
AND gj.grading_requested_at >= (NOW() - INTERVAL '1 hour');
{'fraction_non_alphanumeric': 0.08599033816425121, 'fraction_numerical': 0.001932367149758454, 'mean_word_length': 5.355828220858895, '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': '6915418', 'n_tokens_mistral': 388, 'n_tokens_neox': 354, 'n_words': 116}