AI Slop Code RIsk Monitor

huggingface/datasets

🤗 The largest hub of ready-to-use datasets for AI models with fast, easy-to-use and efficient data manipulation tools

25.6 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for huggingface/datasets, a Python project with 22,045 GitHub stars. SynthScan examined 99,972 lines of code across 299 source files, recording 2232 pattern matches distributed across 18 syntactic categories. The legacy adjusted pattern signal is 25.6 (Elevated 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.

25.6
Adjusted Signal
25.6
Raw Pattern Score
100%
Time Factor
2026-10-08
Last Push
22.0K
Stars
Python
Language
100.0K
Lines of Code
299
Files
2.2K
Pattern Hits
2026-10-12
Scan Date
0.32
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 57.7/100 · HIGH

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

Hallucinated Dependency & Supply Chain Risk 11.7/100 · LOW

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

Agent Over-Engineering Ratio 61.8/100 · HIGH

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

PR Review Velocity Impact 76.4/100 · CRITICAL

Which changes need focused human review? 2232 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 97MEDIUM 85LOW 2050

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 2232 distinct pattern matches across 18 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.

Hyper-Verbose Identifiers1483 hits · 1298 pts
SeverityFileLineSnippetContext
LOWtests/test_streaming_download_manager.py30def test_streaming_dl_manager_download_dummy_path():CODE
LOWtests/test_streaming_download_manager.py36def test_streaming_dl_manager_download_dummy_url():CODE
LOW⚡tests/test_streaming_download_manager.py51def test_streaming_dl_manager_extract_throws(urlpath):CODE
LOW⚡tests/test_streaming_download_manager.py56def test_streaming_dl_manager_download(text_path):CODE
LOW⚡tests/test_streaming_download_manager.py64def test_streaming_dl_manager_download_and_extract_no_extraction_dummy_path():CODE
LOW⚡tests/test_streaming_download_manager.py70def test_streaming_dl_manager_download_and_extract_no_extraction_dummy_url():CODE
LOW⚡tests/test_streaming_download_manager.py76def test_streaming_dl_manager_extract(text_gz_path, text_path):CODE
LOWtests/test_streaming_download_manager.py88def test_iter_files_in_archive(archive_jsonl, request):CODE
LOWtests/test_streaming_download_manager.py96def test_streaming_dl_manager_download_and_extract_with_extraction(text_gz_path, text_path):CODE
LOWtests/test_streaming_download_manager.py111def test_streaming_dl_manager_download_and_extract_with_join(input_path, filename, expected_path):CODE
LOWtests/test_streaming_download_manager.py119def test_streaming_dl_manager_extract_all_supported_single_file_compression_types(CODE
LOW⚡tests/test_streaming_download_manager.py143def test_streaming_gg_drive_no_extract():CODE
LOW⚡tests/test_streaming_download_manager.py151def test_streaming_gg_drive_gzipped():CODE
LOW⚡tests/test_streaming_download_manager.py159def test_streaming_gg_drive_zipped():CODE
LOWtests/test_dataset_list.py27 def test_list_dict_equivalent(self):CODE
LOWtests/test_dataset_list.py39 def test_variable_list_records(self): # checks if the type can be inferred from the second recordCODE
LOW⚡tests/test_fingerprint.py162 def test_recurse_hash_for_class(self):CODE
LOW⚡tests/test_fingerprint.py169 def test_recurse_hash_for_method(self):CODE
LOW⚡tests/test_fingerprint.py176 def test_hash_ipython_function(self):CODE
LOWtests/test_fingerprint.py113 def test_hash_tokenizer_with_cache(self):CODE
LOWtests/test_fingerprint.py137 def test_recurse_hash_for_function(self):CODE
LOWtests/test_fingerprint.py150 def test_hash_ignores_line_definition_of_function(self):CODE
LOWtests/test_fingerprint.py204 def test_recurse_hash_for_function_with_shuffled_globals(self):CODE
LOWtests/test_fingerprint.py242 def test_hash_arrow_table_is_independent_of_chunking(self):CODE
LOWtests/test_fingerprint.py300 def test_set_doesnt_depend_on_order(self):CODE
LOWtests/test_fingerprint.py311 def test_hash_tiktoken_encoding(self):CODE
LOWtests/test_fingerprint.py339 def test_hash_torch_generator(self):CODE
LOWtests/test_fingerprint.py367 def test_hash_torch_compiled_function(self):CODE
LOWtests/test_fingerprint.py380 def test_hash_torch_compiled_module(self):CODE
LOWtests/test_fingerprint.py396def test_move_script_doesnt_change_hash(tmp_path: Path):CODE
LOWtests/test_fingerprint.py421def test_fingerprint_in_multiprocessing():CODE
LOWtests/test_fingerprint.py432def test_temp_cache_dir_with_tmpdir_nonexistent(tmp_path, caplog):CODE
LOWtests/test_fingerprint.py480def test_temp_cache_dir_with_tmpdir_existing(tmp_path, monkeypatch):CODE
LOWtests/test_fingerprint.py500def test_temp_cache_dir_without_tmpdir(monkeypatch):CODE
LOWtests/test_fingerprint.py521def test_temp_cache_dir_tmpdir_creation_failure(tmp_path, monkeypatch, caplog):CODE
LOWtests/test_fingerprint.py543def test_temp_cache_dir_tmpdir_not_directory(tmp_path, monkeypatch):CODE
LOWtests/test_fingerprint.py560def test_fingerprint_when_transform_version_changes():CODE
LOWtests/test_version.py19def test_version_equality_and_hash(other, expected_equality):CODE
LOWtests/conftest.py11def pytest_collection_modifyitems(config, items):CODE
LOW⚡tests/conftest.py45def set_update_download_counts_to_false(monkeypatch):CODE
LOW⚡tests/conftest.py51def set_sqlalchemy_silence_uber_warning(monkeypatch):CODE
LOW⚡tests/conftest.py61def zero_time_out_for_remote_code():CODE
LOWtests/test_sharding_utils.py48def test_number_of_shards_in_gen_kwargs(gen_kwargs, expected):CODE
LOWtests/test_patching.py72def test_patch_submodule_builtin():CODE
LOWtests/test_patching.py86def test_patch_submodule_missing():CODE
LOWtests/test_patching.py93def test_patch_submodule_missing_builtin():CODE
LOWtests/test_patching.py104def test_patch_submodule_start_and_stop():CODE
LOWtests/test_patching.py114def test_patch_submodule_successive():CODE
LOWtests/test_patching.py146def test_patch_submodule_doesnt_exist():CODE
LOW⚡tests/test_arrow_dataset.py109def picklable_map_function_with_indices(x, i):CODE
LOW⚡tests/test_arrow_dataset.py113def picklable_map_function_with_rank(x, r):CODE
LOW⚡tests/test_arrow_dataset.py117def picklable_map_function_with_indices_and_rank(x, i, r):CODE
LOW⚡tests/test_arrow_dataset.py121def picklable_filter_function(x):CODE
LOW⚡tests/test_arrow_dataset.py125def picklable_filter_function_with_rank(x, r):CODE
LOW⚡tests/test_arrow_dataset.py129def assert_arrow_metadata_are_synced_with_dataset_features(dataset: Dataset):CODE
LOW⚡tests/test_arrow_dataset.py1716 def func_return_multi_row_pd_dataframe(x):CODE
LOW⚡tests/test_arrow_dataset.py1724 def test_map_return_pl_dataframe(self, in_memory):CODE
LOW⚡tests/test_arrow_dataset.py1727 def func_return_single_row_pl_dataframe(x):CODE
LOW⚡tests/test_arrow_dataset.py5153def test_dataset_from_dict_with_large_list():CODE
LOW⚡tests/test_arrow_dataset.py5161def test_dataset_save_to_disk_with_large_list(tmp_path):CODE
1423 more matches not shown…
Cross-File Repetition44 hits · 220 pts
SeverityFileLineSnippetContext
HIGHtests/packaged_modules/test_fasta.py0build the chained fsspec uri datasets uses to read a single compressed file. the builder opens files with the streaming-STRING
HIGHtests/packaged_modules/test_fastq.py0build the chained fsspec uri datasets uses to read a single compressed file. the builder opens files with the streaming-STRING
HIGHtests/packaged_modules/test_genbank.py0build the chained fsspec uri datasets uses to read a single compressed file. the builder opens files with the streaming-STRING
HIGHtests/packaged_modules/test_fasta.py0columns= applies to a user-supplied features schema too.STRING
HIGHtests/packaged_modules/test_fastq.py0columns= applies to a user-supplied features schema too.STRING
HIGHtests/packaged_modules/test_genbank.py0columns= applies to a user-supplied features schema too.STRING
HIGHsrc/datasets/io/parquet.py0writes the pyarrow table as json lines to a binary file handle. caller is responsible for opening and closing the handleSTRING
HIGHsrc/datasets/io/csv.py0writes the pyarrow table as json lines to a binary file handle. caller is responsible for opening and closing the handleSTRING
HIGHsrc/datasets/io/json.py0writes the pyarrow table as json lines to a binary file handle. caller is responsible for opening and closing the handleSTRING
HIGHsrc/datasets/features/bio_structure.py0encode example into a format for arrow. args: value (`str`, `bytes`, `bio.seqrecord.seqrecord` or `dict`): data passed aSTRING
HIGHsrc/datasets/features/pdf.py0encode example into a format for arrow. args: value (`str`, `bytes`, `bio.seqrecord.seqrecord` or `dict`): data passed aSTRING
HIGHsrc/datasets/features/nifti.py0encode example into a format for arrow. args: value (`str`, `bytes`, `bio.seqrecord.seqrecord` or `dict`): data passed aSTRING
HIGHsrc/datasets/features/bio_sequence.py0encode example into a format for arrow. args: value (`str`, `bytes`, `bio.seqrecord.seqrecord` or `dict`): data passed aSTRING
HIGHsrc/datasets/features/bio_structure.py0decode example image file into image data. args: value (`str` or `dict`): a string with the absolute image file path, a STRING
HIGHsrc/datasets/features/pdf.py0decode example image file into image data. args: value (`str` or `dict`): a string with the absolute image file path, a STRING
HIGHsrc/datasets/features/nifti.py0decode example image file into image data. args: value (`str` or `dict`): a string with the absolute image file path, a STRING
HIGHsrc/datasets/features/video.py0decode example image file into image data. args: value (`str` or `dict`): a string with the absolute image file path, a STRING
HIGHsrc/datasets/features/image.py0decode example image file into image data. args: value (`str` or `dict`): a string with the absolute image file path, a STRING
HIGHsrc/datasets/features/bio_structure.py0if in the decodable state, return the feature itself, otherwise flatten the feature into a dictionary.STRING
HIGHsrc/datasets/features/pdf.py0if in the decodable state, return the feature itself, otherwise flatten the feature into a dictionary.STRING
HIGHsrc/datasets/features/mesh.py0if in the decodable state, return the feature itself, otherwise flatten the feature into a dictionary.STRING
HIGHsrc/datasets/features/nifti.py0if in the decodable state, return the feature itself, otherwise flatten the feature into a dictionary.STRING
HIGHsrc/datasets/features/video.py0if in the decodable state, return the feature itself, otherwise flatten the feature into a dictionary.STRING
HIGHsrc/datasets/features/bio_sequence.py0if in the decodable state, return the feature itself, otherwise flatten the feature into a dictionary.STRING
HIGHsrc/datasets/features/image.py0if in the decodable state, return the feature itself, otherwise flatten the feature into a dictionary.STRING
HIGHsrc/datasets/features/bio_structure.py0cast an arrow array to the image arrow storage type. the arrow types that can be converted to the image pyarrow storage STRING
HIGHsrc/datasets/features/pdf.py0cast an arrow array to the image arrow storage type. the arrow types that can be converted to the image pyarrow storage STRING
HIGHsrc/datasets/features/mesh.py0cast an arrow array to the image arrow storage type. the arrow types that can be converted to the image pyarrow storage STRING
HIGHsrc/datasets/features/audio.py0cast an arrow array to the image arrow storage type. the arrow types that can be converted to the image pyarrow storage STRING
HIGHsrc/datasets/features/nifti.py0cast an arrow array to the image arrow storage type. the arrow types that can be converted to the image pyarrow storage STRING
HIGHsrc/datasets/features/video.py0cast an arrow array to the image arrow storage type. the arrow types that can be converted to the image pyarrow storage STRING
HIGHsrc/datasets/features/bio_sequence.py0cast an arrow array to the image arrow storage type. the arrow types that can be converted to the image pyarrow storage STRING
HIGHsrc/datasets/features/image.py0cast an arrow array to the image arrow storage type. the arrow types that can be converted to the image pyarrow storage STRING
HIGHsrc/datasets/features/pdf.py0embed image files into the arrow array. args: storage (`pa.structarray`): pyarrow array to embed. token_per_repo_id (`diSTRING
HIGHsrc/datasets/features/audio.py0embed image files into the arrow array. args: storage (`pa.structarray`): pyarrow array to embed. token_per_repo_id (`diSTRING
HIGHsrc/datasets/features/nifti.py0embed image files into the arrow array. args: storage (`pa.structarray`): pyarrow array to embed. token_per_repo_id (`diSTRING
HIGHsrc/datasets/features/video.py0embed image files into the arrow array. args: storage (`pa.structarray`): pyarrow array to embed. token_per_repo_id (`diSTRING
HIGHsrc/datasets/features/image.py0embed image files into the arrow array. args: storage (`pa.structarray`): pyarrow array to embed. token_per_repo_id (`diSTRING
HIGHsrc/datasets/packaged_modules/conll/conll.py0generate splits from data files. the `data_files` kwarg in load_dataset() can be a str, list[str], dict[str,str], or dicSTRING
HIGHsrc/datasets/packaged_modules/xml/xml.py0generate splits from data files. the `data_files` kwarg in load_dataset() can be a str, list[str], dict[str,str], or dicSTRING
HIGHsrc/datasets/packaged_modules/text/text.py0generate splits from data files. the `data_files` kwarg in load_dataset() can be a str, list[str], dict[str,str], or dicSTRING
HIGHsrc/datasets/packaged_modules/fasta/fasta.py0generate splits from data files. the `data_files` kwarg in load_dataset() can be a str, list[str], dict[str,str], or dicSTRING
HIGHsrc/datasets/packaged_modules/genbank/genbank.py0generate splits from data files. the `data_files` kwarg in load_dataset() can be a str, list[str], dict[str,str], or dicSTRING
HIGHsrc/datasets/packaged_modules/fastq/fastq.py0generate splits from data files. the `data_files` kwarg in load_dataset() can be a str, list[str], dict[str,str], or dicSTRING
Decorative Section Separators58 hits · 201 pts
SeverityFileLineSnippetContext
MEDIUM⚡tests/features/test_bio.py34# --------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/features/test_bio.py37# --------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/features/test_bio.py113# --------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/features/test_bio.py115# --------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py266# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py268# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py307# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py309# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py357# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py359# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py486# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py488# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py576# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py578# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py615# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py617# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py633# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py635# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py648# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py650# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py663# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py665# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py678# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/packaged_modules/test_tsfile.py680# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/packaged_modules/test_tsfile.py27# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/packaged_modules/test_tsfile.py29# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/packaged_modules/test_tsfile.py42# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/packaged_modules/test_tsfile.py44# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/packaged_modules/test_tsfile.py84# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/packaged_modules/test_tsfile.py86# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/packaged_modules/test_tsfile.py224# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/packaged_modules/test_tsfile.py226# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/packaged_modules/test_tsfile.py455# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/packaged_modules/test_tsfile.py457# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/packaged_modules/test_tsfile.py538# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/packaged_modules/test_tsfile.py540# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/packaged_modules/test_tsfile.py709# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/packaged_modules/test_tsfile.py711# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/packaged_modules/test_genbank.py844# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/packaged_modules/test_genbank.py848# ---------------------------------------------------------------------------COMMENT
MEDIUMsrc/datasets/packaged_modules/hdf5/hdf5.py93# ┌───────────┐COMMENT
MEDIUMsrc/datasets/packaged_modules/hdf5/hdf5.py95# └───────────┘COMMENT
MEDIUM⚡src/datasets/packaged_modules/hdf5/hdf5.py139# ┌────────────┐COMMENT
MEDIUM⚡src/datasets/packaged_modules/hdf5/hdf5.py141# └────────────┘COMMENT
MEDIUM⚡src/datasets/packaged_modules/hdf5/hdf5.py184# ┌───────────────────┐COMMENT
MEDIUM⚡src/datasets/packaged_modules/hdf5/hdf5.py186# └───────────────────┘COMMENT
MEDIUM⚡src/datasets/packaged_modules/hdf5/hdf5.py207# ┌───────────┐COMMENT
MEDIUM⚡src/datasets/packaged_modules/hdf5/hdf5.py209# └───────────┘COMMENT
MEDIUM⚡src/datasets/packaged_modules/hdf5/hdf5.py292# ┌─────────────┐COMMENT
MEDIUM⚡src/datasets/packaged_modules/hdf5/hdf5.py294# └─────────────┘COMMENT
MEDIUMsrc/datasets/packaged_modules/tsfile/tsfile.py52# ---------------------------------------------------------------------------COMMENT
MEDIUMsrc/datasets/packaged_modules/tsfile/tsfile.py54# ---------------------------------------------------------------------------COMMENT
MEDIUMsrc/datasets/packaged_modules/tsfile/tsfile.py137# ---------------------------------------------------------------------------COMMENT
MEDIUMsrc/datasets/packaged_modules/tsfile/tsfile.py139# ---------------------------------------------------------------------------COMMENT
MEDIUMsrc/datasets/packaged_modules/tsfile/tsfile.py211# ---------------------------------------------------------------------------COMMENT
MEDIUMsrc/datasets/packaged_modules/tsfile/tsfile.py213# ---------------------------------------------------------------------------COMMENT
MEDIUMsrc/datasets/packaged_modules/tsfile/tsfile.py228# ---------------------------------------------------------------------------COMMENT
MEDIUMsrc/datasets/packaged_modules/tsfile/tsfile.py230# ---------------------------------------------------------------------------COMMENT
Unused Imports181 hits · 165 pts
SeverityFileLineSnippetContext
LOWtests/utils.py79CODE
LOWtests/utils.py93CODE
LOWtests/utils.py107CODE
LOWtests/utils.py121CODE
LOWtests/utils.py269CODE
LOWtests/utils.py284CODE
LOWtests/utils.py299CODE
LOWtests/utils.py314CODE
LOWtests/utils.py329CODE
LOWtests/utils.py344CODE
LOWtests/utils.py359CODE
LOWtests/_test_patching.py3CODE
LOWtests/_test_patching.py4CODE
LOWtests/_test_patching.py5CODE
LOWtests/_test_patching.py6CODE
LOWtests/_test_patching.py7CODE
LOWtests/_test_patching.py8CODE
LOWtests/packaged_modules/test_tsfile.py3CODE
LOWsrc/datasets/arrow_dataset.py147CODE
LOWsrc/datasets/arrow_dataset.py150CODE
LOWsrc/datasets/arrow_dataset.py151CODE
LOWsrc/datasets/iterable_dataset.py83CODE
LOWsrc/datasets/iterable_dataset.py86CODE
LOWsrc/datasets/__init__.py17CODE
LOWsrc/datasets/__init__.py17CODE
LOWsrc/datasets/__init__.py18CODE
LOWsrc/datasets/__init__.py19CODE
LOWsrc/datasets/__init__.py19CODE
LOWsrc/datasets/__init__.py19CODE
LOWsrc/datasets/__init__.py19CODE
LOWsrc/datasets/__init__.py20CODE
LOWsrc/datasets/__init__.py20CODE
LOWsrc/datasets/__init__.py21CODE
LOWsrc/datasets/__init__.py21CODE
LOWsrc/datasets/__init__.py22CODE
LOWsrc/datasets/__init__.py23CODE
LOWsrc/datasets/__init__.py24CODE
LOWsrc/datasets/__init__.py24CODE
LOWsrc/datasets/__init__.py24CODE
LOWsrc/datasets/__init__.py25CODE
LOWsrc/datasets/__init__.py26CODE
LOWsrc/datasets/__init__.py26CODE
LOWsrc/datasets/__init__.py26CODE
LOWsrc/datasets/__init__.py26CODE
LOWsrc/datasets/__init__.py26CODE
LOWsrc/datasets/__init__.py33CODE
LOWsrc/datasets/__init__.py33CODE
LOWsrc/datasets/__init__.py34CODE
LOWsrc/datasets/__init__.py34CODE
LOWsrc/datasets/__init__.py34CODE
LOWsrc/datasets/__init__.py35CODE
LOWsrc/datasets/__init__.py35CODE
LOWsrc/datasets/__init__.py35CODE
LOWsrc/datasets/__init__.py35CODE
LOWsrc/datasets/__init__.py35CODE
LOWsrc/datasets/__init__.py35CODE
LOWsrc/datasets/__init__.py35CODE
LOWsrc/datasets/__init__.py35CODE
LOWsrc/datasets/__init__.py35CODE
LOWsrc/datasets/__init__.py46CODE
121 more matches not shown…
Deep Nesting216 hits · 164 pts
SeverityFileLineSnippetContext
LOWtests/test_arrow_dataset.py155CODE
LOWtests/test_arrow_dataset.py591CODE
LOWtests/test_arrow_dataset.py938CODE
LOWtests/test_arrow_dataset.py1001CODE
LOWtests/test_arrow_dataset.py1074CODE
LOWtests/test_arrow_dataset.py1186CODE
LOWtests/test_arrow_dataset.py1322CODE
LOWtests/test_arrow_dataset.py1399CODE
LOWtests/test_arrow_dataset.py1407CODE
LOWtests/test_arrow_dataset.py1414CODE
LOWtests/test_arrow_dataset.py1435CODE
LOWtests/test_arrow_dataset.py1513CODE
LOWtests/test_arrow_dataset.py1866CODE
LOWtests/test_arrow_dataset.py1983CODE
LOWtests/test_arrow_dataset.py1992CODE
LOWtests/test_arrow_dataset.py2007CODE
LOWtests/test_arrow_dataset.py2025CODE
LOWtests/test_arrow_dataset.py2069CODE
LOWtests/test_arrow_dataset.py2081CODE
LOWtests/test_arrow_dataset.py2102CODE
LOWtests/test_arrow_dataset.py2123CODE
LOWtests/test_arrow_dataset.py2145CODE
LOWtests/test_arrow_dataset.py2191CODE
LOWtests/test_arrow_dataset.py2220CODE
LOWtests/test_arrow_dataset.py2314CODE
LOWtests/test_arrow_dataset.py2333CODE
LOWtests/test_arrow_dataset.py2363CODE
LOWtests/test_arrow_dataset.py2414CODE
LOWtests/test_arrow_dataset.py2565CODE
LOWtests/test_arrow_dataset.py2597CODE
LOWtests/test_arrow_dataset.py2615CODE
LOWtests/test_arrow_dataset.py2646CODE
LOWtests/test_arrow_dataset.py2914CODE
LOWtests/test_arrow_dataset.py4649CODE
LOWtests/test_arrow_reader.py200CODE
LOWtests/test_extract.py33CODE
LOWtests/test_extract.py94CODE
LOWtests/test_dataset_dict.py316CODE
LOWtests/features/test_features.py550CODE
LOWtests/features/test_array_xd.py39CODE
LOWtests/packaged_modules/test_tsfile.py52CODE
LOWtests/commands/test_test.py34CODE
LOWbenchmarks/utils.py22CODE
LOWsrc/datasets/arrow_dataset.py6654CODE
LOWsrc/datasets/arrow_dataset.py6885CODE
LOWsrc/datasets/arrow_dataset.py7019CODE
LOWsrc/datasets/arrow_dataset.py7133CODE
LOWsrc/datasets/arrow_dataset.py7368CODE
LOWsrc/datasets/arrow_dataset.py7426CODE
LOWsrc/datasets/arrow_dataset.py239CODE
LOWsrc/datasets/arrow_dataset.py1781CODE
LOWsrc/datasets/arrow_dataset.py3205CODE
LOWsrc/datasets/arrow_dataset.py3660CODE
LOWsrc/datasets/arrow_dataset.py4505CODE
LOWsrc/datasets/arrow_dataset.py4967CODE
LOWsrc/datasets/arrow_dataset.py5716CODE
LOWsrc/datasets/arrow_dataset.py5884CODE
LOWsrc/datasets/arrow_dataset.py3918CODE
LOWsrc/datasets/data_files.py123CODE
LOWsrc/datasets/data_files.py259CODE
156 more matches not shown…
Empty Error Handlers28 hits · 140 pts
SeverityFileLineSnippetContext
HIGHtests/conftest.py56except (ModuleNotFoundError, AttributeError):CODE
HIGHtests/test_arrow_writer.py305except pa.lib.ArrowInvalid:CODE
HIGHsrc/datasets/arrow_dataset.py3573except NonExistentDatasetError:CODE
HIGHsrc/datasets/iterable_dataset.py126except (TypeError, pa.ArrowInvalid, pa.ArrowNotImplementedError):CODE
HIGHsrc/datasets/iterable_dataset.py2966except DataSourcesShufflingDisallowed:CODE
HIGHsrc/datasets/config.py67except importlib.metadata.PackageNotFoundError:CODE
HIGHsrc/datasets/config.py78except importlib.metadata.PackageNotFoundError:CODE
HIGHsrc/datasets/config.py55except importlib.metadata.PackageNotFoundError:CODE
HIGHsrc/datasets/config.py126except importlib.metadata.PackageNotFoundError:CODE
HIGHsrc/datasets/arrow_writer.py594except Exception: # pyarrow.lib.ArrowInvalid, OSErrorCODE
HIGHsrc/datasets/builder.py662except ValueError: # Invalid version (ex: incomplete data dir)CODE
HIGHsrc/datasets/search.py21except ImportError:CODE
HIGHsrc/datasets/search.py26except ImportError:CODE
HIGHsrc/datasets/load.py198except Exception:CODE
HIGHsrc/datasets/load.py610except FileNotFoundError:CODE
HIGHsrc/datasets/load.py702except FileNotFoundError:CODE
HIGHsrc/datasets/io/json.py140except (pa.ArrowInvalid, pa.ArrowNotImplementedError, pa.ArrowCapacityError, pa.ArrowMemoryError):CODE
HIGHsrc/datasets/packaged_modules/vortex/vortex.py321except RuntimeError:CODE
HIGHsrc/datasets/packaged_modules/tsfile/tsfile.py420except Exception:CODE
HIGHsrc/datasets/packaged_modules/json/json.py105except FullReadDisallowed:CODE
HIGHsrc/datasets/packaged_modules/json/json.py273except ValueError:CODE
HIGHsrc/datasets/packaged_modules/genbank/genbank.py585except ValueError:CODE
HIGHsrc/datasets/utils/_dill.py288except Exception:CODE
HIGHsrc/datasets/download/download_manager.py200except Exception:CODE
HIGHsrc/datasets/formatting/torch_formatter.py85except ImportError:CODE
HIGHsrc/datasets/formatting/jax_formatter.py115except ImportError:CODE
HIGHsrc/datasets/formatting/tf_formatter.py79except ImportError:CODE
HIGHsrc/datasets/formatting/np_formatter.py75except ImportError:CODE
Docstring Block Structure15 hits · 75 pts
SeverityFileLineSnippetContext
HIGHsrc/datasets/arrow_dataset.py991 Convert `dict` to a `pyarrow.Table` to create a [`Dataset`]. Important: a dataset created with from_diSTRING
HIGHsrc/datasets/arrow_dataset.py1157 Convert a list of dicts to a `pyarrow.Table` to create a [`Dataset`]`. Note that the keys of the firstSTRING
HIGHsrc/datasets/data_files.py309 Resolve the paths and URLs of the data files from the pattern passed by the user. You can use patterns to resoSTRING
HIGHsrc/datasets/iterable_dataset.py3273 Create an IterableDataset from a polars DataFrame or LazyFrame. Iterating over the dataset is mostly zSTRING
HIGHsrc/datasets/iterable_dataset.py4521 Enable or disable the dataset features decoding for audio, image, video. When enabled (default), mediaSTRING
HIGHsrc/datasets/arrow_reader.py538Creates a `ReadInstruction` instance out of a string spec. Args: spec (`str`): SpliSTRING
HIGHsrc/datasets/table.py136 Return the position i of a sorted array so that arr[i] <= x < arr[i+1] Args: arr (`List[int]`): non-emSTRING
HIGHsrc/datasets/table.py654 Drop one or more columns and return a new table. Args: columns (`List[str]`): STRING
HIGHsrc/datasets/table.py731 Convert pandas.DataFrame to an Arrow Table. The column types in the resulting Arrow Table are inferredSTRING
HIGHsrc/datasets/table.py1019 Drop one or more columns and return a new table. Args: columns (`List[str]`): STRING
HIGHsrc/datasets/table.py1296 Drop one or more columns and return a new table. Args: columns (`List[str]`): STRING
HIGHsrc/datasets/table.py1772 Drop one or more columns and return a new table. Args: columns (`List[str]`): STRING
HIGHsrc/datasets/table.py1910Improved version of `pa.Array.cast` It supports casting `pa.StructArray` objects to re-order the fields. It alsSTRING
HIGHsrc/datasets/table.py2023Cast an array to the arrow type that corresponds to the requested feature type. For custom features like [`Audio`] oSTRING
HIGHsrc/datasets/table.py2172Embed data into an arrays's storage. For custom features like Audio or Image, it takes into account the "embed_storaSTRING
Self-Referential Comments20 hits · 62 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_fingerprint.py547 # Create a regular file and point TMPDIR to itCOMMENT
MEDIUMtests/test_arrow_dataset.py4966 # Create a simple DatasetCOMMENT
MEDIUMtests/test_arrow_dataset.py5017 # Create a Dataset with a column to group byCOMMENT
MEDIUMtests/test_arrow_dataset.py5099 # Create a dataset where one category has more elements than batch_sizeCOMMENT
MEDIUMtests/test_iterable_dataset.py3785 # Create a simple IterableDatasetCOMMENT
MEDIUMtests/test_iterable_dataset.py3868 # Create a Dataset with a column to group byCOMMENT
MEDIUMtests/test_iterable_dataset.py3950 # Create a dataset where one category has more elements than batch_sizeCOMMENT
MEDIUM⚡tests/packaged_modules/test_hdf5.py259 # Create a dataset with a zero dimensionCOMMENT
MEDIUM⚡tests/packaged_modules/test_hdf5.py261 # Create a dataset with zero in the middle dimensionCOMMENT
MEDIUM⚡tests/packaged_modules/test_hdf5.py263 # Create a dataset with zero in the last dimensionCOMMENT
MEDIUM.github/workflows/release-conda.yml38 # Create the build environmentCOMMENT
MEDIUMsrc/datasets/arrow_dataset.py2283 # Create the new featureCOMMENT
MEDIUMsrc/datasets/arrow_writer.py324 """This function is called when calling pa.array(typed_sequence)"""STRING
MEDIUMsrc/datasets/arrow_reader.py129 # Create the absolute instruction (per split)COMMENT
MEDIUMsrc/datasets/builder.py891 # Create a tmp dir and rename to self._output_dir on successful exit.COMMENT
MEDIUMsrc/datasets/builder.py1043 # Create a dataset for each of the given splitsCOMMENT
MEDIUMsrc/datasets/builder.py1167 # Create a dataset for each of the given splitsCOMMENT
MEDIUMsrc/datasets/splits.py240 # Create the slice for each of the elementsCOMMENT
MEDIUMsrc/datasets/load.py1666 # Create a dataset builderCOMMENT
MEDIUMsrc/datasets/formatting/formatting.py371 # Create a copy and avoid triggering descriptorsCOMMENT
Cross-Language Confusion10 hits · 52 pts
SeverityFileLineSnippetContext
HIGHsetup.py22 {"run": {"name": "Install `datasets@main`", "command": 'pip uninstall datasets -y && pip install "datasets @ git+STRING
HIGHtests/test_arrow_dataset.py3579 # Arrow null, not as the JSON string "null". Otherwise null_count is wrong and a missingCOMMENT
HIGHtests/test_table.py157 assert table.equals(in_memory_pa_table)CODE
HIGHtests/packaged_modules/test_json.py428 "arguments": json.dumps({"command": "pwd && date -u +%Y-%m-%dT%H:%M:%SZ"}),CODE
HIGHtests/packaged_modules/test_json.py163 "col_2": [null, 2, 20]STRING
HIGHsrc/datasets/arrow_writer.py754 f"Couldn't write column '{col}': its type in this file is null, because the first "CODE
HIGHsrc/datasets/table.py1957 # Ensure each null value in the array translates to [null] * pa_type.list_size in the array's valuesCOMMENT
HIGHsrc/datasets/table.py2090 # Ensure each null value in the array translates to [null] * pa_type.list_size in the array's vaCOMMENT
HIGHsrc/datasets/table.py266 return self.table.equals(*args, **kwargs)CODE
HIGHsrc/datasets/table.py484 return self.equals(other)CODE
Over-Commented Block37 hits · 35 pts
SeverityFileLineSnippetContext
LOWtests/test_data_files.py81 path.relative_to(*other)COMMENT
LOWutils/release.py1# Copyright 2021 The HuggingFace Team. All rights reserved.COMMENT
LOWsrc/datasets/arrow_dataset.py1# Copyright 2020 The HuggingFace Authors.COMMENT
LOWsrc/datasets/arrow_dataset.py7201 lengths = np.delete(lengths, exhausted_indices).tolist()COMMENT
LOWsrc/datasets/arrow_dataset.py7221 # For example, if the max_length is 5 and the i-th dataset has 3 samples, the i-th column will be [0,1,2,0,1]COMMENT
LOWsrc/datasets/naming.py1# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.COMMENT
LOWsrc/datasets/arrow_writer.py1# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.COMMENT
LOWsrc/datasets/__init__.py1# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.COMMENT
LOWsrc/datasets/arrow_reader.py1# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.COMMENT
LOWsrc/datasets/builder.py1# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.COMMENT
LOWsrc/datasets/inspect.py1# Copyright 2020 The HuggingFace Datasets Authors.COMMENT
LOWsrc/datasets/splits.py1# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.COMMENT
LOWsrc/datasets/load.py1# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.COMMENT
LOWsrc/datasets/load.py1021 filename = filename + ".py"COMMENT
LOWsrc/datasets/info.py1# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.COMMENT
LOWsrc/datasets/features/features.py1# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.COMMENT
LOWsrc/datasets/features/features.py2081 raise TypeError(f"Expected a dict but got a {type(feature)}: {feature}")COMMENT
LOW…d_modules/folder_based_builder/folder_based_builder.py401 )COMMENT
LOW…c/datasets/packaged_modules/imagefolder/imagefolder.py21 BASE_COLUMN_NAME = "image"COMMENT
LOW…c/datasets/packaged_modules/audiofolder/audiofolder.py21 BASE_COLUMN_NAME = "audio"COMMENT
LOWsrc/datasets/utils/logging.py1# Copyright 2020 Optuna, Hugging FaceCOMMENT
LOWsrc/datasets/utils/version.py1# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.COMMENT
LOWsrc/datasets/utils/__init__.py1# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.COMMENT
LOWsrc/datasets/utils/py_utils.py1# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.COMMENT
LOWsrc/datasets/utils/_filelock.py1#!/usr/bin/env pythonCOMMENT
LOWsrc/datasets/utils/_dill.py1# Copyright 2023 The HuggingFace Team. All rights reserved.COMMENT
LOWsrc/datasets/utils/_dill.py301 """COMMENT
LOWsrc/datasets/utils/_dill.py401 # Filenames of functions created in ipykernel the filenameCOMMENT
LOWsrc/datasets/utils/tf_utils.py1# Copyright 2022 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.COMMENT
LOWsrc/datasets/download/download_manager.py1# Copyright 2020 The TensorFlow Datasets Authors.COMMENT
LOWsrc/datasets/formatting/polars_formatter.py1# Copyright 2020 The HuggingFace Authors.COMMENT
LOWsrc/datasets/formatting/__init__.py1# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors.COMMENT
LOWsrc/datasets/formatting/formatting.py1# Copyright 2020 The HuggingFace Authors.COMMENT
LOWsrc/datasets/formatting/torch_formatter.py1# Copyright 2020 The HuggingFace Authors.COMMENT
LOWsrc/datasets/formatting/jax_formatter.py1# Copyright 2021 The HuggingFace Authors.COMMENT
LOWsrc/datasets/formatting/tf_formatter.py1# Copyright 2020 The HuggingFace Authors.COMMENT
LOWsrc/datasets/formatting/np_formatter.py1# Copyright 2020 The HuggingFace Authors.COMMENT
Fake / Example Data26 hits · 30 pts
SeverityFileLineSnippetContext
LOWtests/test_builder.py194 "dummy_kwarg_with_different_length": [f"dummy_data{i}.txt" for i in range(3)],CODE
LOWtests/test_builder.py215 "dummy_kwarg_with_different_length": [f"dummy_data{i}.txt" for i in range(3)],CODE
LOWtests/test_data_files.py27_FILES_TO_IGNORE = {".dummy", "README.md", "dummy_data.zip", "dataset_infos.json"}CODE
LOWtests/features/test_array_xd.py40 dummy_data = []CODE
LOWtests/features/test_array_xd.py59 dummy_data.append((i, example))CODE
LOWtests/features/test_array_xd.py61 return dummy_dataCODE
LOW⚡tests/features/test_array_xd.py365@pytest.mark.parametrize("dtype, dummy_value", [("int32", 1), ("bool", True), ("float64", 1)])CODE
LOW⚡tests/features/test_array_xd.py366def test_table_to_pandas(dtype, dummy_value):CODE
LOW⚡tests/features/test_array_xd.py368 dataset = datasets.Dataset.from_dict({"foo": [[[dummy_value] * 2] * 2]}, features=features)CODE
LOW⚡tests/features/test_array_xd.py372 np.testing.assert_equal(arr, np.array([[[dummy_value] * 2] * 2], dtype=np.dtype(dtype)))CODE
LOW⚡tests/features/test_array_xd.py375@pytest.mark.parametrize("dtype, dummy_value", [("int32", 1), ("bool", True), ("float64", 1)])CODE
LOW⚡tests/features/test_array_xd.py376def test_array_xd_numpy_arrow_extractor(dtype, dummy_value):CODE
LOW⚡tests/features/test_array_xd.py378 dataset = datasets.Dataset.from_dict({"foo": [[[dummy_value] * 2] * 2]}, features=features)CODE
LOW⚡tests/features/test_array_xd.py381 np.testing.assert_equal(arr, np.array([[[dummy_value] * 2] * 2], dtype=np.dtype(dtype)))CODE
LOW⚡tests/packaged_modules/test_text.py19 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore maSTRING
LOW⚡tests/packaged_modules/test_text.py19 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore maSTRING
LOW⚡tests/packaged_modules/test_text.py25 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore maSTRING
LOW⚡tests/packaged_modules/test_text.py25 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore maSTRING
LOWbenchmarks/utils.py23 dummy_data = []CODE
LOW⚡benchmarks/utils.py42 dummy_data.append((i, example))CODE
LOW⚡benchmarks/utils.py44 return dummy_dataCODE
LOW⚡benchmarks/utils.py48 dummy_data = generate_examples(features, num_examples=num_examples, seq_shapes=seq_shapes)CODE
LOW⚡benchmarks/utils.py51 for key, record in dummy_data:CODE
LOWbenchmarks/benchmark_array_xd.py25def write(my_features, dummy_data, tmp_dir):CODE
LOWbenchmarks/benchmark_array_xd.py27 for key, record in dummy_data:CODE
LOWsrc/datasets/data_files.py114 "dummy_data.zip",CODE
AI Structural Patterns39 hits · 29 pts
SeverityFileLineSnippetContext
LOWtests/test_arrow_dataset.py1170CODE
LOWtests/test_dataset_dict.py341CODE
LOWsrc/datasets/arrow_dataset.py6654CODE
LOWsrc/datasets/arrow_dataset.py6816CODE
LOWsrc/datasets/arrow_dataset.py336CODE
LOWsrc/datasets/arrow_dataset.py1482CODE
LOWsrc/datasets/arrow_dataset.py3205CODE
LOWsrc/datasets/arrow_dataset.py3660CODE
LOWsrc/datasets/arrow_dataset.py4134CODE
LOWsrc/datasets/arrow_dataset.py4967CODE
LOWsrc/datasets/arrow_dataset.py6068CODE
LOWsrc/datasets/arrow_dataset.py6315CODE
LOWsrc/datasets/arrow_dataset.py6395CODE
LOWsrc/datasets/iterable_dataset.py1378CODE
LOWsrc/datasets/iterable_dataset.py3676CODE
LOWsrc/datasets/iterable_dataset.py3771CODE
LOWsrc/datasets/iterable_dataset.py5305CODE
LOWsrc/datasets/dataset_dict.py2515CODE
LOWsrc/datasets/dataset_dict.py2687CODE
LOWsrc/datasets/dataset_dict.py814CODE
LOWsrc/datasets/dataset_dict.py986CODE
LOWsrc/datasets/dataset_dict.py1623CODE
LOWsrc/datasets/dataset_dict.py1911CODE
LOWsrc/datasets/dataset_dict.py2327CODE
LOWsrc/datasets/arrow_writer.py517CODE
LOWsrc/datasets/builder.py308CODE
LOWsrc/datasets/builder.py702CODE
LOWsrc/datasets/search.py454CODE
LOWsrc/datasets/load.py1187CODE
LOWsrc/datasets/load.py1352CODE
LOWsrc/datasets/load.py1375CODE
LOWsrc/datasets/load.py1399CODE
LOWsrc/datasets/load.py1423CODE
LOWsrc/datasets/load.py1446CODE
LOWsrc/datasets/io/generator.py9CODE
LOWsrc/datasets/io/spark.py18CODE
LOWsrc/datasets/packaged_modules/cache/cache.py100CODE
LOWsrc/datasets/utils/py_utils.py416CODE
LOWsrc/datasets/utils/file_utils.py327CODE
Excessive Try-Catch Wrapping29 hits · 28 pts
SeverityFileLineSnippetContext
LOWsrc/datasets/arrow_dataset.py5209 except Exception as error:CODE
LOWsrc/datasets/fingerprint.py87 except Exception as e:CODE
LOWsrc/datasets/arrow_writer.py594 except Exception: # pyarrow.lib.ArrowInvalid, OSErrorCODE
LOWsrc/datasets/builder.py1567 except Exception as e:CODE
LOWsrc/datasets/builder.py1657 except Exception:CODE
LOWsrc/datasets/builder.py1873 except Exception as e:CODE
LOWsrc/datasets/inspect.py290 except Exception as err:CODE
LOWsrc/datasets/load.py198 except Exception:CODE
LOWsrc/datasets/load.py1167 except Exception as e1:CODE
LOWsrc/datasets/load.py1171 except Exception:CODE
LOWsrc/datasets/features/features.py1302 except Exception:CODE
LOWsrc/datasets/features/features.py1335 except Exception:CODE
LOWsrc/datasets/packaged_modules/tsfile/tsfile.py340 except Exception as e:CODE
LOWsrc/datasets/packaged_modules/tsfile/tsfile.py406 except Exception as e:CODE
LOWsrc/datasets/packaged_modules/tsfile/tsfile.py420 except Exception:CODE
LOWsrc/datasets/packaged_modules/tsfile/tsfile.py494 except Exception as e:CODE
LOWsrc/datasets/packaged_modules/tsfile/tsfile.py516 except Exception as e:CODE
LOWsrc/datasets/utils/_dataset_viewer.py57 except Exception as e: # noqa catch any exception of the dataset viewer API and consider the parquet export doesn'tCODE
LOWsrc/datasets/utils/_dataset_viewer.py93 except Exception as e: # noqa catch any exception of the dataset viewer API and consider the dataset info doesn't eCODE
LOWsrc/datasets/utils/_dill.py78 except Exception: # TypeError, decimal.InvalidOperation, etc.CODE
LOWsrc/datasets/utils/_dill.py141 except Exception: # TypeError, decimal.InvalidOperation, etc.CODE
LOWsrc/datasets/utils/_dill.py276 except Exception:CODE
LOWsrc/datasets/utils/_dill.py288 except Exception:CODE
LOWsrc/datasets/utils/json.py41 except Exception:CODE
LOWsrc/datasets/utils/json.py61 except Exception:CODE
LOWsrc/datasets/utils/extract.py190 except Exception: # catch all errors in case future python versions change the zipfile internalsCODE
LOWsrc/datasets/download/download_manager.py200 except Exception:CODE
LOWsrc/datasets/formatting/formatting.py530 except Exception as exc:CODE
LOWsrc/datasets/formatting/formatting.py549 except Exception as exc:CODE
Redundant / Tautological Comments16 hits · 24 pts
SeverityFileLineSnippetContext
LOWtests/test_fingerprint.py436 # Set TMPDIR to a non-existent directoryCOMMENT
LOWtests/test_fingerprint.py484 # Set TMPDIR to an existing directoryCOMMENT
LOWtests/test_fingerprint.py527 # Set TMPDIR to a path that will fail to create (e.g., invalid permissions)COMMENT
LOWtests/test_buckets.py30 # Write files with full paths relative to the bucket path (forward slashes for MemoryFileSystem)COMMENT
LOWsrc/datasets/arrow_dataset.py3455 # Check if we've already cached this computation (indexed by a hash)COMMENT
LOWsrc/datasets/arrow_dataset.py4578 # Check if we need to convert indicesCOMMENT
LOWsrc/datasets/arrow_dataset.py4792 # Check if we've already cached this computation (indexed by a hash)COMMENT
LOWsrc/datasets/arrow_dataset.py4938 # Check if we've already cached this computation (indexed by a hash)COMMENT
LOWsrc/datasets/arrow_dataset.py5162 # Check if we've already cached this computation (indexed by a hash)COMMENT
LOWsrc/datasets/fingerprint.py52 # Check if TMPDIR is set and handle the case where it doesn't existCOMMENT
LOWsrc/datasets/builder.py841 # Check if the data already existsCOMMENT
LOWsrc/datasets/packaged_modules/fasta/fasta.py254 # Check if adding this record would exceed byte limitCOMMENT
LOWsrc/datasets/packaged_modules/genbank/genbank.py693 # Check if adding this record would exceed byte limitCOMMENT
LOWsrc/datasets/packaged_modules/fastq/fastq.py276 # Check if adding this record would exceed byte limitCOMMENT
LOWsrc/datasets/utils/file_utils.py522 # Check if the file object is seekable even before reading the magic number (to avoid https://bugs.python.org/issue2COMMENT
LOWsrc/datasets/formatting/formatting.py618 # Check if key is validCOMMENT
AI Slop Vocabulary17 hits · 23 pts
SeverityFileLineSnippetContext
LOWtests/test_iterable_dataset.py652 (3, lambda x: {"id+1": x["id"] + 1}, False, None), # just add 1 to the idCODE
LOWtests/test_iterable_dataset.py689 (3, lambda x: {"id+1": x["id"] + 1}, False, None), # just add 1 to the idCODE
LOWtests/test_iterable_dataset.py790 (3, lambda x: {"id+1": x["id"] + 1}, False, None, ["extra_column"]), # just add 1 to the idCODE
LOWtests/test_iterable_dataset.py1013 (3, lambda id_: {"id+1": id_ + 1}, False, None, ["id"]), # just add 1 to the idCODE
LOWtests/test_iterable_dataset.py1050 (3, lambda t: t.append_column("id+1", pc.add(t["id"], 1)), False, None), # just add 1 to the idCODE
LOWtests/test_iterable_dataset.py1092 (3, lambda t: t.append_column("id+1", pc.add(t["id"], 1)), False, None), # just add 1 to the idCODE
LOWtests/test_iterable_dataset.py1132 (3, lambda t: t.append_column("id+1", pc.add(t["id"], 1)), False, None), # just add 1 to the idCODE
LOWtests/test_iterable_dataset.py1246 ), # just add 1 to the idCODE
LOWtests/test_iterable_dataset.py1342 (3, lambda id_: pa.table({"id+1": pc.add(id_, 1)}), False, None, ["id"]), # just add 1 to the idCODE
MEDIUMsrc/datasets/arrow_dataset.py592 """To be used in dataset transforms that modify the features of the dataset, in order to update the features stored STRING
LOWsrc/datasets/features/audio.py144 # If we already had PCM-byte, we don`t have to make "read file, make bytes" (just use it!)COMMENT
MEDIUM…d_modules/folder_based_builder/folder_based_builder.py319 # Use block_size equal to the chunk size divided by 32 to leverage multithreadingCOMMENT
MEDIUMsrc/datasets/packaged_modules/json/json.py227 # Use block_size equal to the chunk size divided by 32 to leverage multithreadingCOMMENT
MEDIUMsrc/datasets/utils/track.py40 """Utility class to create an iterable from a generator function, in order to reset the generator when needed."""STRING
MEDIUMsrc/datasets/utils/file_utils.py765 # use xopen instead of fs.open to make data fetching more robustCOMMENT
MEDIUMsrc/datasets/utils/_dill.py316 # to be robust in case a script is moved for example.COMMENT
MEDIUMsrc/datasets/utils/_dill.py411 # to be robust in case a script is moved for example.COMMENT
Slop Phrases5 hits · 8 pts
SeverityFileLineSnippetContext
LOWsrc/datasets/arrow_dataset.py3359 # If the array is empty we do nothing (but we make sure to handle an empty indices mapping and remove the requesCOMMENT
LOWsrc/datasets/arrow_dataset.py4348 # don't forget to copy the objectsCOMMENT
LOWsrc/datasets/arrow_dataset.py4348 # don't forget to copy the objectsCOMMENT
LOWsrc/datasets/arrow_dataset.py6739 # We make sure to get info from this commitCOMMENT
LOWsrc/datasets/dataset_dict.py2611 # We make sure to get info from this commitCOMMENT
Modern Structural Boilerplate6 hits · 6 pts
SeverityFileLineSnippetContext
LOWsrc/datasets/arrow_writer.py85 def set_batch_size(feature: FeatureType) -> None:CODE
LOWsrc/datasets/arrow_writer.py125 def set_batch_size(feature: FeatureType) -> None:CODE
LOWsrc/datasets/features/__init__.py1__all__ = [CODE
LOWsrc/datasets/utils/logging.py110def set_verbosity(verbosity: int) -> None:CODE
LOWsrc/datasets/utils/json.py132def set_json_types_in_feature(feature: "FeatureType", json_field_paths: list[list[str]]) -> None:CODE
LOWsrc/datasets/download/__init__.py1__all__ = [CODE
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/features/test_array_xd.py466 def process_data(batch):CODE
LOWsrc/datasets/utils/experimental.py26 ... def my_function():STRING