AI Slop Code RIsk Monitor

allenai/olmocr

Toolkit for linearizing PDFs for LLM datasets/training

31.3 High pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for allenai/olmocr, a Python project with 19,734 GitHub stars. SynthScan examined 77,441 lines of code across 345 source files, recording 1500 pattern matches distributed across 22 syntactic categories. The legacy adjusted pattern signal is 31.3 (High pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

31.3
Adjusted Signal
31.3
Raw Pattern Score
100%
Time Factor
2026-03-25
Last Push
19.7K
Stars
Python
Language
77.4K
Lines of Code
345
Files
1.5K
Pattern Hits
2026-10-12
Scan Date
0.28
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 53.5/100 · HIGH

Can maintainers explain intent, assumptions, and trade-offs? 860 finding(s).

Hallucinated Dependency & Supply Chain Risk 15.2/100 · LOW

Are imports declared and package/API names verified? 96 finding(s).

Agent Over-Engineering Ratio 55.8/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 857 finding(s).

PR Review Velocity Impact 81.7/100 · CRITICAL

Which changes need focused human review? 1500 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 95MEDIUM 326LOW 1079

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 1500 distinct pattern matches across 22 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Excessive Try-Catch Wrapping466 hits · 674 pts
SeverityFileLineSnippetContext
LOWtests/test_tests.py1578 except Exception as e:CODE
LOWtests/test_tests.py1600 except Exception as e:CODE
LOWtests/test_tests.py1612 except Exception as e:CODE
LOWtests/test_tests.py1625 except Exception as e:CODE
LOWtests/test_tests.py1645 except Exception as e:CODE
LOWtests/test_tests.py2214 except Exception as e:CODE
LOW⚡olmocr/image_utils.py49 except Exception as e:CODE
MEDIUM⚡olmocr/image_utils.py50 print(f"Error: {e}")CODE
LOW⚡olmocr/image_utils.py59 except Exception as e:CODE
MEDIUM⚡olmocr/image_utils.py60 print(f"Error: {e}")CODE
MEDIUMolmocr/image_utils.py44def is_png(file_path):CODE
MEDIUMolmocr/image_utils.py54def is_jpeg(file_path):CODE
LOWolmocr/s3_utils.py141 except Exception as e:CODE
LOWolmocr/s3_utils.py243 except Exception as e:CODE
LOWolmocr/s3_utils.py281 except Exception as e:CODE
LOWolmocr/s3_utils.py323 except Exception as e:CODE
LOWolmocr/s3_utils.py349 except Exception as e:CODE
MEDIUMolmocr/s3_utils.py277def download_blob(blob, local_file_path):CODE
MEDIUMolmocr/pipeline.py845def _kill_proc():CODE
MEDIUMolmocr/pipeline.py1115def process_output_file(s3_path):CODE
LOWolmocr/pipeline.py228 except Exception as e:CODE
LOWolmocr/pipeline.py466 except Exception as e:CODE
LOWolmocr/pipeline.py570 except Exception as e:CODE
LOWolmocr/pipeline.py803 except Exception as e:CODE
LOWolmocr/pipeline.py890 except Exception as ex:CODE
LOWolmocr/pipeline.py948 except Exception:CODE
LOWolmocr/pipeline.py974 except Exception:CODE
LOWolmocr/pipeline.py1149 except Exception as e:CODE
LOWolmocr/pipeline.py1395 except Exception as e:CODE
LOWolmocr/work_queue.py213 except Exception as e:CODE
LOWolmocr/bench/benchmark.py111 except Exception as e:CODE
LOWolmocr/bench/benchmark.py121 except Exception as e:CODE
MEDIUMolmocr/bench/benchmark.py203 print("Error: /pdfs folder must exist in your data directory.", file=sys.stderr)CODE
MEDIUMolmocr/bench/benchmark.py209 print(f"Error: No PDF files found in {pdf_folder}", file=sys.stderr)CODE
MEDIUMolmocr/bench/benchmark.py220 print(f"Error: No .jsonl files found in {input_folder}.", file=sys.stderr)CODE
MEDIUMolmocr/bench/benchmark.py275 print("Error: No candidate pipeline folders found (subdirectories besides 'pdfs').", file=sys.stderr)CODE
LOWolmocr/bench/convert.py84 except Exception as ex:CODE
LOWolmocr/bench/convert.py172 except Exception as e:CODE
LOWolmocr/bench/convert.py215 except Exception as e:CODE
LOWolmocr/bench/convert.py226 except Exception as e:CODE
MEDIUM⚡olmocr/bench/review_app.py267 print(f"Error: Dataset not found: {args.dataset_file}")CODE
MEDIUM⚡olmocr/bench/review_app.py276 print(f"Error: PDF directory not found: {pdf_dir}")CODE
LOW⚡olmocr/bench/review_app.py282 except Exception as e:CODE
MEDIUM⚡olmocr/bench/review_app.py283 print(f"Error loading dataset: {str(e)}")CODE
MEDIUM⚡olmocr/bench/review_app_latex.py689 print(f"Error: Dataset not found: {args.dataset_file}")CODE
MEDIUM⚡olmocr/bench/review_app_latex.py697 print(f"Error: PDF directory not found: {pdf_dir}")CODE
LOW⚡olmocr/bench/review_app_latex.py702 except Exception as e:CODE
MEDIUM⚡olmocr/bench/review_app_latex.py703 print(f"Error loading dataset: {str(e)}")CODE
MEDIUM⚡olmocr/bench/tests.py834 print(f"Error parsing JSON on line {line_number}: {e}")CODE
MEDIUM⚡olmocr/bench/tests.py837 print(f"Error on line {line_number}: {e}")CODE
LOW⚡olmocr/bench/tests.py839 except Exception as e:CODE
LOWolmocr/bench/report.py267 except Exception as e:CODE
LOWolmocr/bench/report.py279 except Exception as e:CODE
LOWolmocr/bench/katex/render.py179 except Exception:CODE
LOWolmocr/bench/katex/render.py183 except Exception:CODE
LOWolmocr/bench/katex/render.py224 except Exception:CODE
MEDIUMolmocr/bench/katex/render.py304 print(f"Error rendering equation: '{equation}'")STRING
LOWolmocr/bench/katex/render.py431 except Exception as e:STRING
MEDIUMolmocr/bench/katex/render.py432 print("Error parsing MathML with BeautifulSoup:", e)STRING
LOWolmocr/bench/scripts/screen_pdfs.py93 except Exception as e:CODE
406 more matches not shown…
Self-Referential Comments119 hits · 346 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_mine_html_templates_mine_tests.py931 # Create a temporary file to store the rendered PDFSTRING
MEDIUM⚡tests/test_tests.py570 # Create a table with irregular pipe placement at the endCOMMENT
MEDIUM⚡tests/test_tests.py603 # Create a very long text before the tableCOMMENT
MEDIUMtests/test_grpo.py44 # Create a minimal valid PDFCOMMENT
MEDIUMtests/test_grpo.py189 # Create an empty JSONL fileCOMMENT
MEDIUMtests/test_grpo.py208 # Create a JSONL with some malformed entriesCOMMENT
MEDIUMtests/test_grpo.py275 # Create a sample JSONL test file with different test typesCOMMENT
MEDIUMtests/test_pipeline.py172 # Create a more complex test imageCOMMENT
MEDIUMolmocr/metrics.py159 # Create the table headerCOMMENT
MEDIUMolmocr/metrics.py163 # Create the table rowsCOMMENT
MEDIUMolmocr/pipeline.py691 # Create the output markdown pathCOMMENT
MEDIUMolmocr/pipeline.py750 # Define the output S3 path using the work_hashCOMMENT
MEDIUMolmocr/pipeline.py775 # Create the directory structure if it doesn't existCOMMENT
MEDIUMolmocr/pipeline.py1070 # Create the experiment specCOMMENT
MEDIUMolmocr/bench/benchmark.py79 # Define an inner function to evaluate a single testCOMMENT
MEDIUMolmocr/bench/review_app_latex.py248 # Create the review_latex.html template with MathJax supportCOMMENT
MEDIUMolmocr/bench/review_app_latex.py611 # Create the all_done_latex.html templateSTRING
MEDIUMolmocr/bench/katex/render.py243 # Create a new page.COMMENT
MEDIUMolmocr/bench/scripts/split_table_tests.py91 # Create a new test dict for each relationshipCOMMENT
MEDIUM⚡olmocr/bench/miners/mine_reading_order.py93 # Create a new PDF with just the selected pageCOMMENT
MEDIUMolmocr/bench/miners/mine_reading_order.py34# Create a thread-safe lock for writing to output filesCOMMENT
MEDIUMolmocr/bench/miners/mine_reading_order.py343 # Create a thread-specific temp directory to avoid conflictsCOMMENT
MEDIUMolmocr/bench/miners/mine_reading_order.py442 # Create a summary fileCOMMENT
MEDIUMolmocr/bench/miners/mine_reading_order.py448 # Create a ThreadPoolExecutorCOMMENT
MEDIUM⚡olmocr/bench/miners/mine_tables_gpt.py89 # Create a new PDF with just the selected pageCOMMENT
MEDIUM⚡olmocr/bench/miners/mine_tables_gemini.py97 # Create a new PDF with just the selected pageCOMMENT
MEDIUMolmocr/bench/miners/mine_tables_gemini.py37# Create a thread-safe lock for writing to the output fileCOMMENT
MEDIUMolmocr/bench/miners/mine_tables_gemini.py238 # Create an image part from the rendered pdf imageCOMMENT
MEDIUMolmocr/bench/miners/mine_tables_gemini.py308 # Create a thread-specific temp directory to avoid conflictsCOMMENT
MEDIUMolmocr/bench/miners/mine_tables_gemini.py414 # Create a ThreadPoolExecutorCOMMENT
MEDIUM⚡olmocr/bench/miners/mine_long_tiny_text.py57 # Create a new PDF with just the selected pageCOMMENT
MEDIUMolmocr/bench/miners/mine_long_tiny_text.py214 # Create a placeholder test to ensure the PDF is representedCOMMENT
MEDIUMolmocr/bench/miners/cleanup_data.py56 # Create a new single-page PDFCOMMENT
MEDIUM⚡olmocr/bench/miners/cleanup_data.py93 # Create a dataset.jsonl with only the tests for pages we're keepingCOMMENT
MEDIUM⚡olmocr/bench/miners/mine_headers_footers.py89 # Create a new PDF with just the selected pageCOMMENT
MEDIUM⚡olmocr/bench/miners/mine_old_scans_math.py57 # Create a new PDF with just the selected pageCOMMENT
MEDIUMolmocr/bench/miners/pick_mediod.py141 # Create the output path, preserving the directory structure relative to input_dirCOMMENT
MEDIUM⚡olmocr/bench/runners/run_mistral.py32 # Create a new PDF with just the requested pageCOMMENT
MEDIUM⚡olmocr/bench/runners/run_mineru.py26 # Create a new PDF with just the requested pageCOMMENT
MEDIUMolmocr/bench/runners/run_marker.py17 # Create a configuration dictionary with the necessary settingsCOMMENT
MEDIUM⚡olmocr/bench/runners/run_marker.py47 # Create a new PDF with just the requested pageCOMMENT
MEDIUM⚡olmocr/synth/mine_html_templates.py530 # Create a temporary PDF fileCOMMENT
MEDIUM⚡olmocr/synth/mine_html_templates.py670 # Create a new PDF with just the selected pageCOMMENT
MEDIUMolmocr/synth/mine_html_templates.py224 # Create a temporary soup with just this element to get its HTMLCOMMENT
MEDIUMolmocr/synth/mine_html_templates.py311 # Create a new soup with just the body contentCOMMENT
MEDIUMolmocr/synth/mine_html_templates.py328 # Create an img tag with placeholder src and appropriate alt textCOMMENT
MEDIUMolmocr/synth/mine_html_templates.py1825 # Create a unique folder for each PDF in the temp directory; include PID and PDF path hash to avoid cross-run collisCOMMENT
MEDIUMolmocr/synth/mine_html_templates.py972 # Create a TableTest with relevant relationshipsSTRING
MEDIUMolmocr/synth/mine_html_templates.py1016 # Create the actual test objectSTRING
MEDIUMolmocr/synth/mine_html_templates.py1441 # Create a format testSTRING
MEDIUMolmocr/synth/mine_html_templates.py1694 # Create a signature for the test by using all fields except 'id'STRING
MEDIUMolmocr/synth/mine_html_templates.py1717 # Create a baseline test object to check if disallowed characters are presentSTRING
MEDIUMolmocr/synth/rotate_html_templates.py54 # Create the same symlink in destinationCOMMENT
MEDIUMolmocr/synth/rotate_html_templates.py283 # Create a temporary file for the rotated PDFCOMMENT
MEDIUMolmocr/train/config.py330 # Create main configCOMMENT
MEDIUMolmocr/train/compress_checkpoint.py254# Define a oneshot data collator for multimodal inputs.COMMENT
MEDIUMolmocr/train/grpo_train.py1429 # Create a wrapper function that calls olmocr_bench_reward with macro_average=TrueCOMMENT
MEDIUMolmocr/train/grpo_train.py1474 # Create a wrapper function with proper __name__ attributeCOMMENT
MEDIUMolmocr/train/dataloader.py926 # Create a new PageResponse with the updated text (since it's frozen)COMMENT
MEDIUMolmocr/train/dataloader.py1075 # Create a new PageResponse with the updated text (since it's frozen)COMMENT
59 more matches not shown…
Hyper-Verbose Identifiers312 hits · 284 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_olmocrmix.py10def test_repackage_and_prepare_olmocrmix():CODE
LOWtests/test_s3_work_queue.py29 def test_compute_workgroup_hash(self):CODE
LOWtests/test_s3_work_queue.py73 async def test_populate_queue_new_items(self):CODE
LOWtests/test_s3_work_queue.py94 async def test_populate_queue_existing_items(self):CODE
LOWtests/test_mine_html_templates_markdown.py17 def test_title_tag_excluded_from_markdown(self):CODE
LOWtests/test_mine_html_templates_markdown.py44 def test_image_with_data_description(self):STRING
LOWtests/test_mine_html_templates_markdown.py65 def test_image_without_data_description(self):STRING
LOWtests/test_mine_html_templates_markdown.py80 def test_headers_footers_excluded(self):STRING
LOWtests/test_mine_html_templates_markdown.py109 def test_no_body_tag_fallback(self):STRING
LOWtests/test_mine_html_templates_markdown.py124 def test_removes_triple_dashes_from_content(self):STRING
LOWtests/test_mine_html_templates_markdown.py222 def test_mixed_super_and_subscripts(self):STRING
LOWtests/test_mine_html_templates_markdown.py314 def test_frontmatter_preserved(self):STRING
LOWtests/test_mine_html_templates_markdown.py351 def test_empty_super_subscripts(self):STRING
LOWtests/test_mine_html_templates_markdown.py369 def test_complex_math_expression(self):STRING
LOWtests/test_mine_html_templates_markdown.py391 def test_non_numerical_footnote(self):STRING
LOWtests/test_mine_html_templates_markdown.py406 def test_line_numbers_markdown(self):STRING
LOWtests/test_dataloader.py25 def test_markdown_table_detection(self):CODE
LOWtests/test_dataloader.py99 def test_malformed_html_table_unclosed_tags(self):STRING
LOWtests/test_dataloader.py128 def test_malformed_html_table_missing_closing(self):STRING
LOWtests/test_dataloader.py197 def test_complex_markdown_table_variations(self):CODE
LOWtests/test_dataloader.py247 def test_br_tags_outside_tables(self):STRING
LOWtests/test_dataloader.py277 def test_simple_bold_conversion(self):CODE
LOWtests/test_dataloader.py293 def test_simple_italic_conversion(self):CODE
LOWtests/test_dataloader.py309 def test_bold_and_italic_conversion(self):CODE
LOWtests/test_dataloader.py325 def test_latex_in_math_equation_preserved(self):CODE
LOWtests/test_dataloader.py373 def test_multiple_occurrences(self):CODE
LOWtests/test_dataloader.py389 def test_latex_in_parenthesis_delimiter(self):CODE
LOWtests/test_dataloader.py405 def test_latex_in_bracket_delimiter(self):CODE
LOWtests/test_dataloader.py460 def test_complex_latex_with_parenthesis_delimiters(self):CODE
LOWtests/test_dataloader.py536 def test_rotation_correction_needed(self):CODE
LOWtests/test_dataloader.py567 def test_dollar_to_parentheses(self):CODE
LOWtests/test_dataloader.py584 def test_double_dollar_to_brackets(self):CODE
LOWtests/test_dataloader.py601 def test_mixed_latex_delimiters(self):CODE
LOWtests/test_dataloader.py667 def test_parse_yaml_front_matter(self, mock_read_text):CODE
LOWtests/test_dataloader.py715 def test_preserve_existing_markdown_content(self, mock_read_text):STRING
LOWtests/test_mine_html_templates_mine_tests.py1044 def test_complex_markdown_formatting(self):CODE
LOWtests/test_mine_html_templates_mine_tests.py1104 def test_complex_formatting_two(self):STRING
LOWtests/test_mine_html_templates_footnotes.py46 def test_single_marker_generates_marker_only(self):CODE
LOWtests/test_mine_html_templates_footnotes.py71 def test_marker_with_definition_includes_text(self):STRING
LOWtests/test_mine_html_templates_footnotes.py99 def test_multiple_markers_mixed_occurrences(self):STRING
LOWtests/test_mine_html_templates_footnotes.py211 def test_footnotes_in_footer_ptags(self):STRING
LOWtests/test_mine_html_templates_footnotes.py314 def test_footnotes_footer_again(self):CODE
LOW⚡tests/test_tests.py136 def test_present_text_exact_match(self):CODE
LOW⚡tests/test_tests.py142 def test_present_text_not_found(self):CODE
LOW⚡tests/test_tests.py149 def test_present_text_with_max_diffs(self):CODE
LOW⚡tests/test_tests.py182 def test_absent_text_not_found(self):CODE
LOW⚡tests/test_tests.py188 def test_case_insensitive_present(self):CODE
LOW⚡tests/test_tests.py194 def test_case_insensitive_absent(self):CODE
LOW⚡tests/test_tests.py526 def test_with_stripped_content(self):CODE
LOW⚡tests/test_tests.py534 def test_table_at_end_of_file(self):CODE
LOW⚡tests/test_tests.py542 def test_table_at_end_with_no_trailing_newline(self):CODE
LOW⚡tests/test_tests.py550 def test_table_at_end_with_extra_spaces(self):CODE
LOW⚡tests/test_tests.py559 def test_table_at_end_with_mixed_whitespace(self):CODE
LOW⚡tests/test_tests.py567 def test_malformed_table_at_end(self):CODE
LOW⚡tests/test_tests.py580 def test_incomplete_table_at_end(self):CODE
LOW⚡tests/test_tests.py592 def test_table_with_excessive_blank_lines_at_end(self):CODE
LOW⚡tests/test_tests.py600 def test_table_at_end_after_long_text(self):CODE
LOW⚡tests/test_tests.py609 def test_valid_table_at_eof_without_newline(self):CODE
LOW⚡tests/test_tests.py2077 def test_empty_appears_before_validation(self):CODE
LOW⚡tests/test_tests.py2082 def test_empty_appears_after_validation(self):CODE
252 more matches not shown…
Redundant / Tautological Comments144 hits · 223 pts
SeverityFileLineSnippetContext
LOWtests/test_mine_html_templates_markdown.py288 # Check if tags are preserved in table cellsSTRING
LOWtests/test_mine_html_templates_mine_tests.py938 # Check if rendering was successfulSTRING
LOWolmocr/s3_utils.py76 # Check if it's actually a folder with contentsCOMMENT
LOWolmocr/pipeline.py1347 # Check if this is a tar.gz file (local)COMMENT
LOWolmocr/pipeline.py1410 # Add tarballs to the queue - each tarball is one work itemCOMMENT
LOWolmocr/bench/tests.py319 # Check if the text appears in any of the formatted texts using fuzzy matchingCOMMENT
LOWolmocr/bench/tests.py715 # Check if appears_before_marker is at the end of this text (using fuzzy matching)COMMENT
LOWolmocr/bench/tests.py741 # Check if appears_after_marker is at the beginning of this text (using fuzzy matching)COMMENT
LOWolmocr/bench/table_parsing.py284 # Check if this line has pipe characters (a table row indicator)COMMENT
LOWolmocr/bench/table_parsing.py359 # Check if this looks like a separator row (contains mostly dashes)COMMENT
LOWolmocr/bench/scripts/convert_all.sh121 # Check if environment existsCOMMENT
LOWolmocr/bench/scripts/convert_all.sh149 # Check if the server process is runningCOMMENT
LOWolmocr/bench/scripts/rotate_pdfs_random.sh6# Check if directory existsCOMMENT
LOWolmocr/bench/scripts/rotate_pdfs_random.sh12# Check if qpdf is installed (preferred for PDF rotation)COMMENT
LOWolmocr/bench/scripts/rotate_pdfs_random.sh28 # Check if any PDF files existCOMMENT
LOW⚡olmocr/bench/miners/mine_reading_order.py88 # Check if page number is validCOMMENT
LOWolmocr/bench/miners/mine_reading_order.py470 # Check if we've reached the maximum number of documentsCOMMENT
LOW⚡olmocr/bench/miners/mine_tables_gpt.py84 # Check if page number is validCOMMENT
LOW⚡olmocr/bench/miners/mine_blank_pages_gpt.py119 # Check if natural_text is nullCOMMENT
LOWolmocr/bench/miners/mine_blank_pages_gpt.py172 # Check if the page has null natural_textCOMMENT
LOW⚡olmocr/bench/miners/mine_tables_gemini.py92 # Check if page number is validCOMMENT
LOWolmocr/bench/miners/mine_tables_gemini.py432 # Check if we've reached the maximum number of testsCOMMENT
LOWolmocr/bench/miners/mine_multilingual_gpt.py169 # Check if the page contains a tableCOMMENT
LOW⚡olmocr/bench/miners/mine_long_tiny_text.py52 # Check if page number is validCOMMENT
LOW⚡olmocr/bench/miners/mine_headers_footers.py84 # Check if page number is validCOMMENT
LOWolmocr/bench/miners/delete_rejected.py38 # Check if the test is marked as rejectedCOMMENT
LOWolmocr/bench/miners/delete_rejected.py95 # Check if all tests for this PDF are in the rejected listCOMMENT
LOW⚡olmocr/bench/miners/mine_footnotes_gpt.py125 # Check if there are any footnotes in the listCOMMENT
LOWolmocr/bench/miners/mine_footnotes_gpt.py179 # Check if the page contains footnotesCOMMENT
LOW⚡olmocr/bench/miners/mine_old_scans_math.py52 # Check if page number is validCOMMENT
LOWolmocr/bench/miners/mine_tables_gpt_simple.py200 # Check if the page contains a tableCOMMENT
LOW⚡olmocr/bench/runners/run_mistral.py28 # Check if the requested page existsCOMMENT
LOW⚡olmocr/bench/runners/run_mistral.py39 temp_file.close() # Close the file but keep the nameCODE
LOW⚡olmocr/bench/runners/run_mineru.py22 # Check if the requested page existsCOMMENT
LOW⚡olmocr/bench/runners/run_mineru.py33 temp_file.close() # Close the file but keep the nameCODE
LOW⚡olmocr/bench/runners/run_marker.py43 # Check if the requested page existsCOMMENT
LOW⚡olmocr/bench/runners/run_marker.py54 temp_file.close() # Close the file but keep the nameCODE
LOW⚡olmocr/synth/mine_html_templates.py665 # Check if page number is validCOMMENT
LOWolmocr/synth/mine_html_templates.py157 # Check if it's a local pathCOMMENT
LOWolmocr/synth/mine_html_templates.py461 # Check if response was completeCOMMENT
LOWolmocr/synth/mine_html_templates.py508 # Check if response was completeCOMMENT
LOWolmocr/synth/mine_html_templates.py603 # Check if refinement response was completeCOMMENT
LOWolmocr/synth/mine_html_templates.py1866 # Check if this PDF has already been processed (skip logic for resume)COMMENT
LOWolmocr/synth/mine_html_templates.py885 # Check if this element has no children from our target tagsSTRING
LOWolmocr/synth/mine_html_templates.py1194 # Check if it's a numberSTRING
LOWolmocr/synth/mine_html_templates.py1198 # Check if it's a word (has at least one alphabetic character)STRING
LOWolmocr/synth/rotate_html_templates.py50 # Check if it's a symlinkCOMMENT
LOWolmocr/synth/rotate_html_templates.py117 # Check if file starts with FrontMatterCOMMENT
LOWolmocr/train/train.py119 # Check if we have any valid samplesCOMMENT
LOWolmocr/train/train.py654 # Check if we should do a gradient updateCOMMENT
LOWolmocr/train/train.py712 # Check if we've reached our training limitCOMMENT
LOW⚡olmocr/train/dataloader.py439 # Check if line looks like a table rowCOMMENT
LOW⚡olmocr/train/dataloader.py441 # Check if next line is a separator (for header rows)COMMENT
LOW⚡olmocr/train/dataloader.py446 # Check if previous line is a separator (for data rows)COMMENT
LOW⚡olmocr/train/dataloader.py662 # Check if there was an errorCOMMENT
LOW⚡olmocr/train/dataloader.py683 # Check if there are any tables in the textCOMMENT
LOW⚡olmocr/train/dataloader.py698 # Check if cell content contains <br> tags (any variation)COMMENT
LOW⚡olmocr/train/dataloader.py713 # Check if there are any <table> tags at allCOMMENT
LOWolmocr/train/dataloader.py346 # Check if image existsCOMMENT
LOWolmocr/train/dataloader.py350 # Check if page_data exists (we need to update it)COMMENT
84 more matches not shown…
Cross-Language Confusion34 hits · 194 pts
SeverityFileLineSnippetContext
HIGHtests/test_mine_html_templates_markdown.py444<div class="line-text">unknown and undefined, so the present study aimed to investigate characteristics of the DHLA-</diCODE
HIGHolmocr/pipeline.py181 r"---\nprimary_language: (?:[a-z]{2}|null)\nis_rotation_valid: (?:True|False|true|false)\nrotation_correCODE
HIGHolmocr/bench/review_app_latex.py442 let pdfDoc = null;CODE
HIGHolmocr/bench/review_app_latex.py444 let canvas = null;CODE
HIGHolmocr/bench/katex/render.py290 return null;CODE
HIGHolmocr/bench/katex/render.py329 list.push({CODE
HIGHolmocr/bench/miners/mine_blank_pages_gpt.py79 Optional[bool]: True if natural_text is null, False otherwise, None if detection failsSTRING
HIGHolmocr/bench/miners/mine_blank_pages_gpt.py79 Optional[bool]: True if natural_text is null, False otherwise, None if detection failsSTRING
HIGH⚡olmocr/bench/miners/mine_blank_pages_gpt.py119 # Check if natural_text is nullCOMMENT
HIGHolmocr/synth/cutoff_detection.py61 if (child.nodeType === Node.TEXT_NODE && child.textContent.trim()) {CODE
HIGHolmocr/synth/cutoff_detection.py68 leaves.push(el);CODE
HIGHolmocr/synth/cutoff_detection.py83 if (rect.width <= 0 || rect.height <= 0) continue;CODE
HIGHolmocr/synth/cutoff_detection.py109 let clippingAncestorTag = null;CODE
HIGHolmocr/synth/cutoff_detection.py123 if (clipsX || clipsY) {CODE
HIGHolmocr/synth/cutoff_detection.py142 (visLeft !== prevLeft || visTop !== prevTop ||CODE
HIGHolmocr/synth/cutoff_detection.py143 visRight !== prevRight || visBottom !== prevBottom)) {CODE
HIGHolmocr/synth/cutoff_detection.py166 results.push({CODE
HIGHolmocr/synth/cutoff_detection.py200 if (child.nodeType === Node.TEXT_NODE && child.textContent.trim()) {CODE
HIGHolmocr/synth/cutoff_detection.py205 if (hasDirectText) leaves.push(el);CODE
HIGH⚡olmocr/synth/cutoff_detection.py221 if (!bgColor || bgColor === 'rgba(0, 0, 0, 0)' || bgColor === 'transparent') return 0;CODE
HIGH⚡olmocr/synth/cutoff_detection.py231 if (rect.width <= 0 || rect.height <= 0) continue;CODE
HIGH⚡olmocr/synth/cutoff_detection.py238 if (!directText || directText.length < 3) continue;CODE
HIGH⚡olmocr/synth/cutoff_detection.py246 let blockerTag = null;CODE
HIGH⚡olmocr/synth/cutoff_detection.py252 if (px < 0 || py < 0) continue;CODE
HIGH⚡olmocr/synth/cutoff_detection.py256 if (topEl === el || isRelated(topEl, el)) continue;CODE
HIGHolmocr/synth/cutoff_detection.py269 results.push({CODE
HIGH⚡scripts/scan_dolmadocs.py1160 const primaryOption = activePrimaryButton ? activePrimaryButton.getAttribute('data-value') : null;CODE
HIGH⚡scripts/scan_dolmadocs.py1165 publicPiiOptions.push(checkbox.getAttribute('data-value'));CODE
HIGH⚡scripts/scan_dolmadocs.py1171 privatePiiOptions.push(checkbox.getAttribute('data-value'));CODE
HIGHscripts/scan_dolmadocs.py1058 status.onclick = null;CODE
HIGHscripts/scan_dolmadocs.py1343 if (data.publicPiiOptions && data.publicPiiOptions.length > 0) {CODE
HIGHscripts/scan_dolmadocs.py1357 if (data.privatePiiOptions && data.privatePiiOptions.length > 0) {CODE
HIGHscripts/scan_dolmadocs.py1528 if (event.target && event.target.id === 'start-button') {CODE
HIGHscripts/scan_dolmadocs.py1539 if (event.target && event.target.id === 'view-instructions-button') {CODE
Deep Nesting178 hits · 152 pts
SeverityFileLineSnippetContext
LOWtests/test_s3_work_queue.py224CODE
LOWtests/test_integration.py11CODE
LOWolmocr/s3_utils.py36CODE
LOWolmocr/s3_utils.py199CODE
LOWolmocr/s3_utils.py250CODE
LOWolmocr/s3_utils.py378CODE
LOWolmocr/pipeline.py106CODE
LOWolmocr/pipeline.py281CODE
LOWolmocr/pipeline.py382CODE
LOWolmocr/pipeline.py485CODE
LOWolmocr/pipeline.py698CODE
LOWolmocr/pipeline.py956CODE
LOWolmocr/pipeline.py1199CODE
LOWolmocr/bench/benchmark.py162CODE
LOWolmocr/bench/convert.py19CODE
LOWolmocr/bench/convert.py103CODE
LOWolmocr/bench/review_app.py38CODE
LOWolmocr/bench/review_app.py219CODE
LOWolmocr/bench/review_app_latex.py36CODE
LOWolmocr/bench/review_app_latex.py217CODE
LOWolmocr/bench/utils.py6CODE
LOWolmocr/bench/tests.py766CODE
LOWolmocr/bench/tests.py253CODE
LOWolmocr/bench/tests.py376CODE
LOWolmocr/bench/tests.py655CODE
LOWolmocr/bench/table_parsing.py83CODE
LOWolmocr/bench/table_parsing.py263CODE
LOWolmocr/bench/table_parsing.py390CODE
LOWolmocr/bench/report.py12CODE
LOWolmocr/bench/report.py42CODE
LOWolmocr/bench/katex/render.py414CODE
LOWolmocr/bench/katex/render.py475CODE
LOWolmocr/bench/katex/render.py517CODE
LOWolmocr/bench/scripts/workspace_to_bench.py25CODE
LOWolmocr/bench/scripts/difference_viewer.py15CODE
LOWolmocr/bench/scripts/difference_viewer.py64CODE
LOWolmocr/bench/scripts/url_matcher.py10CODE
LOWolmocr/bench/scripts/url_matcher.py29CODE
LOWolmocr/bench/scripts/rotate_pdfs.py10CODE
LOWolmocr/bench/miners/mine_reading_order.py330CODE
LOWolmocr/bench/miners/mine_reading_order.py426CODE
LOWolmocr/bench/miners/mine_reading_order.py483CODE
LOWolmocr/bench/miners/mine_tables_gpt.py189CODE
LOWolmocr/bench/miners/mine_diffs.py90CODE
LOWolmocr/bench/miners/mine_multi_column.py181CODE
LOWolmocr/bench/miners/mine_multi_column.py330CODE
LOWolmocr/bench/miners/mine_blank_pages_gpt.py204CODE
LOWolmocr/bench/miners/mine_tables_gemini.py205CODE
LOWolmocr/bench/miners/mine_tables_gemini.py398CODE
LOWolmocr/bench/miners/mine_tables_gemini.py445CODE
LOWolmocr/bench/miners/mine_old_scan_pdf.py9CODE
LOWolmocr/bench/miners/mine_multilingual_gpt.py201CODE
LOWolmocr/bench/miners/mine_long_tiny_text.py151CODE
LOWolmocr/bench/miners/cleanup_data.py10CODE
LOWolmocr/bench/miners/cleanup_data.py89CODE
LOWolmocr/bench/miners/delete_rejected.py10CODE
LOWolmocr/bench/miners/delete_rejected.py53CODE
LOWolmocr/bench/miners/mine_math.py84CODE
LOWolmocr/bench/miners/check_old_scans_math.py86CODE
LOWolmocr/bench/miners/mine_footnotes_gpt.py211CODE
118 more matches not shown…
Empty Error Handlers30 hits · 150 pts
SeverityFileLineSnippetContext
HIGHtests/test_tests.py2214except Exception as e:CODE
HIGHolmocr/pipeline.py1050except BeakerSecretNotFound:CODE
HIGHolmocr/pipeline.py475except:CODE
HIGHolmocr/bench/katex/render.py179except Exception:CODE
HIGHolmocr/bench/katex/render.py183except Exception:CODE
HIGHolmocr/bench/katex/render.py224except Exception:CODE
HIGHolmocr/bench/miners/mine_reading_order.py314except (ValueError, TypeError):CODE
HIGHolmocr/synth/mine_html_templates.py1735except Exception:CODE
HIGHolmocr/synth/mine_html_templates.py1166except Exception:CODE
HIGHolmocr/synth/mine_html_templates.py1286except Exception:CODE
HIGHolmocr/synth/mine_html_templates.py1593except Exception:CODE
HIGHolmocr/synth/mine_html_templates.py1470except Exception:CODE
HIGHolmocr/filter/filter.py202except StopIteration:CODE
HIGHolmocr/data/prepare_national_archive_transcripts.py403except:CODE
HIGHolmocr/data/prepare_loc_transcripts.py282except:CODE
HIGHolmocr/data/prepare_olmocrmix.py84except (TypeError, ValueError):CODE
HIGHolmocr/data/prepare_olmocrmix.py122except json.JSONDecodeError:CODE
HIGHolmocr/data/repackage_olmocrmix.py126except (TypeError, ValueError):CODE
HIGHolmocr/data/runopenaibatch.py74except (TypeError, ValueError):CODE
HIGHscripts/scan_dolmadocs.py1675except (ValueError, TypeError):CODE
HIGHscripts/scan_dolmadocs.py1608except (ValueError, TypeError):CODE
HIGHscripts/pii/rich_tagging_pipeline.py785except BeakerSecretNotFound:CODE
HIGHscripts/pii/rich_tagging_pipeline.py646except asyncio.CancelledError:CODE
HIGHscripts/pii/rich_tagging_pipeline.py306except:CODE
HIGHscripts/pii/pii_rule_comparison.py1324except (ValueError, TypeError):CODE
HIGHscripts/pii/tagging_pipeline.py617except BeakerSecretNotFound:CODE
HIGHscripts/pii/tagging_pipeline.py478except asyncio.CancelledError:CODE
HIGHscripts/pii/tagging_pipeline.py232except:CODE
HIGHscripts/eval/runeval.py95except json.JSONDecodeError:CODE
HIGHscripts/data/runopenaibatch.py74except (TypeError, ValueError):CODE
Cross-File Repetition26 hits · 130 pts
SeverityFileLineSnippetContext
HIGHolmocr/bench/miners/mine_reading_order.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_tables_gpt.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_blank_pages_gpt.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_tables_gemini.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_multilingual_gpt.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_headers_footers.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_footnotes_gpt.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_length_gpt_simple.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_tables_gpt_simple.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_reading_order.py0extract a specific page from a pdf and save it as a new pdf. args: input_path: path to the input pdf output_path: path tSTRING
HIGHolmocr/bench/miners/mine_tables_gpt.py0extract a specific page from a pdf and save it as a new pdf. args: input_path: path to the input pdf output_path: path tSTRING
HIGHolmocr/bench/miners/mine_tables_gemini.py0extract a specific page from a pdf and save it as a new pdf. args: input_path: path to the input pdf output_path: path tSTRING
HIGHolmocr/bench/miners/mine_long_tiny_text.py0extract a specific page from a pdf and save it as a new pdf. args: input_path: path to the input pdf output_path: path tSTRING
HIGHolmocr/bench/miners/mine_headers_footers.py0extract a specific page from a pdf and save it as a new pdf. args: input_path: path to the input pdf output_path: path tSTRING
HIGHolmocr/bench/miners/mine_old_scans_math.py0extract a specific page from a pdf and save it as a new pdf. args: input_path: path to the input pdf output_path: path tSTRING
HIGHolmocr/bench/miners/mine_blank_pages_gpt.py0process a single pdf from s3. args: s3_path: s3 path to the pdf temp_dir: directory for temporary files output_dir: direSTRING
HIGHolmocr/bench/miners/mine_multilingual_gpt.py0process a single pdf from s3. args: s3_path: s3 path to the pdf temp_dir: directory for temporary files output_dir: direSTRING
HIGHolmocr/bench/miners/mine_tables_gpt_simple.py0process a single pdf from s3. args: s3_path: s3 path to the pdf temp_dir: directory for temporary files output_dir: direSTRING
HIGHolmocr/bench/miners/mine_footnotes_gpt.py0process a single pdf from s3. args: s3_path: s3 path to the pdf temp_dir: directory for temporary files output_dir: direSTRING
HIGHolmocr/bench/miners/mine_length_gpt_simple.py0process a single pdf from s3. args: s3_path: s3 path to the pdf temp_dir: directory for temporary files output_dir: direSTRING
HIGHolmocr/bench/runners/run_transformers.py0convert page of a pdf file to markdown by calling a request running against an openai compatible server. you can use thiSTRING
HIGHolmocr/bench/runners/run_nanonetsocr_2.py0convert page of a pdf file to markdown by calling a request running against an openai compatible server. you can use thiSTRING
HIGHolmocr/bench/runners/run_server.py0convert page of a pdf file to markdown by calling a request running against an openai compatible server. you can use thiSTRING
HIGHscripts/pii/rich_tagging_pipeline.py0you are a document analyzer that identifies personally identifiable information (pii) in documents. your task is to analSTRING
HIGHscripts/pii/autoscan_dolmadocs.py0you are a document analyzer that identifies personally identifiable information (pii) in documents. your task is to analSTRING
HIGHscripts/pii/chatgpt_tag_dolmadocs_v1.py0you are a document analyzer that identifies personally identifiable information (pii) in documents. your task is to analSTRING
Unused Imports60 hits · 59 pts
SeverityFileLineSnippetContext
LOWtests/test_mine_html_templates_markdown.py1CODE
LOWtests/test_mine_html_templates_markdown.py3CODE
LOWtests/test_mine_html_templates_markdown.py3CODE
LOWtests/test_mine_html_templates_markdown.py5CODE
LOWtests/test_mine_html_templates_markdown.py7CODE
LOWtests/test_mine_html_templates_markdown.py8CODE
LOWtests/test_mine_html_templates_markdown.py8CODE
LOWtests/test_mine_html_templates_markdown.py8CODE
LOWtests/test_dataloader.py6CODE
LOWtests/test_mine_html_templates_mine_tests.py3CODE
LOWtests/test_mine_html_templates_mine_tests.py3CODE
LOWtests/test_mine_html_templates_mine_tests.py5CODE
LOWtests/test_mine_html_templates_mine_tests.py7CODE
LOWtests/test_mine_html_templates_mine_tests.py8CODE
LOWtests/test_mine_html_templates_mine_tests.py8CODE
LOWtests/test_filter.py4CODE
LOWtests/test_cutoff_detection.py6CODE
LOWtests/test_mine_html_templates_metadata.py1CODE
LOWtests/test_mine_html_templates_metadata.py3CODE
LOWtests/test_mine_html_templates_metadata.py3CODE
LOWtests/test_mine_html_templates_metadata.py5CODE
LOWtests/test_mine_html_templates_metadata.py7CODE
LOWtests/test_mine_html_templates_metadata.py8CODE
LOWtests/test_mine_html_templates_metadata.py8CODE
LOWtests/test_mine_html_templates_metadata.py8CODE
LOWtests/test_grpo.py13CODE
LOWtests/test_anchor.py16CODE
LOWtests/test_anchor.py17CODE
LOWtests/test_anchor.py69CODE
LOWtests/test_anchor.py70CODE
LOWtests/test_mine_html_templates_formatting.py3CODE
LOWtests/test_mine_html_templates_formatting.py3CODE
LOWtests/test_mine_html_templates_formatting.py5CODE
LOWtests/test_mine_html_templates_formatting.py7CODE
LOWtests/test_mine_html_templates_formatting.py8CODE
LOWtests/test_mine_html_templates_formatting.py8CODE
LOWtests/test_table_parsing.py3CODE
LOWtests/test_mine_html_templates_incomplete_content.py5CODE
LOWtests/test_mine_html_templates_incomplete_content.py5CODE
LOWtests/test_mine_html_templates_incomplete_content.py7CODE
LOWtests/test_mine_html_templates_incomplete_content.py9CODE
LOWtests/test_mine_html_templates_introduce_text_errors.py4CODE
LOWtests/test_mine_html_templates_math_extraction.py5CODE
LOWtests/test_mine_html_templates_math_extraction.py7CODE
LOWtests/test_mine_html_templates_math_extraction.py8CODE
LOWtests/test_mine_html_templates_math_extraction.py8CODE
LOWtests/test_mine_html_templates_math_extraction.py8CODE
LOWolmocr/__init__.py1CODE
LOWolmocr/__init__.py1CODE
LOWolmocr/bench/katex/__init__.py1CODE
LOWolmocr/bench/katex/__init__.py1CODE
LOWolmocr/prompts/__init__.py1CODE
LOWolmocr/prompts/__init__.py1CODE
LOWolmocr/prompts/__init__.py1CODE
LOWolmocr/prompts/__init__.py1CODE
LOWolmocr/prompts/__init__.py1CODE
LOWolmocr/prompts/__init__.py1CODE
LOWolmocr/prompts/__init__.py1CODE
LOWolmocr/filter/__init__.py1CODE
LOWolmocr/data/repackage_olmocrmix.py12CODE
Verbosity Indicators31 hits · 48 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_olmocrmix.py17 # Step 1: Repackage the sample dataset into parquet + tarballsCOMMENT
LOWtests/test_olmocrmix.py44 # Step 2: Repackage the sample dataset into parquet + tarballsCOMMENT
LOW⚡olmocr/bench/scripts/url_matcher.py35 # Step 1: Get all local JSONL filesCOMMENT
LOW⚡olmocr/bench/scripts/url_matcher.py39 # Step 2: Extract URLs from local filesCOMMENT
LOW⚡olmocr/bench/scripts/url_matcher.py58 # Step 3: Load Hugging Face datasetCOMMENT
LOW⚡olmocr/bench/scripts/url_matcher.py64 # Step 4: Extract URLs from Hugging Face datasetCOMMENT
LOW⚡olmocr/bench/scripts/url_matcher.py79 # Step 5: Find matchesCOMMENT
LOW⚡olmocr/bench/scripts/url_matcher.py82 # Step 6: Group matches by local file with metadataCOMMENT
LOW⚡olmocr/synth/mine_html_templates.py529 # Step 3: Render the initial HTML to PDF and then back to PNG for comparisonCOMMENT
LOWolmocr/synth/mine_html_templates.py390 # Step 0: Check that the orientation of the original document is right-side-up. If not, we willCOMMENT
LOWolmocr/synth/mine_html_templates.py436 # Step 1: Initial analysis and column detectionCOMMENT
LOWolmocr/synth/mine_html_templates.py476 # Step 2: Initial HTML generation with detailed layout instructionsCOMMENT
LOWolmocr/synth/mine_html_templates.py562 # Step 4: Refinement - Show both images to Claude and ask for correctionsCOMMENT
LOW⚡olmocr/synth/mine_html_templates.py861 # Step 1: Process headers, footers, and page numbers for TextAbsenceTestsSTRING
LOW⚡olmocr/synth/mine_html_templates.py1476 # Step 6: Generate FootnoteTests for footnotes on the pageSTRING
LOWolmocr/synth/mine_html_templates.py943 # Step 2: Generate tests from tables using parse_html_tablesSTRING
LOWolmocr/synth/mine_html_templates.py1054 # Step 3: Generate TextPresenceTests and OrderingTests from markdown contentSTRING
LOWolmocr/synth/mine_html_templates.py1368 # Step 4: Generate Math tests for LaTeX equations from the markdownSTRING
LOWolmocr/synth/mine_html_templates.py1409 # Step 5: Generate FormatTests for headings, bold, and italic textSTRING
LOW⚡olmocr/synth/rotate_html_templates.py234 # Step 1: Copy entire directory structureCOMMENT
LOW⚡olmocr/synth/rotate_html_templates.py241 # Step 2: Find all PDFs in the destination bench_data/pdfs directoryCOMMENT
LOW⚡olmocr/synth/rotate_html_templates.py262 # Step 3: Select PDFs to rotate based on percentageCOMMENT
LOW⚡olmocr/synth/rotate_html_templates.py271 # Step 4: Rotate selected PDFs and update corresponding markdown filesCOMMENT
LOWolmocr/data/prepare_olmocrmix.py148 # Step 1: Download dataset using hugging face hub snapshot_download to destination/hugging_face folderCOMMENT
LOWolmocr/data/prepare_olmocrmix.py197 # Step 2: Create destination folder structure for processed markdown filesCOMMENT
LOW⚡olmocr/data/prepare_olmocrmix.py216 # Step 3: Extract PDF tarballsCOMMENT
LOW⚡olmocr/data/prepare_olmocrmix.py265 # Step 4: Process parquet filesCOMMENT
LOW⚡scripts/check_contamination.py197 # Step 1: Get all URLs from bench dataCOMMENT
LOW⚡scripts/check_contamination.py202 # Step 2: Read metadata JSONL and process source URLsCOMMENT
LOWscripts/check_contamination.py216 # Step 3: Map URLs to hashes and query databaseCOMMENT
LOWscripts/check_contamination.py285 # Step 4: Check for contaminationCOMMENT
Structural Annotation Overuse31 hits · 48 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_olmocrmix.py17 # Step 1: Repackage the sample dataset into parquet + tarballsCOMMENT
LOWtests/test_olmocrmix.py44 # Step 2: Repackage the sample dataset into parquet + tarballsCOMMENT
LOW⚡olmocr/bench/scripts/url_matcher.py35 # Step 1: Get all local JSONL filesCOMMENT
LOW⚡olmocr/bench/scripts/url_matcher.py39 # Step 2: Extract URLs from local filesCOMMENT
LOW⚡olmocr/bench/scripts/url_matcher.py58 # Step 3: Load Hugging Face datasetCOMMENT
LOW⚡olmocr/bench/scripts/url_matcher.py64 # Step 4: Extract URLs from Hugging Face datasetCOMMENT
LOW⚡olmocr/bench/scripts/url_matcher.py79 # Step 5: Find matchesCOMMENT
LOW⚡olmocr/bench/scripts/url_matcher.py82 # Step 6: Group matches by local file with metadataCOMMENT
LOW⚡olmocr/synth/mine_html_templates.py529 # Step 3: Render the initial HTML to PDF and then back to PNG for comparisonCOMMENT
LOWolmocr/synth/mine_html_templates.py390 # Step 0: Check that the orientation of the original document is right-side-up. If not, we willCOMMENT
LOWolmocr/synth/mine_html_templates.py436 # Step 1: Initial analysis and column detectionCOMMENT
LOWolmocr/synth/mine_html_templates.py476 # Step 2: Initial HTML generation with detailed layout instructionsCOMMENT
LOWolmocr/synth/mine_html_templates.py562 # Step 4: Refinement - Show both images to Claude and ask for correctionsCOMMENT
LOW⚡olmocr/synth/mine_html_templates.py861 # Step 1: Process headers, footers, and page numbers for TextAbsenceTestsSTRING
LOW⚡olmocr/synth/mine_html_templates.py1476 # Step 6: Generate FootnoteTests for footnotes on the pageSTRING
LOWolmocr/synth/mine_html_templates.py943 # Step 2: Generate tests from tables using parse_html_tablesSTRING
LOWolmocr/synth/mine_html_templates.py1054 # Step 3: Generate TextPresenceTests and OrderingTests from markdown contentSTRING
LOWolmocr/synth/mine_html_templates.py1368 # Step 4: Generate Math tests for LaTeX equations from the markdownSTRING
LOWolmocr/synth/mine_html_templates.py1409 # Step 5: Generate FormatTests for headings, bold, and italic textSTRING
LOW⚡olmocr/synth/rotate_html_templates.py234 # Step 1: Copy entire directory structureCOMMENT
LOW⚡olmocr/synth/rotate_html_templates.py241 # Step 2: Find all PDFs in the destination bench_data/pdfs directoryCOMMENT
LOW⚡olmocr/synth/rotate_html_templates.py262 # Step 3: Select PDFs to rotate based on percentageCOMMENT
LOW⚡olmocr/synth/rotate_html_templates.py271 # Step 4: Rotate selected PDFs and update corresponding markdown filesCOMMENT
LOWolmocr/data/prepare_olmocrmix.py148 # Step 1: Download dataset using hugging face hub snapshot_download to destination/hugging_face folderCOMMENT
LOWolmocr/data/prepare_olmocrmix.py197 # Step 2: Create destination folder structure for processed markdown filesCOMMENT
LOW⚡olmocr/data/prepare_olmocrmix.py216 # Step 3: Extract PDF tarballsCOMMENT
LOW⚡olmocr/data/prepare_olmocrmix.py265 # Step 4: Process parquet filesCOMMENT
LOW⚡scripts/check_contamination.py197 # Step 1: Get all URLs from bench dataCOMMENT
LOW⚡scripts/check_contamination.py202 # Step 2: Read metadata JSONL and process source URLsCOMMENT
LOWscripts/check_contamination.py216 # Step 3: Map URLs to hashes and query databaseCOMMENT
LOWscripts/check_contamination.py285 # Step 4: Check for contaminationCOMMENT
Over-Commented Block23 hits · 21 pts
SeverityFileLineSnippetContext
LOWolmocr/bench/scripts/convert_all.sh221# Run raw server benchmarks with generic server functionCOMMENT
LOWolmocr/bench/scripts/convert_all.sh241COMMENT
LOWolmocr/synth/mine_html_templates.py1281 # Run the test against the markdown contentCOMMENT
LOWolmocr/synth/mine_html_templates.py1301COMMENT
LOWolmocr/synth/mine_html_templates.py1321 # # Calculate similarity scores for each absent wordCOMMENT
LOWolmocr/synth/mine_html_templates.py1341COMMENT
LOW…igs/v0.5.0/qwen3_vl_olmocrv5_1epoch_mix_1025_mini.yaml61 # - name: processed_00_documents_eval_s2pdfCOMMENT
LOWolmocr/data/prepare_national_archive_transcripts.py1# This script prepares transcriptions from the National Archives into a format usable by olmOCRCOMMENT
LOWolmocr/data/prepare_national_archive_transcripts.py21# "objectFileSize": 9496446,COMMENT
LOWolmocr/data/prepare_national_archive_transcripts.py41# "userId": "dff3eed0-38e5-35fc-b7e7-d2d58b023262",COMMENT
LOWolmocr/data/prepare_national_archive_transcripts.py61# }COMMENT
LOWscripts/remove_paths_from_olmocrmix.py1# This code takes in a path to an olmocr-mix processed data folderCOMMENT
LOWscripts/run_transformers_benchmark.sh1#!/bin/bashCOMMENT
LOWscripts/run_server_benchmark.sh1#!/bin/bashCOMMENT
LOWscripts/check_contamination.py1#!/usr/bin/env python3COMMENT
LOWscripts/run_dots_mocr_benchmark.sh1#!/bin/bashCOMMENT
LOWscripts/run_api_benchmark.sh1#!/bin/bashCOMMENT
LOWscripts/run_mineru_benchmark.sh1#!/bin/bashCOMMENT
LOWscripts/run_benchmark.sh1#!/bin/bashCOMMENT
LOWscripts/run_qianfan_benchmark.sh1#!/bin/bashCOMMENT
LOWscripts/run_infrapartner_benchmark.sh1#!/bin/bashCOMMENT
LOWscripts/run_chandra_benchmark.sh1#!/bin/bashCOMMENT
LOW.github/workflows/main.yml301 # with:COMMENT
Docstring Block Structure4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHolmocr/image_utils.py7 Convert one or multiple image files to PDF bytes. Args: image_files: A single image file path (str) orSTRING
HIGHolmocr/bench/tests.py767 Load a single test from a JSON line string or JSON object. Args: data: Either a JSON string to parse oSTRING
HIGHolmocr/data/renderpdf.py74 Returns the (width, height) of a PNG image given its base64-encoded data, without base64-decoding the entire daSTRING
HIGHscripts/pii/pii_rule_comparison.py1411 Generate HTML section with CDF plots for all numeric attributes. Args: numeric_attributes: Dictionary STRING
Modern Structural Boilerplate18 hits · 18 pts
SeverityFileLineSnippetContext
LOWolmocr/check.py6logger = logging.getLogger(__name__)CODE
LOWolmocr/s3_utils.py22logger = logging.getLogger(__name__)CODE
LOWolmocr/pipeline.py55logger = logging.getLogger(__name__)CODE
LOWolmocr/work_queue.py23logger = logging.getLogger(__name__)CODE
LOWolmocr/bench/runners/run_gemini.py24logger = logging.getLogger(__name__)CODE
LOWolmocr/bench/runners/run_chatgpt.py28logger = logging.getLogger(__name__)CODE
LOWolmocr/train/front_matter.py18logger = logging.getLogger(__name__)CODE
LOWolmocr/train/train.py37logger = logging.getLogger(__name__)CODE
LOWolmocr/train/grpo_train.py46logger = logging.getLogger(__name__)CODE
LOWolmocr/train/dataloader.py39logger = logging.getLogger(__name__)CODE
LOWolmocr/train/compare_vllm_checkpoint.py28logger = logging.getLogger(__name__)CODE
LOWolmocr/filter/filter.py10logger = logging.getLogger(__name__)CODE
LOWolmocr/data/prepare_workspace.py29logger = logging.getLogger(__name__)CODE
LOWscripts/pii/rich_tagging_pipeline.py42logger = logging.getLogger(__name__)CODE
LOWscripts/pii/pii_rule_comparison.py59logger = logging.getLogger(__name__)CODE
LOWscripts/pii/chatgpt_tag_dolmadocs_v1.py32logger = logging.getLogger(__name__)CODE
LOWscripts/pii/chatgpt_tag_dolmadocs_v2.py32logger = logging.getLogger(__name__)CODE
LOWscripts/pii/tagging_pipeline.py42logger = logging.getLogger(__name__)CODE
Slop Phrases6 hits · 12 pts
SeverityFileLineSnippetContext
LOWolmocr/pipeline.py470 # But just make sure to close the socket on your way outCOMMENT
MEDIUMolmocr/data/buildsilver.py39 # Ask for logprobs, it's not any more expensive and you can use them later to help identify problematic responsesCOMMENT
LOWscripts/pii/rich_tagging_pipeline.py301 # But just make sure to close the socket on your way outSTRING
LOWscripts/pii/tagging_pipeline.py227 # But just make sure to close the socket on your way outCOMMENT
MEDIUMscripts/data/buildsilver.py39 # Ask for logprobs, it's not any more expensive and you can use them later to help identify problematic responsesCOMMENT
MEDIUM.github/workflows/main.yml298 # jakep: (you can try by setting load: true above, but you'll need a larger runner)COMMENT
Example Usage Blocks6 hits · 10 pts
SeverityFileLineSnippetContext
LOWolmocr/bench/runners/run_olmocr_pipeline.py100 # Example usageCOMMENT
LOWscripts/run_dots_mocr_benchmark.sh5# Usage:COMMENT
LOW⚡scripts/jsonl_to_markdown.py40# Example usageCOMMENT
LOWscripts/run_qianfan_benchmark.sh8# Usage:COMMENT
LOWscripts/run_chandra_benchmark.sh4# Usage:COMMENT
LOWscripts/eval/scoreelo.py288 # Example usageCOMMENT
Modern AI Meta-Vocabulary3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMolmocr/data/buildsilver.py37 # Also, structured outputs let you cheat, because the order in which fields are in your schema, is the order in whicCOMMENT
MEDIUMscripts/data/buildsilver.py37 # Also, structured outputs let you cheat, because the order in which fields are in your schema, is the order in whicCOMMENT
MEDIUMscripts/plots/plot_olmocr2_timeline.py210 # "descriptor": "Fixing bug with blank page hallucinations",COMMENT
Decorative Section Separators4 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMscripts/pii/rich_tagging_pipeline.py511 # ------------------------------------------------------------------STRING
MEDIUMscripts/pii/rich_tagging_pipeline.py513 # ------------------------------------------------------------------STRING
MEDIUMscripts/pii/tagging_pipeline.py346 # ------------------------------------------------------------------COMMENT
MEDIUMscripts/pii/tagging_pipeline.py348 # ------------------------------------------------------------------COMMENT
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHolmocr/data/prepare_national_archive_transcripts.py246 # Skip if AI generated tagsCOMMENT
Fake / Example Data2 hits · 3 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_tests.py604 long_text = "Lorem ipsum dolor sit amet, " * 100CODE
LOW⚡tests/test_tests.py604 long_text = "Lorem ipsum dolor sit amet, " * 100CODE
Overly Generic Function Names1 hit · 2 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_mine_html_templates_introduce_text_errors.py194 <script>function doSomething() { return value; }</script>CODE
AI Structural Patterns1 hit · 1 pts
SeverityFileLineSnippetContext
LOWolmocr/bench/runners/run_dotsocr.py147CODE