Repository Analysis

recommenders-team/recommenders

Best Practices on Recommendation Systems

18.5 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of recommenders-team/recommenders, a Python project with 21,829 GitHub stars. SynthScan v2.0 examined 52,430 lines of code across 337 source files, recording 558 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 18.5 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

18.5
Adjusted Score
18.5
Raw Score
100%
Time Factor
2026-07-13
Last Push
21.8K
Stars
Python
Language
52.4K
Lines of Code
337
Files
558
Pattern Hits
2026-07-14
Scan Date
0.15
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 8HIGH 44MEDIUM 51LOW 455

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 558 distinct pattern matches across 17 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers216 hits · 222 pts
SeverityFileLineSnippetContext
LOWtools/databricks_install.py133def prepare_for_operationalization(STRING
LOWtests/conftest.py133def train_test_dummy_timestamp(pandas_dummy_timestamp):CODE
LOWtests/conftest.py435def dataset_ncf_files_unsorted(data_paths, dataset_ncf_files):CODE
LOWtests/conftest.py462def dataset_ncf_files_missing_column(data_paths, dataset_ncf_files):CODE
LOWtests/README.md168def test_sar_single_node_runs(notebooks, output_notebook, kernel_name):CODE
LOWtests/README.md203def test_sar_single_node_smoke(notebooks, output_notebook, kernel_name):CODE
LOWtests/smoke/examples/test_notebooks_python.py15def test_sar_single_node_smoke(notebooks, output_notebook, kernel_name):CODE
LOWtests/smoke/examples/test_notebooks_python.py32def test_baseline_deep_dive_smoke(notebooks, output_notebook, kernel_name):CODE
LOWtests/smoke/examples/test_notebooks_python.py97def test_lightgbm_quickstart_smoke(notebooks, output_notebook, kernel_name):CODE
LOWtests/smoke/examples/test_notebooks_python.py121def test_lightgbm_movielens_smoke(notebooks, output_notebook, kernel_name):CODE
LOWtests/smoke/examples/test_notebooks_pyspark.py45def test_mmlspark_lightgbm_criteo_smoke(notebooks, output_notebook, kernel_name):CODE
LOW…sts/unit/recommenders/datasets/test_python_splitter.py350def test_int_numpy_stratified_splitter(test_specs, python_int_dataset):CODE
LOW…sts/unit/recommenders/datasets/test_python_splitter.py394def test_float_numpy_stratified_splitter(test_specs, python_float_dataset):CODE
LOWtests/unit/recommenders/datasets/test_download_utils.py37def test_maybe_download_wrong_bytes(caplog, files_fixtures):CODE
LOWtests/unit/recommenders/datasets/test_download_utils.py50def test_maybe_download_maybe(caplog, files_fixtures):CODE
LOWtests/unit/recommenders/datasets/test_download_utils.py64def test_maybe_download_retry(caplog):CODE
LOWtests/unit/recommenders/datasets/test_download_utils.py74def test_maybe_download_sets_default_timeout(tmp_path, monkeypatch):CODE
LOWtests/unit/recommenders/datasets/test_download_utils.py112def test_maybe_download_redownloads_corrupt_zip(tmp, caplog):CODE
LOW…sts/unit/recommenders/datasets/test_pandas_df_utils.py34def test_negative_feedback_sampler():CODE
LOWtests/unit/recommenders/utils/test_gpu_utils.py24def test_get_number_gpus_without_torch(monkeypatch):CODE
LOWtests/unit/recommenders/utils/test_gpu_utils.py53def test_clear_memory_all_gpus():CODE
LOWtests/unit/recommenders/utils/test_python_utils.py98def test_get_top_k_scored_items(scores):CODE
LOWtests/unit/recommenders/utils/test_notebook_utils.py120def test_notebook_execution_with_parameters(STRING
LOWtests/unit/recommenders/utils/test_notebook_utils.py141def test_notebook_execution_value_error_fails(STRING
LOWtests/unit/recommenders/utils/test_general_utils.py14def test_get_number_processors():CODE
LOWtests/unit/recommenders/utils/test_timer.py29def test_interval_before_stop(t):CODE
LOWtests/unit/recommenders/models/test_sar_singlenode.py302def test_get_popularity_based_topk(header):CODE
LOWtests/unit/recommenders/models/test_sar_singlenode.py324def test_get_normalized_scores(header):CODE
LOWtests/unit/recommenders/models/test_sar_singlenode.py383def test_match_similarity_type_from_json_file(header):CODE
LOWtests/unit/recommenders/models/test_sar_singlenode.py406def test_dataset_with_duplicates(header):CODE
LOWtests/unit/recommenders/models/test_sar_singlenode.py419def test_get_topk_most_similar_users(header):CODE
LOWtests/unit/recommenders/models/test_ncf_dataset.py79def test_datafile_init_unsorted(dataset_ncf_files_unsorted):CODE
LOWtests/unit/recommenders/models/test_ncf_dataset.py107def test_datafile_missing_column(dataset_ncf_files_missing_column):CODE
LOWtests/unit/recommenders/models/test_tfidf_utils.py111def test_recommend_top_k_items(model_fit, df_clean):CODE
LOWtests/unit/recommenders/models/test_tfidf_utils.py116def test_get_top_k_recommendations(model_fit, df_clean):CODE
LOWtests/unit/recommenders/models/test_deeprec_model.py117def test_xdeepfm_component_definition(deeprec_resource_path):CODE
LOWtests/unit/recommenders/models/test_deeprec_model.py144def test_dkn_component_definition(dkn_files):CODE
LOWtests/unit/recommenders/models/test_deeprec_model.py227def test_slirec_component_definition(sequential_files, deeprec_config_path):CODE
LOWtests/unit/recommenders/models/test_deeprec_model.py264def test_nextitnet_component_definition(sequential_files, deeprec_config_path):CODE
LOWtests/unit/recommenders/models/test_deeprec_model.py302def test_sum_component_definition(sequential_files, deeprec_config_path):CODE
LOWtests/unit/recommenders/models/test_deeprec_model.py340def test_lightgcn_component_definition():CODE
LOWtests/unit/recommenders/models/test_sasrec_model.py178def test_split_default_parameters(temp_data_file):CODE
LOWtests/unit/recommenders/models/test_sasrec_model.py241def test_split_invalid_min_interactions(temp_data_file):CODE
LOWtests/unit/recommenders/models/test_newsrec_model.py21def test_nrms_component_definition(mind_resource_path):CODE
LOWtests/unit/recommenders/models/test_newsrec_model.py51def test_naml_component_definition(mind_resource_path):CODE
LOWtests/unit/recommenders/models/test_newsrec_model.py85def test_npa_component_definition(mind_resource_path):CODE
LOWtests/unit/recommenders/models/test_newsrec_model.py115def test_lstur_component_definition(mind_resource_path):CODE
LOWtests/unit/recommenders/models/test_embdotbias_model.py56def test_embedding_dot_bias_weight_method(sample_classes):CODE
LOWtests/unit/recommenders/models/test_embdotbias_model.py72def test_embedding_dot_bias_from_classes(sample_classes):CODE
LOWtests/unit/recommenders/models/test_embdotbias_model.py86def test_embedding_dot_bias_init(sample_model_params):CODE
LOWtests/unit/recommenders/models/test_embdotbias_model.py98def test_embedding_dot_bias_forward(sample_model_params):CODE
LOWtests/unit/recommenders/models/test_embdotbias_utils.py33def test_cartesian_product_two_arrays():CODE
LOWtests/unit/recommenders/models/test_embdotbias_utils.py41def test_cartesian_product_three_arrays():CODE
LOWtests/unit/recommenders/models/test_embdotbias_utils.py61def test_cartesian_product_single_array():CODE
LOWtests/unit/recommenders/models/test_embdotbias_utils.py68def test_cartesian_product_empty_array():CODE
LOWtests/unit/recommenders/models/test_wide_deep_utils.py178def test_wide_deep_model_with_item_features(pd_df):CODE
LOWtests/unit/recommenders/models/test_wide_deep_utils.py235def test_recommend_k_items_with_item_features(pd_df):CODE
LOWtests/unit/recommenders/models/test_wide_deep_utils.py296def test_seed_reproducibility(pd_df):CODE
LOWtests/unit/recommenders/tuning/test_nni_utils.py58def test_get_experiment_status():CODE
LOWtests/unit/recommenders/tuning/test_nni_utils.py71def test_check_experiment_status_done():CODE
156 more matches not shown…
Cross-File Repetition31 hits · 155 pts
SeverityFileLineSnippetContext
HIGHtests/conftest.py0helper function to generate random timestamps. reference: https://stackoverflow.com/questions/41006182/generate-random-dSTRING
HIGH…sts/unit/recommenders/datasets/test_python_splitter.py0helper function to generate random timestamps. reference: https://stackoverflow.com/questions/41006182/generate-random-dSTRING
HIGHtests/unit/recommenders/datasets/test_sparse.py0helper function to generate random timestamps. reference: https://stackoverflow.com/questions/41006182/generate-random-dSTRING
HIGHrecommenders/models/newsrec/io/mind_all_iterator.py0initialize an iterator. create necessary placeholders for the model. args: hparams (object): global hyper-parameters. soSTRING
HIGHrecommenders/models/deeprec/io/iterator.py0initialize an iterator. create necessary placeholders for the model. args: hparams (object): global hyper-parameters. soSTRING
HIGHrecommenders/models/deeprec/io/dkn_iterator.py0initialize an iterator. create necessary placeholders for the model. args: hparams (object): global hyper-parameters. soSTRING
HIGHrecommenders/models/deeprec/io/nextitnet_iterator.py0initialize an iterator. create necessary placeholders for the model. args: hparams (object): global hyper-parameters. soSTRING
HIGHrecommenders/models/deeprec/io/sequential_iterator.py0initialize an iterator. create necessary placeholders for the model. args: hparams (object): global hyper-parameters. soSTRING
HIGHrecommenders/models/newsrec/models/lstur.py0initialization steps for nrms. compared with the basemodel, nrms need word embedding. after creating word embedding matrSTRING
HIGHrecommenders/models/newsrec/models/naml.py0initialization steps for nrms. compared with the basemodel, nrms need word embedding. after creating word embedding matrSTRING
HIGHrecommenders/models/newsrec/models/nrms.py0initialization steps for nrms. compared with the basemodel, nrms need word embedding. after creating word embedding matrSTRING
HIGHrecommenders/models/newsrec/models/npa.py0initialization steps for nrms. compared with the basemodel, nrms need word embedding. after creating word embedding matrSTRING
HIGHrecommenders/models/newsrec/models/lstur.py0build npa model and scorer. returns: object: a model used to train. object: a model used to evaluate and inference.STRING
HIGHrecommenders/models/newsrec/models/naml.py0build npa model and scorer. returns: object: a model used to train. object: a model used to evaluate and inference.STRING
HIGHrecommenders/models/newsrec/models/nrms.py0build npa model and scorer. returns: object: a model used to train. object: a model used to evaluate and inference.STRING
HIGHrecommenders/models/newsrec/models/npa.py0build npa model and scorer. returns: object: a model used to train. object: a model used to evaluate and inference.STRING
HIGHrecommenders/models/newsrec/models/lstur.py0the main function to create user encoder of npa. args: titleencoder (object): the news encoder of npa. return: object: tSTRING
HIGHrecommenders/models/newsrec/models/nrms.py0the main function to create user encoder of npa. args: titleencoder (object): the news encoder of npa. return: object: tSTRING
HIGHrecommenders/models/newsrec/models/npa.py0the main function to create user encoder of npa. args: titleencoder (object): the news encoder of npa. return: object: tSTRING
HIGHrecommenders/models/newsrec/models/lstur.py0the main function to create news encoder of npa. args: embedding_layer (object): a word embedding layer. return: object:STRING
HIGHrecommenders/models/newsrec/models/nrms.py0the main function to create news encoder of npa. args: embedding_layer (object): a word embedding layer. return: object:STRING
HIGHrecommenders/models/newsrec/models/npa.py0the main function to create news encoder of npa. args: embedding_layer (object): a word embedding layer. return: object:STRING
HIGHrecommenders/models/newsrec/models/base_model.py0initializing the model. create common logics which are needed by all sequential models, such as loss function, parameterSTRING
HIGHrecommenders/models/deeprec/models/base_model.py0initializing the model. create common logics which are needed by all sequential models, such as loss function, parameterSTRING
HIGH…els/deeprec/models/sequential/sequential_base_model.py0initializing the model. create common logics which are needed by all sequential models, such as loss function, parameterSTRING
HIGHrecommenders/models/newsrec/models/base_model.py0evaluate the given file and returns some evaluation metrics. args: filename (str): a file name that will be evaluated. rSTRING
HIGHrecommenders/models/deeprec/models/base_model.py0evaluate the given file and returns some evaluation metrics. args: filename (str): a file name that will be evaluated. rSTRING
HIGHrecommenders/models/deeprec/models/dkn_item2item.py0evaluate the given file and returns some evaluation metrics. args: filename (str): a file name that will be evaluated. rSTRING
HIGHrecommenders/models/deeprec/io/iterator.py0construct a dictionary that maps graph elements to values. args: data_dict (dict): a dictionary that maps string name toSTRING
HIGHrecommenders/models/deeprec/io/dkn_iterator.py0construct a dictionary that maps graph elements to values. args: data_dict (dict): a dictionary that maps string name toSTRING
HIGHrecommenders/models/deeprec/io/sequential_iterator.py0construct a dictionary that maps graph elements to values. args: data_dict (dict): a dictionary that maps string name toSTRING
Decorative Section Separators36 hits · 140 pts
SeverityFileLineSnippetContext
MEDIUM…models/deeprec/models/sequential/rnn_cell_implement.py14# ==============================================================================COMMENT
MEDIUMrecommenders/models/wide_deep/wide_deep_utils.py184 # ------------------------------------------------------------------COMMENT
MEDIUMrecommenders/models/wide_deep/wide_deep_utils.py186 # ------------------------------------------------------------------COMMENT
MEDIUMrecommenders/models/wide_deep/wide_deep_utils.py427# ---------------------------------------------------------------------------COMMENT
MEDIUMrecommenders/models/wide_deep/wide_deep_utils.py429# ---------------------------------------------------------------------------COMMENT
MEDIUM.github/workflows/self-hosted-runner.yml1# ---------------------------------------------------------COMMENT
MEDIUM.github/workflows/self-hosted-runner.yml4# ---------------------------------------------------------COMMENT
MEDIUM.github/workflows/compshare-vm.yml1# ---------------------------------------------------------COMMENT
MEDIUM.github/workflows/compshare-vm.yml4# ---------------------------------------------------------COMMENT
MEDIUM.github/workflows/unit-tests.yml1# ---------------------------------------------------------COMMENT
MEDIUM.github/workflows/unit-tests.yml4# ---------------------------------------------------------COMMENT
MEDIUM.github/workflows/sarplus.yml1# ---------------------------------------------------------COMMENT
MEDIUM.github/workflows/sarplus.yml4# ---------------------------------------------------------COMMENT
MEDIUM.github/workflows/spark-nightly.yml1# ---------------------------------------------------------COMMENT
MEDIUM.github/workflows/spark-nightly.yml4# ---------------------------------------------------------COMMENT
MEDIUM.github/workflows/spark-nightly.yml9 # ┌───────────── minute (0 - 59)COMMENT
MEDIUM.github/workflows/spark-nightly.yml10 # │ ┌───────────── hour (0 - 23)COMMENT
MEDIUM.github/workflows/spark-nightly.yml11 # │ │ ┌───────────── day of the month (1 - 31)COMMENT
MEDIUM.github/workflows/spark-nightly.yml12 # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)COMMENT
MEDIUM.github/workflows/spark-nightly.yml13 # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)COMMENT
MEDIUM.github/workflows/gpu-nightly.yml1# ---------------------------------------------------------COMMENT
MEDIUM.github/workflows/gpu-nightly.yml4# ---------------------------------------------------------COMMENT
MEDIUM.github/workflows/gpu-nightly.yml9 # ┌───────────── minute (0 - 59)COMMENT
MEDIUM.github/workflows/gpu-nightly.yml10 # │ ┌───────────── hour (0 - 23)COMMENT
MEDIUM.github/workflows/gpu-nightly.yml11 # │ │ ┌───────────── day of the month (1 - 31)COMMENT
MEDIUM.github/workflows/gpu-nightly.yml12 # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)COMMENT
MEDIUM.github/workflows/gpu-nightly.yml13 # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)COMMENT
MEDIUM.github/workflows/cpu-nightly.yml1# ---------------------------------------------------------COMMENT
MEDIUM.github/workflows/cpu-nightly.yml4# ---------------------------------------------------------COMMENT
MEDIUM.github/workflows/cpu-nightly.yml9 # ┌───────────── minute (0 - 59)COMMENT
MEDIUM.github/workflows/cpu-nightly.yml10 # │ ┌───────────── hour (0 - 23)COMMENT
MEDIUM.github/workflows/cpu-nightly.yml11 # │ │ ┌───────────── day of the month (1 - 31)COMMENT
MEDIUM.github/workflows/cpu-nightly.yml12 # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)COMMENT
MEDIUM.github/workflows/cpu-nightly.yml13 # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)COMMENT
MEDIUM.github/workflows/update_documentation.yml1# ---------------------------------------------------------COMMENT
MEDIUM.github/workflows/update_documentation.yml4# ---------------------------------------------------------COMMENT
Hallucination Indicators8 hits · 100 pts
SeverityFileLineSnippetContext
CRITICALrecommenders/utils/tf_utils.py272 self.summary_writer = tf.compat.v1.summary.FileWriterCache.get(CODE
CRITICALrecommenders/models/newsrec/models/base_model.py68 tf.compat.v1.keras.backend.set_session(sess)CODE
CRITICALrecommenders/models/deeprec/models/dkn.py402 initializer=tf.compat.v1.keras.initializers.VarianceScaling(CODE
CRITICALrecommenders/models/deeprec/models/dkn_item2item.py77 initializer=tf.compat.v1.keras.initializers.VarianceScaling(CODE
CRITICALrecommenders/models/deeprec/models/base_model.py183 return tf.compat.v1.keras.initializers.VarianceScaling(CODE
CRITICALrecommenders/models/deeprec/models/base_model.py190 return tf.compat.v1.keras.initializers.VarianceScaling(CODE
CRITICALrecommenders/models/deeprec/models/base_model.py197 return tf.compat.v1.keras.initializers.VarianceScaling(CODE
CRITICALrecommenders/models/deeprec/models/base_model.py204 return tf.compat.v1.keras.initializers.VarianceScaling(CODE
Over-Commented Block61 hits · 61 pts
SeverityFileLineSnippetContext
LOWtools/ci/compshare/utils.sh1#! /bin/bash -COMMENT
LOWtools/ci/compshare/utils.sh21 # "GPUType": "P40",COMMENT
LOWtools/ci/compshare/utils.sh121COMMENT
LOWtools/ci/compshare/setup_vm.sh1#! /bin/bash -COMMENT
LOWtools/ci/compshare/install_docker.sh1#! /bin/bash -COMMENT
LOWtools/ci/compshare/delete_vm.sh1#! /bin/bash -COMMENT
LOWtests/test_groups.yml1# Copyright (c) Recommenders contributors.COMMENT
LOWtests/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/smoke/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/smoke/recommenders/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/smoke/recommenders/models/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/smoke/examples/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/unit/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/unit/recommenders/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/unit/recommenders/datasets/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/unit/recommenders/utils/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/unit/recommenders/models/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/unit/recommenders/tuning/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/unit/recommenders/evaluation/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/unit/examples/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/responsible_ai/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/responsible_ai/recommenders/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/responsible_ai/recommenders/datasets/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/security/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/integration/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/integration/recommenders/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/integration/recommenders/utils/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/data_validation/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/data_validation/recommenders/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/data_validation/recommenders/datasets/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/data_validation/examples/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/regression/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/performance/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/performance/recommenders/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/performance/recommenders/evaluation/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/functional/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWtests/functional/examples/__init__.py1# Needed to execute the AzureML testsCOMMENT
LOWcontrib/sarplus/README.md81)COMMENT
LOWcontrib/sarplus/README.md101# ```pythonCOMMENT
LOWcontrib/sarplus/README.md121# col_rating="rating",COMMENT
LOWcontrib/sarplus/python/src/pysarplus.cpp1/*COMMENT
LOWrecommenders/utils/notebook_memory_management.py1# Original code: https://raw.githubusercontent.com/miguelgfierro/codebase/master/python/system/notebook_memory_managemenCOMMENT
LOW…models/deeprec/models/sequential/rnn_cell_implement.py1# Copyright 2015 The TensorFlow Authors. All Rights Reserved.COMMENT
LOW…amples/07_tutorials/KDD2020-tutorial/reco_gpu_kdd.yaml1# COMMENT
LOW…amples/07_tutorials/KDD2020-tutorial/reco_cpu_kdd.yaml1# COMMENT
LOW…les/07_tutorials/KDD2020-tutorial/utils/data_helper.py61# Returns:COMMENT
LOW.github/workflows/self-hosted-runner.yml1# ---------------------------------------------------------COMMENT
LOW.github/workflows/compshare-vm.yml1# ---------------------------------------------------------COMMENT
LOW.github/workflows/sarplus.yml1# ---------------------------------------------------------COMMENT
LOW.github/workflows/spark-nightly.yml1# ---------------------------------------------------------COMMENT
LOW.github/workflows/gpu-nightly.yml1# ---------------------------------------------------------COMMENT
LOW.github/workflows/cpu-nightly.yml1# ---------------------------------------------------------COMMENT
LOW.github/workflows/tools/compshare/utils.sh1#! /bin/bash -COMMENT
LOW.github/workflows/tools/compshare/utils.sh21 # "GPUType": "P40",COMMENT
LOW.github/workflows/tools/compshare/utils.sh181 response="$(curl -sSf "${request_url}")"COMMENT
LOW.github/workflows/tools/compshare/utils.sh361 | .[0] | [path(..)]COMMENT
LOW.github/workflows/tools/compshare/setup_vm.sh1#! /bin/bash -COMMENT
LOW.github/workflows/tools/compshare/setup_vm.sh21#COMMENT
LOW.github/workflows/tools/compshare/install_docker.sh1#! /bin/bash -COMMENT
LOW.github/workflows/tools/compshare/delete_vm.sh1#! /bin/bash -COMMENT
1 more matches not shown…
Deep Nesting51 hits · 51 pts
SeverityFileLineSnippetContext
LOWtests/unit/recommenders/utils/test_tf_utils.py41CODE
LOWtests/unit/recommenders/models/test_sasrec_model.py40CODE
LOWrecommenders/datasets/mind.py274CODE
LOWrecommenders/datasets/mind.py409CODE
LOWrecommenders/datasets/pandas_df_utils.py182CODE
LOWrecommenders/datasets/download_utils.py20CODE
LOWrecommenders/datasets/wikidata.py263CODE
LOWrecommenders/datasets/amazon_reviews.py192CODE
LOWrecommenders/datasets/amazon_reviews.py266CODE
LOWrecommenders/datasets/amazon_reviews.py459CODE
LOWrecommenders/utils/gpu_utils.py101CODE
LOWrecommenders/utils/gpu_utils.py108CODE
LOWrecommenders/utils/tf_utils.py25CODE
LOWrecommenders/utils/tf_utils.py40CODE
LOWrecommenders/utils/notebook_utils.py130CODE
LOWrecommenders/models/newsrec/newsrec_utils.py82CODE
LOWrecommenders/models/deeprec/deeprec_utils.py134CODE
LOWrecommenders/models/deeprec/deeprec_utils.py514CODE
LOWrecommenders/models/deeprec/io/nextitnet_iterator.py72CODE
LOWrecommenders/models/deeprec/io/sequential_iterator.py277CODE
LOWrecommenders/models/deeprec/models/dkn.py349CODE
LOWrecommenders/models/deeprec/models/base_model.py169CODE
LOWrecommenders/models/deeprec/models/base_model.py215CODE
LOWrecommenders/models/deeprec/models/base_model.py274CODE
LOWrecommenders/models/deeprec/models/base_model.py339CODE
LOWrecommenders/models/deeprec/models/base_model.py652CODE
LOWrecommenders/models/deeprec/models/xDeepFM.py161CODE
LOWrecommenders/models/deeprec/models/xDeepFM.py295CODE
LOW…els/deeprec/models/sequential/sequential_base_model.py76CODE
LOW…models/deeprec/models/sequential/rnn_cell_implement.py128CODE
LOW…models/deeprec/models/sequential/rnn_cell_implement.py393CODE
LOW…models/deeprec/models/sequential/rnn_cell_implement.py594CODE
LOWrecommenders/models/deeprec/models/graphrec/lightgcn.py372CODE
LOWrecommenders/models/rlrmc/conjugate_gradient_ms.py56CODE
LOWrecommenders/models/sar/sar_singlenode.py226CODE
LOWrecommenders/models/ncf/ncf_singlenode.py180CODE
LOWrecommenders/models/ncf/dataset.py142CODE
LOWrecommenders/models/ncf/dataset.py404CODE
LOWrecommenders/models/wide_deep/wide_deep_utils.py509CODE
LOWrecommenders/models/sasrec/model.py461CODE
LOWrecommenders/models/sasrec/model.py657CODE
LOWrecommenders/models/sasrec/model.py784CODE
LOWrecommenders/models/sasrec/model.py881CODE
LOW…les/07_tutorials/KDD2020-tutorial/utils/task_helper.py22CODE
LOW…les/07_tutorials/KDD2020-tutorial/utils/task_helper.py236CODE
LOW…les/07_tutorials/KDD2020-tutorial/utils/task_helper.py293CODE
LOW…les/07_tutorials/KDD2020-tutorial/utils/task_helper.py356CODE
LOW…les/07_tutorials/KDD2020-tutorial/utils/task_helper.py487CODE
LOW…les/07_tutorials/KDD2020-tutorial/utils/task_helper.py552CODE
LOW…les/07_tutorials/KDD2020-tutorial/utils/task_helper.py635CODE
LOW…les/07_tutorials/KDD2020-tutorial/utils/task_helper.py742CODE
Self-Referential Comments14 hits · 40 pts
SeverityFileLineSnippetContext
MEDIUMtools/databricks_install.py238 # Create a cluster if flaggedSTRING
MEDIUMtools/ci/compshare/utils.sh127 # Create a VM instanceCOMMENT
MEDIUMtools/ci/compshare/utils.sh243 # Create a VM with random names and password from available typesCOMMENT
MEDIUMtools/ci/compshare/setup_vm.sh7# Create a CompShare VM and prepare the environment for testingCOMMENT
MEDIUMtests/unit/recommenders/models/test_embdotbias_utils.py79 # Create a dummy modelCOMMENT
MEDIUMrecommenders/utils/notebook_utils.py59 # Define a regular expression pattern to match parameter assignments and ignore commentsCOMMENT
MEDIUMrecommenders/utils/notebook_utils.py98 # Create an execution preprocessorCOMMENT
MEDIUMrecommenders/models/deeprec/models/dkn.py385 # Create a convolution + maxpool layer for each filter sizeCOMMENT
MEDIUMrecommenders/models/embdotbias/model.py99 # Create a mapping from entity ID (user or item) to its integer index in the embedding matrixCOMMENT
MEDIUMrecommenders/models/tfidf/tfidf_utils.py37 # Initialize other variables used in this classCOMMENT
MEDIUMrecommenders/models/rbm/rbm.py451 # Create the data pipeline for faster trainingCOMMENT
MEDIUM.github/workflows/tools/compshare/utils.sh192 # Create a VM instanceCOMMENT
MEDIUM.github/workflows/tools/compshare/utils.sh369 # Create a VM with random names and password from available typesCOMMENT
MEDIUM.github/workflows/tools/compshare/setup_vm.sh7# Create a CompShare VM and prepare the environment for testingCOMMENT
Modern Structural Boilerplate31 hits · 31 pts
SeverityFileLineSnippetContext
LOWrecommenders/datasets/split_utils.py10logger = logging.getLogger(__name__)CODE
LOWrecommenders/datasets/pandas_df_utils.py17logger = logging.getLogger(__name__)CODE
LOWrecommenders/datasets/wikidata.py11logger = logging.getLogger(__name__)CODE
LOWrecommenders/utils/k8s_utils.py7logger = logging.getLogger(__name__)CODE
LOWrecommenders/utils/gpu_utils.py12logger = logging.getLogger(__name__)CODE
LOWrecommenders/models/newsrec/io/mind_iterator.py11__all__ = ["MINDIterator"]CODE
LOWrecommenders/models/newsrec/io/mind_all_iterator.py11__all__ = ["MINDAllIterator"]CODE
LOWrecommenders/models/newsrec/models/lstur.py15__all__ = ["LSTURModel"]CODE
LOWrecommenders/models/newsrec/models/naml.py12__all__ = ["NAMLModel"]CODE
LOWrecommenders/models/newsrec/models/base_model.py15__all__ = ["BaseModel"]CODE
LOWrecommenders/models/newsrec/models/nrms.py11__all__ = ["NRMSModel"]CODE
LOWrecommenders/models/newsrec/models/npa.py11__all__ = ["NPAModel"]CODE
LOWrecommenders/models/deeprec/io/dkn_iterator.py10__all__ = ["DKNTextIterator"]CODE
LOWrecommenders/models/deeprec/io/nextitnet_iterator.py12__all__ = ["NextItNetIterator"]CODE
LOWrecommenders/models/deeprec/io/sequential_iterator.py12__all__ = ["SequentialIterator"]CODE
LOWrecommenders/models/deeprec/models/dkn.py9__all__ = ["DKN"]CODE
LOWrecommenders/models/deeprec/models/base_model.py14__all__ = ["BaseModel"]CODE
LOWrecommenders/models/deeprec/models/xDeepFM.py10__all__ = ["XDeepFMModel"]CODE
LOW…els/deeprec/models/sequential/sequential_base_model.py14__all__ = ["SequentialBaseModel"]CODE
LOW…commenders/models/deeprec/models/sequential/sli_rec.py13__all__ = ["SLI_RECModel"]CODE
LOWrecommenders/models/deeprec/models/sequential/caser.py9__all__ = ["CaserModel"]CODE
LOWrecommenders/models/deeprec/models/sequential/asvd.py9__all__ = ["A2SVDModel"]CODE
LOWrecommenders/models/deeprec/models/sequential/gru.py11__all__ = ["GRUModel"]CODE
LOW…mmenders/models/deeprec/models/sequential/nextitnet.py9__all__ = ["NextItNetModel"]CODE
LOWrecommenders/models/deeprec/models/graphrec/lightgcn.py32logger = logging.getLogger(__name__)CODE
LOWrecommenders/models/deeprec/DataModel/ImplicitCF.py18logger = logging.getLogger(__name__)CODE
LOWrecommenders/models/rlrmc/RLRMCalgorithm.py17logger = logging.getLogger(__name__)CODE
LOWrecommenders/models/embdotbias/training_utils.py18logger = logging.getLogger(__name__)CODE
LOWrecommenders/models/ncf/ncf_singlenode.py13logger = logging.getLogger(__name__)CODE
LOWrecommenders/models/ncf/dataset.py20logger = logging.getLogger(__name__)CODE
LOWrecommenders/models/wide_deep/wide_deep_utils.py21logger = logging.getLogger(__name__)CODE
Unused Imports30 hits · 30 pts
SeverityFileLineSnippetContext
LOWtests/unit/recommenders/models/test_sar_singlenode.py5CODE
LOWtests/unit/recommenders/models/test_embdotbias_model.py7CODE
LOWtests/unit/examples/test_notebooks_python.py5CODE
LOWtests/regression/test_compatibility_tf.py13CODE
LOWtests/regression/test_compatibility_tf.py14CODE
LOWcontrib/sarplus/python/pysarplus/__init__.py6CODE
LOWcontrib/sarplus/python/pysarplus/__init__.py7CODE
LOWrecommenders/datasets/python_splitters.py4CODE
LOWrecommenders/utils/notebook_memory_management.py14CODE
LOWrecommenders/utils/notebook_memory_management.py15CODE
LOWrecommenders/utils/notebook_memory_management.py16CODE
LOWrecommenders/utils/notebook_memory_management.py17CODE
LOWrecommenders/utils/spark_utils.py8CODE
LOW…models/deeprec/models/sequential/rnn_cell_implement.py23CODE
LOW…models/deeprec/models/sequential/rnn_cell_implement.py24CODE
LOW…models/deeprec/models/sequential/rnn_cell_implement.py25CODE
LOWrecommenders/models/deeprec/models/graphrec/lightgcn.py4CODE
LOWrecommenders/models/rlrmc/conjugate_gradient_ms.py6CODE
LOWrecommenders/models/rlrmc/conjugate_gradient_ms.py6CODE
LOWrecommenders/models/embdotbias/training_utils.py9CODE
LOWrecommenders/models/embdotbias/training_utils.py9CODE
LOWrecommenders/models/embdotbias/training_utils.py9CODE
LOWrecommenders/models/embdotbias/training_utils.py9CODE
LOWrecommenders/models/embdotbias/training_utils.py9CODE
LOWrecommenders/models/sar/__init__.py4CODE
LOW…odel_select_and_optimize/train_scripts/svd_training.py17CODE
LOW…les/07_tutorials/KDD2020-tutorial/utils/data_helper.py8CODE
LOW…les/07_tutorials/KDD2020-tutorial/utils/task_helper.py12CODE
LOW…les/07_tutorials/KDD2020-tutorial/utils/task_helper.py18CODE
LOW…les/07_tutorials/KDD2020-tutorial/utils/task_helper.py19CODE
AI Response Leakage6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHrecommenders/models/deeprec/config/sli_rec.yaml12 layer_sizes : [100, 64] # layers' size of DNN. In this example, DNN has two layers, and each layer has 100 hidden nCODE
HIGHrecommenders/models/deeprec/config/nextitnet.yaml12 layer_sizes : [100, 64] # layers' size of DNN. In this example, DNN has two layers, and each layer has 100 hidden nCODE
HIGHrecommenders/models/deeprec/config/sum.yaml12 layer_sizes : [100, 64] # layers' size of DNN. In this example, DNN has two layers, and each layer has 100 hidden nCODE
HIGHrecommenders/models/deeprec/config/asvd.yaml12 layer_sizes : [100, 64] # layers' size of DNN. In this example, DNN has two layers, and each layer has 100 hidden nCODE
HIGHrecommenders/models/deeprec/config/caser.yaml12 layer_sizes : [100, 64] # layers' size of DNN. In this example, DNN has two layers, and each layer has 100 hidden nCODE
HIGHrecommenders/models/deeprec/config/gru.yaml12 layer_sizes : [100, 64] # layers' size of DNN. In this example, DNN has two layers, and each layer has 100 hidden nCODE
Redundant / Tautological Comments16 hits · 27 pts
SeverityFileLineSnippetContext
LOWtools/ci/compshare/utils.sh361 # Set timeout to (5 + 5) * 18 = 180 secondsCOMMENT
LOW…sts/unit/recommenders/datasets/test_pandas_df_utils.py173 # Check if the dim is the same.COMMENT
LOW…sts/unit/recommenders/datasets/test_pandas_df_utils.py176 # Check if the columns are converted successfully.COMMENT
LOW…sts/unit/recommenders/datasets/test_pandas_df_utils.py185 # Check if the duplicated column entries are indexed correctly.COMMENT
LOW…sts/unit/recommenders/datasets/test_pandas_df_utils.py195 # Check if the file is written successfully.COMMENT
LOWtests/unit/recommenders/models/test_sar_singlenode.py178 # Set time_now to 60 days laterCOMMENT
LOW…unit/recommenders/evaluation/test_python_evaluation.py71 # Check if _check_column_dtypes wraps the input function (i.e. returns the same output as the input function's)COMMENT
LOWcontrib/sarplus/python/tests/test_pyspark_sar.py323 # Set time_now to 60 days laterCOMMENT
LOWrecommenders/utils/notebook_utils.py56 # Check if the new value is a string and surround it with quotes if necessaryCOMMENT
LOWrecommenders/models/tfidf/tfidf_utils.py104 # Check if for BERT tokenizationCOMMENT
LOWrecommenders/evaluation/spark_evaluation.py65 # Check if inputs are Spark DataFrames.COMMENT
LOWrecommenders/evaluation/spark_evaluation.py76 # Check if columns exist.COMMENT
LOWrecommenders/evaluation/spark_evaluation.py217 # Check if inputs are Spark DataFrames.COMMENT
LOWrecommenders/evaluation/spark_evaluation.py228 # Check if columns exist.COMMENT
LOW.github/workflows/tools/compshare/utils.sh322 # Check if the VM specification match the requirements.COMMENT
LOW.github/workflows/tools/compshare/utils.sh521 # Set timeout to (5 + 5) * 30 = 300 secondsCOMMENT
AI Structural Patterns25 hits · 25 pts
SeverityFileLineSnippetContext
LOWcontrib/sarplus/python/pysarplus/SARPlus.py29CODE
LOWrecommenders/datasets/python_splitters.py44CODE
LOWrecommenders/datasets/pandas_df_utils.py267CODE
LOWrecommenders/datasets/movielens.py368CODE
LOWrecommenders/datasets/spark_splitters.py48CODE
LOWrecommenders/utils/plot.py4CODE
LOWrecommenders/models/newsrec/models/base_model.py340CODE
LOWrecommenders/models/deeprec/models/dkn_item2item.py129CODE
LOWrecommenders/models/deeprec/models/base_model.py650CODE
LOW…models/deeprec/models/sequential/rnn_cell_implement.py47CODE
LOW…models/deeprec/models/sequential/rnn_cell_implement.py312CODE
LOWrecommenders/models/deeprec/models/graphrec/lightgcn.py217CODE
LOWrecommenders/models/sar/sar_singlenode.py43CODE
LOWrecommenders/models/ncf/ncf_singlenode.py27CODE
LOWrecommenders/models/ncf/dataset.py304CODE
LOWrecommenders/models/wide_deep/wide_deep_utils.py55CODE
LOWrecommenders/models/wide_deep/wide_deep_utils.py188CODE
LOWrecommenders/models/rbm/rbm.py17CODE
LOWrecommenders/models/vae/standard_vae.py83CODE
LOWrecommenders/models/vae/multinomial_vae.py98CODE
LOWrecommenders/models/sasrec/model.py167CODE
LOWrecommenders/models/sasrec/model.py255CODE
LOWrecommenders/models/sasrec/model.py354CODE
LOWrecommenders/evaluation/python_evaluation.py616CODE
LOWexamples/06_benchmarks/benchmark_utils.py230CODE
Docstring Block Structure5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHrecommenders/datasets/pandas_df_utils.py87Converts an input dataframe to another dataframe in libffm format. A text file of the converted Dataframe is optionaSTRING
HIGHrecommenders/datasets/pandas_df_utils.py279Utility function to sample negative feedback from user-item interaction dataset. This negative sampling function wilSTRING
HIGHrecommenders/datasets/download_utils.py95Return a path to download data. If `path=None`, then it yields a temporal path that is eventually deleted, otherwiseSTRING
HIGHrecommenders/datasets/movielens.py610Generate a fake movielens DataFrame with all columns. Args: size (int): number of rows to generate.STRING
HIGHrecommenders/models/sasrec/util.py48 Split user interactions into train/valid/test sets using leave-k-out strategy. For each user with enouSTRING
Excessive Try-Catch Wrapping24 hits · 22 pts
SeverityFileLineSnippetContext
LOWtools/databricks_install.py106 except Exception:STRING
LOWrecommenders/datasets/criteo.py118 except Exception:CODE
LOWrecommenders/datasets/wikidata.py41 except Exception as e:CODE
LOWrecommenders/datasets/wikidata.py105 except Exception as e:CODE
LOWrecommenders/datasets/wikidata.py126 except Exception as e:CODE
LOWrecommenders/datasets/wikidata.py190 except Exception as e:STRING
LOWrecommenders/datasets/wikidata.py257 except Exception as e:STRING
LOWrecommenders/datasets/wikidata.py280 except Exception as e:STRING
LOWrecommenders/datasets/wikidata.py291 except Exception as e:STRING
MEDIUMrecommenders/datasets/wikidata.py38def wrapper(*args, **kwargs):CODE
LOWrecommenders/datasets/covid_utils.py137 except Exception:CODE
LOWrecommenders/utils/general_utils.py42 except Exception:CODE
LOWrecommenders/utils/notebook_memory_management.py35except Exception:CODE
LOWrecommenders/utils/gpu_utils.py31 except Exception: # numba.cuda.cudadrv.error.CudaSupportError:CODE
LOWrecommenders/models/deeprec/deeprec_utils.py301 except Exception: # for other exceptionsCODE
LOWrecommenders/models/deeprec/models/base_model.py433 except Exception:CODE
LOWrecommenders/models/deeprec/models/graphrec/lightgcn.py367 except Exception:CODE
LOWrecommenders/models/embdotbias/training_utils.py136 except Exception as e:CODE
LOWrecommenders/models/tfidf/tfidf_utils.py82 except Exception:CODE
LOWrecommenders/models/tfidf/tfidf_utils.py218 except Exception:CODE
LOWrecommenders/models/tfidf/tfidf_utils.py230 except Exception:CODE
LOWrecommenders/tuning/nni/ncf_training.py171 except Exception as exception:CODE
LOWrecommenders/tuning/nni/nni_utils.py70 except Exception:CODE
LOWrecommenders/tuning/nni/svd_training.py183 except Exception as exception:CODE
Cross-Language Confusion2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHtests/unit/recommenders/models/test_ncf_dataset.py66 assert train.equals(datafile_df)CODE
HIGHtests/unit/recommenders/models/test_ncf_dataset.py201 assert train_file_data.equals(train_loader_df)CODE
Slop Phrases1 hit · 0 pts
SeverityFileLineSnippetContext
LOWtools/databricks_install.py235 # first make sure you are using the correct profile and connecting to the intended workspaceSTRING
Overly Generic Function Names1 hit · 0 pts
SeverityFileLineSnippetContext
LOWrecommenders/datasets/wikidata.py34 def my_function():STRING