Notebooks using the Hugging Face libraries 🤗
This report summarizes scanner evidence for huggingface/notebooks, a Jupyter Notebook project with 4,640 GitHub stars. SynthScan examined 5,587 lines of code across 50 source files, recording 54 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 10.5 (Moderate 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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 26 finding(s).
Are imports declared and package/API names verified? 26 finding(s).
Are wrappers, guards, and repeated structures necessary? 12 finding(s).
Which changes need focused human review? 54 finding(s).
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.
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.
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.
The scanner identified 54 distinct pattern matches across 8 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | longform-qa/lfqa_utils.py | 3 | CODE | |
| LOW | longform-qa/lfqa_utils.py | 13 | CODE | |
| LOW | longform-qa/lfqa_utils.py | 14 | CODE | |
| LOW | longform-qa/lfqa_utils.py | 16 | CODE | |
| LOW | longform-qa/lfqa_utils.py | 17 | CODE | |
| LOW | …age_classification_vision_transformer/scripts/train.py | 1 | CODE | |
| LOW | …age_classification_vision_transformer/scripts/train.py | 3 | CODE | |
| LOW | sagemaker/01_getting_started_pytorch/scripts/train.py | 4 | CODE | |
| LOW | sagemaker/01_getting_started_pytorch/scripts/train.py | 9 | CODE | |
| LOW | sagemaker/14_train_and_push_to_hub/scripts/train.py | 4 | CODE | |
| LOW | sagemaker/14_train_and_push_to_hub/scripts/train.py | 8 | CODE | |
| LOW | sagemaker/15_training_compiler/scripts/train.py | 4 | CODE | |
| LOW | sagemaker/15_training_compiler/scripts/train.py | 8 | CODE | |
| LOW | sagemaker/05_spot_instances/scripts/train.py | 4 | CODE | |
| LOW | sagemaker/05_spot_instances/scripts/train.py | 8 | CODE | |
| LOW | sagemaker/28_train_llms_with_qlora/scripts/run_clm.py | 1 | CODE | |
| LOW | sagemaker/28_train_llms_with_qlora/scripts/run_clm.py | 14 | CODE | |
| LOW | sagemaker/28_train_llms_with_qlora/scripts/run_clm.py | 14 | CODE | |
| LOW | …r/25_pytorch_fsdp_model_parallelism/scripts/run_clm.py | 1 | CODE | |
| LOW | sagemaker/24_train_bloom_peft_lora/scripts/inference.py | 2 | CODE | |
| LOW | sagemaker/06_sagemaker_metrics/scripts/train.py | 4 | CODE | |
| LOW | sagemaker/06_sagemaker_metrics/scripts/train.py | 9 | CODE | |
| LOW | sagemaker/26_document_ai_donut/scripts/train.py | 3 | CODE | |
| LOW | sagemaker/26_document_ai_donut/scripts/train.py | 3 | CODE | |
| LOW | sagemaker/26_document_ai_donut/scripts/train.py | 3 | CODE | |
| LOW | sagemaker/26_document_ai_donut/scripts/train.py | 15 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | utils/convert_doc_to_notebooks.py | 49 | def _move_to_next_non_empty_line(i): | CODE |
| LOW | utils/convert_doc_to_notebooks.py | 379 | def convert_rst_file_to_notebook( | STRING |
| LOW | longform-qa/lfqa_utils.py | 124 | def embed_sentences_checkpointed(self, input_ids, attention_mask, checkpoint_batch_size=-1): | CODE |
| LOW | longform-qa/lfqa_utils.py | 244 | def train_qa_retriever_joint_epoch(model, dataset_list, tokenizer, optimizer, scheduler, args, e=0): | CODE |
| LOW | longform-qa/lfqa_utils.py | 533 | def embed_passages_for_retrieval(passages, tokenizer, qa_embedder, max_length=128, device="cuda:0"): | CODE |
| LOW | longform-qa/lfqa_utils.py | 544 | def embed_questions_for_retrieval(q_ls, tokenizer, qa_embedder, device="cuda:0"): | CODE |
| LOW | longform-qa/lfqa_utils.py | 609 | def batch_query_qa_dense_index(questions, qa_embedder, tokenizer, wiki_passages, wiki_index, n_results=10): | CODE |
| LOW | longform-qa/lfqa_utils.py | 639 | def batch_query_qa_dense_index_nn(passages, qa_embedder, tokenizer, wiki_passages, wiki_index, n_results=10): | CODE |
| LOW | …r/25_pytorch_fsdp_model_parallelism/scripts/run_clm.py | 15 | def safe_save_model_for_hf_trainer(trainer: Trainer, tokenizer: AutoTokenizer, output_dir: str): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | course/en/chapter13/grpo_format.py | 47 | CODE | |
| LOW | course/en/chapter13/grpo_format.py | 66 | CODE | |
| LOW | utils/convert_doc_to_notebooks.py | 42 | CODE | |
| LOW | utils/convert_doc_to_notebooks.py | 306 | CODE | |
| LOW | utils/convert_doc_to_notebooks.py | 379 | CODE | |
| LOW | …xamples/src/text-classification/train_using_s3_data.py | 51 | CODE | |
| LOW | …gemaker_examples/src/seq2seq/run_seq2seq_no_trainer.py | 383 | CODE | |
| LOW | …gemaker_examples/src/seq2seq/run_seq2seq_no_trainer.py | 474 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …er/32_train_deploy_embedding_models/scripts/run_mnr.py | 65 | # Create a mapping of relevant document (1 in our case) for each query | COMMENT |
| MEDIUM | …er/32_train_deploy_embedding_models/scripts/run_mnr.py | 83 | # Create a sequential evaluator | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | sagemaker/14_train_and_push_to_hub/README.md | 1 | # SageMaker push to hf.co/models example | COMMENT |
| LOW | …xamples/src/text-classification/train_using_s3_data.py | 1 | # coding=utf-8 | COMMENT |
| LOW | …xamples/src/text-classification/train_using_s3_data.py | 21 | COMMENT | |
| LOW | …gemaker_examples/src/seq2seq/run_seq2seq_no_trainer.py | 1 | #!/usr/bin/env python | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | course/en/chapter13/grpo_format.py | 120 | # Display the results | COMMENT |
| LOW | course/en/chapter13/grpo_math.py | 120 | # Display the results | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | course/en/chapter13/grpo_math.py | 107 | except Exception: | CODE |
| LOW | …s/idefics_zero3_finetuning/idefics_zero3_finetuning.py | 59 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | longform-qa/lfqa_utils.py | 494 | CODE |