Repository Analysis

modelscope/modelscope

ModelScope: bring the notion of Model-as-a-Service to life.

25.4 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of modelscope/modelscope, a Python project with 9,028 GitHub stars. SynthScan v2.0 examined 630,834 lines of code across 3482 source files, recording 10757 pattern matches distributed across 21 syntactic categories. The overall adjusted score of 25.4 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).

25.4
Adjusted Score
25.4
Raw Score
100%
Time Factor
2026-07-14
Last Push
9.0K
Stars
Python
Language
630.8K
Lines of Code
3.5K
Files
10.8K
Pattern Hits
2026-07-14
Scan Date
0.34
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 9HIGH 1166MEDIUM 386LOW 9196

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 10757 distinct pattern matches across 21 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.

Cross-File Repetition1077 hits · 5385 pts
SeverityFileLineSnippetContext
HIGHtests/trainers/test_finetune_plug_mental.py0this unittest is used to reproduce the clue:tnews dataset + structbert model training results. user can train a custom dSTRING
HIGHtests/trainers/test_finetune_token_classification.py0this unittest is used to reproduce the clue:tnews dataset + structbert model training results. user can train a custom dSTRING
HIGHtests/trainers/test_finetune_sequence_classification.py0this unittest is used to reproduce the clue:tnews dataset + structbert model training results. user can train a custom dSTRING
HIGHmodelscope/metrics/image_inpainting_metric.py0part of the implementation is borrowed and modified from lama, publicly available at https://github.com/saic-mdal/lamaSTRING
HIGHmodelscope/models/cv/image_inpainting/refinement.py0part of the implementation is borrowed and modified from lama, publicly available at https://github.com/saic-mdal/lamaSTRING
HIGHmodelscope/models/cv/image_inpainting/default.py0part of the implementation is borrowed and modified from lama, publicly available at https://github.com/saic-mdal/lamaSTRING
HIGHmodelscope/models/cv/image_inpainting/base.py0part of the implementation is borrowed and modified from lama, publicly available at https://github.com/saic-mdal/lamaSTRING
HIGH…cope/models/cv/image_inpainting/modules/adversarial.py0part of the implementation is borrowed and modified from lama, publicly available at https://github.com/saic-mdal/lamaSTRING
HIGH…scope/models/cv/image_inpainting/modules/perceptual.py0part of the implementation is borrowed and modified from lama, publicly available at https://github.com/saic-mdal/lamaSTRING
HIGH…lscope/models/cv/image_inpainting/modules/inception.py0part of the implementation is borrowed and modified from lama, publicly available at https://github.com/saic-mdal/lamaSTRING
HIGHmodelscope/models/cv/image_inpainting/modules/ffc.py0part of the implementation is borrowed and modified from lama, publicly available at https://github.com/saic-mdal/lamaSTRING
HIGH…models/cv/image_inpainting/modules/feature_matching.py0part of the implementation is borrowed and modified from lama, publicly available at https://github.com/saic-mdal/lamaSTRING
HIGH…pe/models/cv/image_inpainting/modules/ade20k/resnet.py0part of the implementation is borrowed and modified from lama, publicly available at https://github.com/saic-mdal/lamaSTRING
HIGH…cope/models/cv/image_inpainting/modules/ade20k/base.py0part of the implementation is borrowed and modified from lama, publicly available at https://github.com/saic-mdal/lamaSTRING
HIGH…_datasets/image_inpainting/image_inpainting_dataset.py0part of the implementation is borrowed and modified from lama, publicly available at https://github.com/saic-mdal/lamaSTRING
HIGHmodelscope/metrics/image_denoise_metric.py0reorder images to 'hwc' order. if the input_order is (h, w), return (h, w, 1); if the input_order is (c, h, w), return (STRING
HIGHmodelscope/metrics/image_color_enhance_metric.py0reorder images to 'hwc' order. if the input_order is (h, w), return (h, w, 1); if the input_order is (c, h, w), return (STRING
HIGH…e/metrics/video_super_resolution_metric/metric_util.py0reorder images to 'hwc' order. if the input_order is (h, w), return (h, w, 1); if the input_order is (c, h, w), return (STRING
HIGH…preprocessors/nlp/token_classification_preprocessor.py0return the id2label mapping according to the label2id mapping. @return: the id2label mapping if exists.STRING
HIGH…/preprocessors/nlp/text_classification_preprocessor.py0return the id2label mapping according to the label2id mapping. @return: the id2label mapping if exists.STRING
HIGH…ocessors/nlp/dialog_classification_use_preprocessor.py0return the id2label mapping according to the label2id mapping. @return: the id2label mapping if exists.STRING
HIGH…preprocessors/nlp/token_classification_preprocessor.py0tokenize the text. args: sequence1: the first sequence. sequence2: the second sequence which may be none. returns: the eSTRING
HIGH…/preprocessors/nlp/text_classification_preprocessor.py0tokenize the text. args: sequence1: the first sequence. sequence2: the second sequence which may be none. returns: the eSTRING
HIGHmodelscope/preprocessors/nlp/fill_mask_preprocessor.py0tokenize the text. args: sequence1: the first sequence. sequence2: the second sequence which may be none. returns: the eSTRING
HIGH…cope/preprocessors/nlp/text_generation_preprocessor.py0tokenize the text. args: sequence1: the first sequence. sequence2: the second sequence which may be none. returns: the eSTRING
HIGH…delscope/preprocessors/nlp/siamese_uie_preprocessor.py0preprocess the data args: model_dir (str): model pathSTRING
HIGH…rocessors/nlp/zero_shot_classification_preprocessor.py0preprocess the data args: model_dir (str): model pathSTRING
HIGH…e/preprocessors/nlp/mglm_summarization_preprocessor.py0preprocess the data args: model_dir (str): model pathSTRING
HIGH…/space_T_en/conversational_text_to_sql_preprocessor.py0preprocess the data args: model_dir (str): model pathSTRING
HIGH…ors/nlp/space/dialog_intent_prediction_preprocessor.py0preprocess the data args: model_dir (str): model pathSTRING
HIGH…essors/nlp/space/dialog_state_tracking_preprocessor.py0preprocess the data args: model_dir (str): model pathSTRING
HIGH…reprocessors/nlp/space/dialog_modeling_preprocessor.py0preprocess the data args: model_dir (str): model pathSTRING
HIGH…nlp/document_grounded_dialog_retrieval_preprocessor.py0the preprocessor for dgds rerank task, based on transformers' tokenizer. args: model_dir: the model dir containing the eSTRING
HIGH…/nlp/document_grounded_dialog_generate_preprocessor.py0the preprocessor for dgds rerank task, based on transformers' tokenizer. args: model_dir: the model dir containing the eSTRING
HIGH…rs/nlp/document_grounded_dialog_rerank_preprocessor.py0the preprocessor for dgds rerank task, based on transformers' tokenizer. args: model_dir: the model dir containing the eSTRING
HIGHmodelscope/preprocessors/nlp/space/tokenizer.py0runs basic whitespace cleaning and splitting on a piece of text.STRING
HIGHmodelscope/models/multi_modal/clip/bert_tokenizer.py0runs basic whitespace cleaning and splitting on a piece of text.STRING
HIGHmodelscope/models/multi_modal/diffusion/tokenizer.py0runs basic whitespace cleaning and splitting on a piece of text.STRING
HIGHmodelscope/models/multi_modal/ofa/tokenization_ofa.py0runs basic whitespace cleaning and splitting on a piece of text.STRING
HIGHmodelscope/models/nlp/mglm/data_utils/wordpiece.py0runs basic whitespace cleaning and splitting on a piece of text.STRING
HIGHmodelscope/preprocessors/nlp/space/tokenizer.py0converts a sequence of tokens into ids using the vocab.STRING
HIGHmodelscope/models/multi_modal/diffusion/tokenizer.py0converts a sequence of tokens into ids using the vocab.STRING
HIGH…lscope/models/nlp/mglm/data_utils/tokenization_gpt2.py0converts a sequence of tokens into ids using the vocab.STRING
HIGHmodelscope/models/nlp/mglm/data_utils/wordpiece.py0converts a sequence of tokens into ids using the vocab.STRING
HIGHmodelscope/preprocessors/nlp/space/tokenizer.py0runs basic tokenization (punctuation splitting, lower casing, etc.).STRING
HIGHmodelscope/models/multi_modal/clip/bert_tokenizer.py0runs basic tokenization (punctuation splitting, lower casing, etc.).STRING
HIGHmodelscope/models/multi_modal/diffusion/tokenizer.py0runs basic tokenization (punctuation splitting, lower casing, etc.).STRING
HIGHmodelscope/models/nlp/mglm/data_utils/wordpiece.py0runs basic tokenization (punctuation splitting, lower casing, etc.).STRING
HIGHmodelscope/preprocessors/nlp/space/tokenizer.py0constructs a basictokenizer. args: do_lower_case: whether to lower case the input.STRING
HIGHmodelscope/models/multi_modal/clip/bert_tokenizer.py0constructs a basictokenizer. args: do_lower_case: whether to lower case the input.STRING
HIGHmodelscope/models/multi_modal/diffusion/tokenizer.py0constructs a basictokenizer. args: do_lower_case: whether to lower case the input.STRING
HIGHmodelscope/models/nlp/mglm/data_utils/wordpiece.py0constructs a basictokenizer. args: do_lower_case: whether to lower case the input.STRING
HIGHmodelscope/preprocessors/nlp/space/tokenizer.py0checks whether cp is the codepoint of a cjk character.STRING
HIGHmodelscope/preprocessors/templates/base.py0checks whether cp is the codepoint of a cjk character.STRING
HIGHmodelscope/utils/chinese_utils.py0checks whether cp is the codepoint of a cjk character.STRING
HIGHmodelscope/models/multi_modal/clip/bert_tokenizer.py0checks whether cp is the codepoint of a cjk character.STRING
HIGHmodelscope/models/multi_modal/diffusion/tokenizer.py0checks whether cp is the codepoint of a cjk character.STRING
HIGHmodelscope/models/nlp/mglm/data_utils/wordpiece.py0checks whether cp is the codepoint of a cjk character.STRING
HIGHmodelscope/preprocessors/nlp/space/tokenizer.py0performs invalid character removal and whitespace cleanup on text.STRING
HIGHmodelscope/models/multi_modal/clip/bert_tokenizer.py0performs invalid character removal and whitespace cleanup on text.STRING
1017 more matches not shown…
Unused Imports4591 hits · 4356 pts
SeverityFileLineSnippetContext
LOWtools/weight_diff.py18CODE
LOWtests/json_call_test.py3CODE
LOW…preprocessors/test_action_detection_mapper_security.py32CODE
LOW…preprocessors/test_action_detection_mapper_security.py40CODE
LOW…preprocessors/test_action_detection_mapper_security.py41CODE
LOW…preprocessors/test_action_detection_mapper_security.py42CODE
LOW…preprocessors/test_action_detection_mapper_security.py61CODE
LOWtests/studios/test_studio_cli.py13CODE
LOWtests/studios/test_studio_cli.py19CODE
LOWtests/test_metrics/test_token_classification_metrics.py10CODE
LOW…s/pipelines/test_wenet_automatic_speech_recognition.py14CODE
LOWtests/pipelines/test_image_matching.py4CODE
LOWtests/pipelines/test_image_matching.py6CODE
LOWtests/pipelines/test_image_matching.py7CODE
LOWtests/pipelines/test_image_matching.py8CODE
LOWtests/pipelines/test_image_matting.py10CODE
LOWtests/pipelines/test_video_frame_interpolation.py2CODE
LOWtests/pipelines/test_video_frame_interpolation.py6CODE
LOWtests/pipelines/test_lineless_table_recognition.py5CODE
LOWtests/pipelines/test_lineless_table_recognition.py6CODE
LOWtests/pipelines/test_addr_similarity.py4CODE
LOWtests/pipelines/test_addr_similarity.py6CODE
LOWtests/pipelines/test_addr_similarity.py8CODE
LOWtests/pipelines/test_addr_similarity.py11CODE
LOWtests/pipelines/test_addr_similarity.py11CODE
LOWtests/pipelines/test_nerf_recon_4k.py7CODE
LOWtests/pipelines/test_nerf_recon_4k.py9CODE
LOWtests/pipelines/test_nerf_recon_4k.py12CODE
LOWtests/pipelines/test_image_local_feature_matching.py4CODE
LOWtests/pipelines/test_image_local_feature_matching.py7CODE
LOWtests/pipelines/test_image_local_feature_matching.py8CODE
LOWtests/pipelines/test_image_local_feature_matching.py13CODE
LOWtests/pipelines/test_cartoon_stable_diffusion.py10CODE
LOWtests/pipelines/test_video_colorization.py2CODE
LOWtests/pipelines/test_video_colorization.py5CODE
LOWtests/pipelines/test_video_colorization.py8CODE
LOW…ts/pipelines/test_document_grounded_dialog_generate.py2CODE
LOWtests/pipelines/test_panorama_depth_estimation.py6CODE
LOWtests/pipelines/test_panorama_depth_estimation.py11CODE
LOWtests/pipelines/test_panorama_depth_estimation_s2net.py6CODE
LOWtests/pipelines/test_vqrf.py7CODE
LOWtests/pipelines/test_vqrf.py9CODE
LOWtests/pipelines/test_vqrf.py11CODE
LOWtests/pipelines/test_videocomposer.py2CODE
LOWtests/pipelines/test_videocomposer.py5CODE
LOWtests/pipelines/test_videocomposer.py6CODE
LOWtests/pipelines/test_realtime_video_object_detection.py4CODE
LOWtests/pipelines/test_realtime_video_object_detection.py5CODE
LOWtests/pipelines/test_realtime_video_object_detection.py9CODE
LOW…speaker_diarization_semantic_speaker_turn_detection.py3CODE
LOWtests/pipelines/test_remote_config_security.py30CODE
LOWtests/pipelines/test_remote_config_security.py33CODE
LOWtests/pipelines/test_face_reconstruction.py2CODE
LOWtests/pipelines/test_facial_expression_recognition.py6CODE
LOWtests/pipelines/test_facial_expression_recognition.py8CODE
LOWtests/pipelines/test_facial_expression_recognition.py13CODE
LOWtests/pipelines/test_gpt3_text_generation.py7CODE
LOWtests/pipelines/test_text_to_speech.py9CODE
LOWtests/pipelines/test_text_to_speech.py17CODE
LOW…s/pipelines/test_document_grounded_dialog_retrieval.py2CODE
4531 more matches not shown…
Hyper-Verbose Identifiers1494 hits · 1496 pts
SeverityFileLineSnippetContext
LOWtools/weight_diff.py32def smart_tokenizer_and_embedding_resize(special_tokens_dict: Dict, tokenizer,CODE
LOWdocker/build_image.py49 def _generate_cudatoolkit_version(self, cuda_version: str) -> str:CODE
LOWdocker/build_image.py61 def _remove_pynini_related_dependency(content: str) -> str:CODE
LOWtests/run.py93def gather_test_suites_in_files(test_dir, case_file_list, list_tests):CODE
LOWtests/run.py167def async_run_command_with_popen(cmd, device_id):CODE
LOWtests/run.py382def run_non_parallelizable_test_suites(suites, result_dir):CODE
LOWtests/run.py557def patch_transformers_for_safe_models():CODE
LOW…preprocessors/test_action_detection_mapper_security.py90 def test_legitimate_python_repr_payload_parses(self):CODE
LOW…preprocessors/test_action_detection_mapper_security.py97 def test_legitimate_json_payload_parses(self):CODE
LOW…preprocessors/test_action_detection_mapper_security.py103 def test_none_payload_becomes_empty_list(self):CODE
LOW…preprocessors/test_action_detection_mapper_security.py106 def test_already_parsed_list_passes_through(self):CODE
LOW…preprocessors/test_action_detection_mapper_security.py119 def test_bytes_payload_is_decoded_then_parsed(self):CODE
LOW…preprocessors/test_action_detection_mapper_security.py125 def test_malicious_import_payload_blocked(self):CODE
LOW…preprocessors/test_action_detection_mapper_security.py138 def test_malicious_function_call_blocked(self):CODE
LOW…preprocessors/test_action_detection_mapper_security.py143 def test_malicious_attribute_access_blocked(self):CODE
LOW…preprocessors/test_action_detection_mapper_security.py147 def test_mapper_call_swallows_malicious_payload(self):CODE
LOWtests/preprocessors/test_nlp.py56 def test_preprocessor_download(self):CODE
LOWtests/preprocessors/test_nlp.py67 def test_token_classification_tokenize_bert(self):CODE
LOWtests/preprocessors/test_nlp.py101 def test_token_classification_tokenize_roberta(self):CODE
LOWtests/studios/test_studio_cli.py87 def test_studio_settings_help(self):CODE
LOWtests/studios/test_studio_cli.py101 def test_download_repo_type_includes_model(self):CODE
LOWtests/studios/test_studio_cli.py106 def test_create_includes_studio_args(self):CODE
LOWtests/studios/test_studio_cli.py126 def test_studio_deploy_missing_id(self):CODE
LOWtests/studios/test_studio_cli.py131 def test_studio_no_subcommand_raises(self):CODE
LOWtests/studios/test_studio_cli.py138 def test_studio_settings_no_field_raises(self):CODE
LOWtests/studios/test_studio_cli.py158 def test_secret_no_action_raises(self):CODE
LOWtests/studios/test_studio_cli.py237 def test_create_studio_exist_ok(self):CODE
LOWtests/studios/test_studio_cli.py253 def test_create_studio_exist_raises(self):CODE
LOWtests/studios/test_studio_cli.py423 def test_secret_update_direct(self):CODE
LOWtests/studios/test_studio_cli.py449 def test_secret_delete_direct(self):CODE
LOWtests/pipelines/test_image_editing_masactrl.py29 def test_run_by_direct_model_download(self):CODE
LOWtests/pipelines/test_skin_retouching.py28 def test_run_by_direct_model_download(self):CODE
LOWtests/pipelines/test_skin_retouching.py39 def test_run_modelhub_default_model(self):CODE
LOWtests/pipelines/test_video_multi_modal_embedding.py34 def test_run_with_default_model(self):CODE
LOWtests/pipelines/test_image_matting.py41 def test_run_modelhub_default_model(self):CODE
LOWtests/pipelines/test_image_matting.py49 def test_run_with_modelscope_dataset(self):CODE
LOWtests/pipelines/test_video_frame_interpolation.py23 def test_run_by_direct_model_download(self):CODE
LOWtests/pipelines/test_video_frame_interpolation.py39 def test_run_with_model_from_modelhub(self):CODE
LOWtests/pipelines/test_video_frame_interpolation.py54 def test_run_with_default_model(self):CODE
LOWtests/pipelines/test_lineless_table_recognition.py27 def test_run_with_model_from_modelhub(self):CODE
LOWtests/pipelines/test_lineless_table_recognition.py33 def test_run_modelhub_default_model(self):CODE
LOW…pipelines/test_msrresnetlite_video_super_resolution.py21 def test_run_by_direct_model_download(self):CODE
LOW…pipelines/test_msrresnetlite_video_super_resolution.py30 def test_run_with_model_from_modelhub(self):CODE
LOW…pipelines/test_msrresnetlite_video_super_resolution.py46 def test_run_with_default_model(self):CODE
LOWtests/pipelines/test_image_control_3d_portrait.py20 def test_run_by_direct_model_download(self):CODE
LOWtests/pipelines/test_image_control_3d_portrait.py43 def test_run_modelhub_default_model(self):CODE
LOWtests/pipelines/test_addr_similarity.py22 def test_run_with_model_from_modelhub(self):CODE
LOWtests/pipelines/test_human_image_generation.py41 def test_run_modelhub_default_model(self):CODE
LOWtests/pipelines/test_nerf_recon_4k.py40 # def test_run_by_direct_model_download(self):COMMENT
LOWtests/pipelines/test_image_local_feature_matching.py24 def test_image_local_feature_matching(self):CODE
LOWtests/pipelines/test_image_paint_by_example.py47 def test_paintbyexample_with_image(self):CODE
LOWtests/pipelines/test_image_depth_estimation_marigold.py30 def test_run_by_direct_model_download(self):CODE
LOWtests/pipelines/test_document_segmentation.py34 def test_run_with_document_segmentation(self):CODE
LOWtests/pipelines/test_document_segmentation.py46 def test_run_with_topic_segmentation(self):CODE
LOWtests/pipelines/test_document_segmentation.py55 def test_run_with_documents_segmentation(self):CODE
LOWtests/pipelines/test_speech_signal_process.py171 def test_zipenhancer_ans_bytes(self):CODE
LOWtests/pipelines/test_text_generation.py108 def test_palm_zh_base_with_model_name_batch(self):STRING
LOWtests/pipelines/test_text_generation.py117 def test_palm_zh_base_with_model_name_batch_iter(self):STRING
LOWtests/pipelines/test_text_generation.py126 def test_palm_en_with_model_name(self):STRING
LOWtests/pipelines/test_text_generation.py131 def test_gpt_base_with_model_name(self):STRING
1434 more matches not shown…
AI Structural Patterns1185 hits · 1160 pts
SeverityFileLineSnippetContext
LOWtests/run.py487CODE
LOWtests/json_call_test.py50CODE
LOWtests/pipelines/test_document_segmentation.py31CODE
LOWtests/pipelines/test_speaker_verification.py57CODE
LOWtests/pipelines/test_extractive_summarization.py28CODE
LOWmodelscope/metrics/image_denoise_metric.py230CODE
LOWmodelscope/metrics/action_detection_evaluator.py88CODE
LOWmodelscope/preprocessors/kws.py42CODE
LOWmodelscope/preprocessors/kws.py72CODE
LOWmodelscope/preprocessors/multi_modal.py796CODE
LOWmodelscope/preprocessors/multi_modal.py810CODE
LOWmodelscope/preprocessors/asr.py39CODE
LOWmodelscope/preprocessors/speaker.py33CODE
LOWmodelscope/preprocessors/speaker.py64CODE
LOW…preprocessors/nlp/token_classification_preprocessor.py60CODE
LOW…preprocessors/nlp/token_classification_preprocessor.py202CODE
LOW…ocessors/nlp/token_classification_viet_preprocessor.py37CODE
LOW…/preprocessors/nlp/text_classification_preprocessor.py128CODE
LOW…sors/nlp/machine_reading_comprehension_preprocessor.py69CODE
LOWmodelscope/preprocessors/nlp/canmt_translation.py109CODE
LOWmodelscope/preprocessors/nlp/fill_mask_preprocessor.py59CODE
LOWmodelscope/preprocessors/nlp/fill_mask_preprocessor.py273CODE
LOWmodelscope/preprocessors/nlp/text_error_correction.py67CODE
LOW…elscope/preprocessors/nlp/text_ranking_preprocessor.py42CODE
LOW…ocessors/nlp/token_classification_thai_preprocessor.py30CODE
LOW…ocessors/nlp/token_classification_thai_preprocessor.py50CODE
LOW…elscope/preprocessors/nlp/mgeo_ranking_preprocessor.py119CODE
LOW…e/preprocessors/nlp/feature_extraction_preprocessor.py75CODE
LOW…eprocessors/nlp/faq_question_answering_preprocessor.py18CODE
LOWmodelscope/preprocessors/nlp/space/dst_processors.py409CODE
LOWmodelscope/preprocessors/nlp/space/dst_processors.py669CODE
LOWmodelscope/preprocessors/nlp/space/dst_processors.py695CODE
LOWmodelscope/preprocessors/nlp/space/dst_processors.py737CODE
LOWmodelscope/preprocessors/nlp/space/dst_processors.py800CODE
LOWmodelscope/preprocessors/nlp/space/fields/gen_field.py386CODE
LOWmodelscope/preprocessors/templates/utils.py329CODE
LOWmodelscope/preprocessors/templates/template.py1437CODE
LOWmodelscope/preprocessors/cv/mmcls_preprocessor.py76CODE
LOW…scope/preprocessors/cv/image_quality_assessment_mos.py65CODE
LOWmodelscope/preprocessors/ofa/utils/vision_helper.py44CODE
LOWmodelscope/preprocessors/ofa/utils/vision_helper.py68CODE
LOWmodelscope/preprocessors/ofa/utils/vision_helper.py79CODE
LOWmodelscope/preprocessors/ofa/utils/vision_helper.py89CODE
LOWmodelscope/preprocessors/ofa/utils/vision_helper.py99CODE
LOWmodelscope/preprocessors/ofa/utils/vision_helper.py110CODE
LOWmodelscope/preprocessors/ofa/utils/vision_helper.py120CODE
LOWmodelscope/preprocessors/ofa/utils/vision_helper.py151CODE
LOWmodelscope/preprocessors/ofa/utils/vision_helper.py163CODE
LOWmodelscope/preprocessors/ofa/utils/vision_helper.py175CODE
LOWmodelscope/preprocessors/ofa/utils/vision_helper.py183CODE
LOWmodelscope/preprocessors/ofa/utils/vision_helper.py192CODE
LOWmodelscope/tools/speech_tts_autolabel.py26CODE
LOWmodelscope/server/api/routers/model_router.py37CODE
LOWmodelscope/pipelines/builder.py75CODE
LOWmodelscope/pipelines/pipeline_template.py87CODE
LOW…lscope/pipelines/science/protein_structure_pipeline.py144CODE
LOWmodelscope/pipelines/audio/kws_kwsbp_pipeline.py74CODE
LOW…delscope/pipelines/audio/speech_separation_pipeline.py151CODE
LOWmodelscope/pipelines/audio/funasr_pipeline.py75CODE
LOW…pe/pipelines/audio/segmentation_clustering_pipeline.py321CODE
1125 more matches not shown…
Deep Nesting1020 hits · 1005 pts
SeverityFileLineSnippetContext
LOWtests/run.py48CODE
LOWtests/run.py93CODE
LOWtests/run.py223CODE
LOWtests/run.py242CODE
LOWtests/run.py490CODE
LOWtests/fileio/test_io.py12CODE
LOWtests/studios/conftest_env.py112CODE
LOWtests/msdatasets/test_stream_load.py62CODE
LOWtests/msdatasets/test_dataset_delete.py48CODE
LOWmodelscope/metainfo.py1081CODE
LOWmodelscope/metrics/video_stabilization_metric.py122CODE
LOWmodelscope/metrics/translation_evaluation_metric.py135CODE
LOWmodelscope/metrics/token_classification_metric.py54CODE
LOW…delscope/metrics/image_instance_segmentation_metric.py45CODE
LOW…delscope/metrics/image_instance_segmentation_metric.py212CODE
LOWmodelscope/preprocessors/multi_modal.py277CODE
LOWmodelscope/preprocessors/multi_modal.py735CODE
LOWmodelscope/preprocessors/asr.py193CODE
LOWmodelscope/preprocessors/common.py69CODE
LOWmodelscope/preprocessors/common.py150CODE
LOWmodelscope/preprocessors/common.py24CODE
LOWmodelscope/preprocessors/audio.py101CODE
LOWmodelscope/preprocessors/speaker.py196CODE
LOWmodelscope/preprocessors/video.py243CODE
LOWmodelscope/preprocessors/image.py87CODE
LOWmodelscope/preprocessors/image.py106CODE
LOWmodelscope/preprocessors/base.py347CODE
LOWmodelscope/preprocessors/science/uni_fold.py42CODE
LOWmodelscope/preprocessors/science/uni_fold.py323CODE
LOWmodelscope/preprocessors/science/uni_fold.py375CODE
LOW…e/preprocessors/movie_scene_segmentation/transforms.py24CODE
LOW…e/preprocessors/movie_scene_segmentation/transforms.py247CODE
LOW…preprocessors/nlp/token_classification_preprocessor.py107CODE
LOW…preprocessors/nlp/token_classification_preprocessor.py343CODE
LOW…sors/nlp/machine_reading_comprehension_preprocessor.py71CODE
LOW…sors/nlp/machine_reading_comprehension_preprocessor.py107CODE
LOWmodelscope/preprocessors/nlp/transformers_tokenizer.py52CODE
LOWmodelscope/preprocessors/nlp/utils.py23CODE
LOWmodelscope/preprocessors/nlp/utils.py64CODE
LOW…reprocessors/nlp/document_segmentation_preprocessor.py53CODE
LOWmodelscope/preprocessors/nlp/space_T_en/fields/parse.py106CODE
LOWmodelscope/preprocessors/nlp/space_T_en/fields/parse.py191CODE
LOW…pe/preprocessors/nlp/space_T_en/fields/common_utils.py26CODE
LOW…pe/preprocessors/nlp/space_T_en/fields/common_utils.py338CODE
LOWmodelscope/preprocessors/nlp/space/preprocess.py12CODE
LOWmodelscope/preprocessors/nlp/space/tokenizer.py361CODE
LOWmodelscope/preprocessors/nlp/space/dst_processors.py829CODE
LOWmodelscope/preprocessors/nlp/space/dst_processors.py1111CODE
LOWmodelscope/preprocessors/nlp/space/dst_processors.py105CODE
LOWmodelscope/preprocessors/nlp/space/dst_processors.py186CODE
LOWmodelscope/preprocessors/nlp/space/dst_processors.py255CODE
LOWmodelscope/preprocessors/nlp/space/dst_processors.py292CODE
LOWmodelscope/preprocessors/nlp/space/dst_processors.py338CODE
LOWmodelscope/preprocessors/nlp/space/dst_processors.py376CODE
LOWmodelscope/preprocessors/nlp/space/dst_processors.py409CODE
LOWmodelscope/preprocessors/nlp/space/dst_processors.py850CODE
LOWmodelscope/preprocessors/nlp/space/fields/gen_field.py269CODE
LOWmodelscope/preprocessors/nlp/space/fields/gen_field.py409CODE
LOWmodelscope/preprocessors/nlp/space/fields/gen_field.py639CODE
LOWmodelscope/preprocessors/nlp/space/fields/gen_field.py731CODE
960 more matches not shown…
Decorative Section Separators301 hits · 957 pts
SeverityFileLineSnippetContext
MEDIUMmodelscope/metrics/video_frame_interpolation_metric.py1# ------------------------------------------------------------------------COMMENT
MEDIUMmodelscope/metrics/video_frame_interpolation_metric.py3# ------------------------------------------------------------------------COMMENT
MEDIUMmodelscope/metrics/image_denoise_metric.py1# ------------------------------------------------------------------------COMMENT
MEDIUMmodelscope/metrics/image_denoise_metric.py3# ------------------------------------------------------------------------COMMENT
MEDIUMmodelscope/metrics/image_denoise_metric.py5# ------------------------------------------------------------------------COMMENT
MEDIUM…delscope/pipelines/cv/ocr_utils/model_resnet18_half.py1# ------------------------------------------------------------------------------COMMENT
MEDIUM…delscope/pipelines/cv/ocr_utils/model_resnet18_half.py4# ------------------------------------------------------------------------------COMMENT
MEDIUMmodelscope/pipelines/cv/ocr_utils/resnet18_v1.py14# ==============================================================================COMMENT
MEDIUMmodelscope/pipelines/cv/ocr_utils/model_dla34.py1# ------------------------------------------------------------------------------COMMENT
MEDIUMmodelscope/pipelines/cv/ocr_utils/model_dla34.py4# ------------------------------------------------------------------------------COMMENT
MEDIUMmodelscope/pipelines/cv/ocr_utils/table_process.py1# ------------------------------------------------------------------------------COMMENT
MEDIUMmodelscope/pipelines/cv/ocr_utils/table_process.py4# ------------------------------------------------------------------------------COMMENT
MEDIUMmodelscope/pipelines/cv/ocr_utils/resnet_utils.py14# ==============================================================================COMMENT
MEDIUMmodelscope/pipelines/cv/ocr_utils/model_vlpt.py1# ------------------------------------------------------------------------------COMMENT
MEDIUMmodelscope/pipelines/cv/ocr_utils/model_vlpt.py4# ------------------------------------------------------------------------------COMMENT
MEDIUMmodelscope/models/multi_modal/freeu/free_lunch_utils.py1# ------------------------------------------------------------------------COMMENT
MEDIUMmodelscope/models/multi_modal/freeu/free_lunch_utils.py4# ------------------------------------------------------------------------COMMENT
MEDIUMmodelscope/models/multi_modal/freeu/free_lunch_utils.py123 # ---------------------------------------------------------COMMENT
MEDIUMmodelscope/models/multi_modal/freeu/free_lunch_utils.py272 # ---------------------------------------------------------COMMENT
MEDIUMmodelscope/models/multi_modal/prost/models/modeling.py397 # -------------------------------------------------------------------------------------------------------COMMENT
MEDIUM…cope/models/multi_modal/video_to_video/utils/config.py19# -----------------------------------------------------------------------------COMMENT
MEDIUM…cope/models/multi_modal/video_to_video/utils/config.py37# -----------------------------------------------------------------------------COMMENT
MEDIUM…cope/models/multi_modal/video_to_video/utils/config.py117# -----------------------------------------------------------------------------COMMENT
MEDIUM…cope/models/multi_modal/video_to_video/utils/config.py130# -----------------------------------------------------------------------------COMMENT
MEDIUM…cope/models/multi_modal/video_to_video/utils/config.py139# -----------------------------------------------------------------------------COMMENT
MEDIUM…cope/models/multi_modal/video_to_video/utils/config.py157# -----------------------------------------------------------------------------COMMENT
MEDIUM…cope/models/multi_modal/video_to_video/utils/config.py171# -----------------------------------------------------------------------------COMMENT
MEDIUM…ope/models/multi_modal/mplug_owl/modeling_mplug_owl.py1650 # ===================STRING
MEDIUM…ope/models/multi_modal/mplug_owl/modeling_mplug_owl.py1652 # ===================STRING
MEDIUM…cope/models/multi_modal/image_to_video/utils/config.py18# -----------------------------------------------------------------------------COMMENT
MEDIUM…cope/models/multi_modal/image_to_video/utils/config.py36# -----------------------------------------------------------------------------COMMENT
MEDIUM…cope/models/multi_modal/image_to_video/utils/config.py116# -----------------------------------------------------------------------------COMMENT
MEDIUM…cope/models/multi_modal/image_to_video/utils/config.py129# -----------------------------------------------------------------------------COMMENT
MEDIUM…cope/models/multi_modal/image_to_video/utils/config.py138# -----------------------------------------------------------------------------COMMENT
MEDIUM…cope/models/multi_modal/image_to_video/utils/config.py156# -----------------------------------------------------------------------------COMMENT
MEDIUM…cope/models/multi_modal/image_to_video/utils/config.py161# -----------------------------------------------------------------------------COMMENT
MEDIUMmodelscope/models/nlp/palm_v2/dureader_eval.py1# ==============================================================================COMMENT
MEDIUMmodelscope/models/nlp/palm_v2/dureader_eval.py15# ==============================================================================COMMENT
MEDIUMmodelscope/models/nlp/chatglm/text_generation.py285 # ===================================COMMENT
MEDIUMmodelscope/models/nlp/chatglm/text_generation.py287 # ===================================COMMENT
MEDIUMmodelscope/models/nlp/chatglm/text_generation.py335 # =========================COMMENT
MEDIUMmodelscope/models/nlp/chatglm/text_generation.py337 # =========================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py434 # ==================================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py436 # ==================================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py441 # =================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py443 # =================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py245 # ===================================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py247 # ===================================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py276 # ===========================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py278 # ===========================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py293 # =========================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py295 # =========================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py380 # =================================================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py382 # =================================================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py397 # =====================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py399 # =====================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py413 # ==================================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py415 # ==================================COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py1223 # =============COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/distributed_gpt_moe.py1225 # =============COMMENT
241 more matches not shown…
Docstring Block Structure68 hits · 340 pts
SeverityFileLineSnippetContext
HIGHtests/studios/conftest_env.py61Create a temporary studio for testing purposes. Args: config: dict from get_test_config() name_prefSTRING
HIGHdocs/README.md18Load data from json/yaml/pickle files. This method provides a unified api for loading data from serialized fileSTRING
HIGHmodelscope/preprocessors/base.py213Instantiate a preprocessor from local directory or remote model repo. Note that when loading from remote, the moSTRING
HIGHmodelscope/preprocessors/nlp/space/batch.py5 This operator creates a batched reader which combines the data from the input reader to batched data. ArgsSTRING
HIGHmodelscope/fileio/io.py18Load data from json/yaml/pickle files. This method provides a unified api for loading data from serialized files. STRING
HIGHmodelscope/fileio/io.py60Dump data to json/yaml strings or files. This method provides a unified api for dumping data as strings or to filesSTRING
HIGHmodelscope/fileio/io.py108Dump data to json/yaml strings or files. This method provides a unified api for dumping data as strings or to filesSTRING
HIGH…pelines/multi_modal/diffusers_wrapped/pasd_pipeline.py862 Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[stSTRING
HIGH…lscope/pipelines/nlp/text_error_correction_pipeline.py68 Args: inputs (Dict[str, Tensor]) Examples: { 'prediSTRING
HIGHmodelscope/pipelines/cv/body_3d_keypoints_pipeline.py227Read video from local video file or from a video stream URL. Args: video_url (str or cv2.VideoCaptuSTRING
HIGHmodelscope/pipelines/cv/ocr_utils/resnet18_v1.py175Generator for v1 ResNet models. This function generates a family of ResNet v1 models. See the resnet_v1_*() methSTRING
HIGHmodelscope/pipelines/cv/ocr_utils/resnet_utils.py129Stacks ResNet `Blocks` and controls output feature density. First, this function creates scopes for the ResNet in thSTRING
HIGHmodelscope/utils/config.py537merge dict ``a`` into dict ``b`` (non-inplace). Values in ``a`` will overwrite ``b``. ``b`` is copied first to STRING
HIGHmodelscope/utils/device.py41 Device placement function, allow user to specify which device to place model or tensor Args: framework (strSTRING
HIGHmodelscope/utils/repo_utils.py127Filter repo objects based on an allowlist and a denylist. Input must be a list of paths (`str` or `Path`) or a STRING
HIGHmodelscope/utils/repo_utils.py224Validate and parse a repo_id in '<owner>/<name>' format. Args: repo_id (str): The repo identifier, STRING
HIGHmodelscope/utils/import_utils.py89Import modules from the given list of strings. Args: imports (list | str | None): The given module names toSTRING
HIGHmodelscope/utils/thread_utils.py18 A decorator to execute a function in a threaded manner using ThreadPoolExecutor. Args: max_workers (inSTRING
HIGHmodelscope/models/science/unifold/msa/parsers.py404Parses the detailed HMM HMM comparison section for a single Hit. This works on .hhr files generated from both HHBliSTRING
HIGHmodelscope/models/science/unifold/msa/templates.py183Determines if template is valid (without parsing the template mmcif file). Args: hit: HhrHit for the templaSTRING
HIGHmodelscope/models/science/unifold/msa/templates.py243Tries to find the template chain in the given pdb file. This method tries the three following things in order: STRING
HIGHmodelscope/models/science/unifold/msa/templates.py312Aligns template from the mmcif_object to the query. In case PDB70 contains a different version of the template sequSTRING
HIGHmodelscope/models/science/unifold/msa/templates.py526Parses atom positions in the target structure and aligns with the query. Atoms for each residue in the template strSTRING
HIGHmodelscope/models/science/unifold/msa/tools/kalign.py49Aligns the sequences and returns the alignment in A3M string. Args: sequences: A list of query sequSTRING
HIGHmodelscope/models/science/unifold/msa/tools/hmmbuild.py45Builds a HHM for the aligned sequences given as an A3M string. Args: sto: A string with the alignedSTRING
HIGHmodelscope/models/science/unifold/msa/tools/hmmbuild.py61Builds a HHM for the aligned sequences given as an A3M string. Args: a3m: A string with the alignedSTRING
HIGHmodelscope/models/science/unifold/msa/tools/hmmbuild.py83Builds a HMM for the aligned sequences given as an MSA string. Args: msa: A string with the alignedSTRING
HIGH…scope/models/science/unifold/data/residue_constants.py728Maps the given sequence into a one-hot encoded matrix. Args: sequence: An amino acid sequence. mappSTRING
HIGH…elscope/models/multi_modal/mgeo/text_classification.py73 Args: input_ids (:obj:`torch.LongTensor` of shape :obj:`(batch_size, sequence_length)`): InSTRING
HIGH…lscope/models/multi_modal/mgeo/token_classification.py98 Args: input_ids (:obj:`torch.LongTensor` of shape :obj:`(batch_size, sequence_length)`): InSTRING
HIGHmodelscope/models/nlp/structbert/fill_mask.py157 Args: input_ids (:obj:`torch.LongTensor` of shape :obj:`(batch_size, sequence_length)`): STRING
HIGHmodelscope/models/nlp/structbert/backbone.py731 Args: input_ids (:obj:`torch.LongTensor` of shape :obj:`(batch_size, sequence_length)`): STRING
HIGH…lscope/models/nlp/structbert/faq_question_answering.py221 Args: input (Dict[str, Tensor]): the preprocessed data, it contains the following keys: STRING
HIGHmodelscope/models/nlp/structbert/text_classification.py114 Args: input_ids (:obj:`torch.LongTensor` of shape :obj:`(batch_size, sequence_length)`): STRING
HIGH…delscope/models/nlp/structbert/token_classification.py111 Args: input_ids (:obj:`torch.LongTensor` of shape :obj:`(batch_size, sequence_length)`): STRING
HIGHmodelscope/models/nlp/task_models/feature_extraction.py35 Args: input_ids (:obj:`torch.LongTensor` of shape :obj:`(batch_size, sequence_length)`): InSTRING
HIGHmodelscope/models/nlp/task_models/task_model.py602 Args: input_ids (:obj:`torch.LongTensor` of shape :obj:`(batch_size, sequence_length)`): InSTRING
HIGHmodelscope/models/nlp/plug_mental/backbone.py884 Args: input_ids (:obj:`torch.LongTensor` of shape :obj:`(batch_size, sequence_length)`): STRING
HIGHmodelscope/models/nlp/T5/text2text_generation.py147 Args: input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`): IndiSTRING
HIGHmodelscope/models/nlp/bloom/sentence_embedding.py90 Args: query (:obj: `dict`): Dict of pretrained models's input for the query sequence. See STRING
HIGHmodelscope/models/nlp/bert/sentence_embedding.py72 Args: query (:obj: `dict`): Dict of pretrained models's input for the query sequence. See STRING
HIGHmodelscope/models/nlp/deberta_v2/fill_mask.py87 Args: input_ids (`torch.LongTensor` of shape `('batch_size, sequence_length')`): InSTRING
HIGHmodelscope/models/nlp/deberta_v2/backbone.py1104 Args: input_ids (`torch.LongTensor` of shape `('batch_size, sequence_length')`): InSTRING
HIGHmodelscope/models/nlp/space/dialog_modeling.py75return the result by the model Args: input (Dict[str, Tensor]): the preprocessed data RetuSTRING
HIGHmodelscope/models/nlp/megatron_bert/fill_mask.py159 Args: input_ids (:obj:`torch.LongTensor` of shape :obj:`(batch_size, sequence_length)`): STRING
HIGHmodelscope/models/nlp/ponet/fill_mask.py148 Args: input_ids (:obj:`torch.LongTensor` of shape :obj:`('batch_size, sequence_length')`): STRING
HIGHmodelscope/models/nlp/ponet/backbone.py715 Args: input_ids (:obj:`torch.LongTensor` of shape :obj:`(batch_size, sequence_length)`): STRING
HIGH…e/models/cv/text_to_360panorama_image/pipeline_base.py579 Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[stSTRING
HIGH…ope/models/cv/text_to_360panorama_image/pipeline_sr.py820 Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[stSTRING
HIGH…scope/models/cv/text_texture_generation/Tex2Texture.py296 Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[stSTRING
HIGH…ocal_feature_matching/src/loftr/utils/fine_matching.py58Compute the expectation of coordinate values using spatial probabilities. The input heatmap is assumed to representSTRING
HIGH…detection/scrfd/mmdet_patch/models/backbones/resnet.py199Make plugins for ResNet ``stage_idx`` th stage. Currently we support to insert ``context_block``, ``empSTRING
HIGHmodelscope/models/cv/face_emotion/efficient/utils.py346Get a block through a string notation of arguments. Args: block_string (str): A string notation of aSTRING
HIGHmodelscope/models/base/base_model.py100Instantiate a model from local directory or remote model repo. Note that when loading from remote, the model revSTRING
HIGHmodelscope/trainers/cli_argument_parser.py82Parse iterable values in the string. All elements inside '()' or '[]' are treated as iterable values. ArSTRING
HIGHmodelscope/hub/mcp_api.py75 List available MCP servers, if (optional) token is presented, this would return private MCP servers as well. STRING
HIGHmodelscope/hub/mcp_api.py233 Get detailed information for a specific MCP Server, a valid token shall be provided if the MCP server iSTRING
HIGHmodelscope/hub/deploy.py201Deploy model to cloud, current we only support PAI EAS, this is an async API , and the deployment could take a wSTRING
HIGHmodelscope/hub/deploy.py245Query the specified instance information. Args: instance_name (str): The deployed instance name. STRING
HIGHmodelscope/hub/deploy.py274Delete deployed model, this api send delete command and return, it will take some to delete, please check througSTRING
8 more matches not shown…
Excessive Try-Catch Wrapping291 hits · 316 pts
SeverityFileLineSnippetContext
LOW…preprocessors/test_action_detection_mapper_security.py33except Exception:CODE
LOW…preprocessors/test_action_detection_mapper_security.py43except Exception:CODE
LOW…preprocessors/test_action_detection_mapper_security.py62except Exception:CODE
LOWtests/studios/test_studio_cli.py311 except Exception:CODE
LOWtests/pipelines/test_human3d_animation_security.py32 except Exception:CODE
LOWtests/pipelines/test_tinynas_classification_security.py28 except Exception:CODE
LOWtests/utils/test_hf_util.py59 except Exception as e:STRING
LOWtests/utils/test_hf_util.py125 except Exception:STRING
LOWtests/utils/test_hf_util.py157 except Exception:STRING
LOWtests/utils/test_hf_util.py195 except Exception:STRING
LOWtests/utils/test_hf_util.py324 except Exception:STRING
LOWtests/utils/test_hf_util.py376 except Exception as e:STRING
LOWtests/utils/test_hf_util.py380 except Exception:STRING
LOWtests/cli/test_create_cmd.py37 except Exception as e:CODE
MEDIUMtests/cli/test_create_cmd.py38 print(f'Error deleting model {self.repo_id}: {e}')CODE
LOWtests/cli/test_modelcard_cmd.py35 except Exception as e:CODE
MEDIUMtests/cli/test_modelcard_cmd.py32def tearDown(self):CODE
LOWtests/cli/test_download_cmd.py57 except Exception as e:CODE
LOWtests/cli/test_download_cmd.py131 except Exception as e:CODE
LOWtests/cli/test_download_cmd.py135 except Exception as e:CODE
MEDIUMtests/cli/test_download_cmd.py128def tearDown(self):CODE
LOW…s/trainers/test_image_instance_segmentation_trainer.py33 except Exception:CODE
LOW…/trainers/test_general_image_classification_trainer.py36 except Exception as e:CODE
LOWtests/hub/test_create_aigc_model.py36 except Exception as e:CODE
LOWtests/hub/test_hub_revision_release_mode.py51 except Exception as e:CODE
MEDIUMtests/hub/test_hub_revision_release_mode.py48def tearDown(self):CODE
LOWtests/hub/test_upload_file_folder.py55 except Exception as e:CODE
LOWtests/hub/test_hub_upload.py47 except Exception as e:CODE
LOWtests/hub/test_hub_scan_cache.py36 except Exception as e:CODE
LOWtests/hub/test_hub_scan_cache.py44 except Exception as e:CODE
LOWtests/hub/test_download_file_lock.py74 except Exception: # noqaCODE
MEDIUMtests/hub/test_download_file_lock.py49def test_multi_processing_disabled(self):CODE
LOWtests/hub/test_commit_scheduler.py49 except Exception as e:CODE
LOWtests/hub/test_commit_scheduler.py57 except Exception as e:CODE
LOWtests/hub/test_commit_scheduler.py66 except Exception:CODE
LOWtests/hub/test_commit_scheduler.py74 except Exception as e:CODE
MEDIUMtests/hub/test_commit_scheduler.py45def cleanup(scheduler):CODE
MEDIUMtests/hub/test_commit_scheduler.py54def remove_atexit_callback(scheduler):CODE
LOWtests/hub/test_hub_private_files.py57 except Exception as e:CODE
LOWtests/hub/test_hub_repository.py50 except Exception as e:CODE
LOWtests/hub/test_hub_operation.py47 except Exception as e:CODE
MEDIUMtests/hub/test_hub_operation.py44def tearDown(self):CODE
LOWtests/hub/test_hub_private_repository.py40 except Exception as e:CODE
LOWtests/hub/test_create_repo.py30 except Exception as e:CODE
LOWtests/hub/test_create_repo.py46 except Exception as e:CODE
LOWtests/hub/test_create_repo.py55 except Exception as e:CODE
MEDIUMtests/hub/test_create_repo.py24def tearDown(self):CODE
LOWtests/hub/test_hub_revision.py44 except Exception as e:CODE
MEDIUMtests/hub/test_hub_revision.py41def tearDown(self):CODE
LOWmodelscope/__init__.py130 except Exception: # noqaCODE
LOWmodelscope/preprocessors/nlp/text_clean.py60 except Exception:CODE
MEDIUMmodelscope/preprocessors/nlp/text_clean.py43def clean(self, s):CODE
LOW…reprocessors/nlp/document_segmentation_preprocessor.py72 except Exception as e:CODE
LOW…processors/nlp/space_T_en/fields/preprocess_dataset.py22 except Exception:CODE
LOW…pe/preprocessors/nlp/space_T_en/fields/common_utils.py438 except Exception as e:CODE
LOWmodelscope/preprocessors/nlp/space/tokenizer.py595 except Exception:CODE
LOWmodelscope/preprocessors/nlp/space/fields/gen_field.py321 except Exception as e:CODE
LOWmodelscope/preprocessors/nlp/space/fields/gen_field.py457 except Exception:CODE
LOWmodelscope/preprocessors/nlp/space/fields/gen_field.py666 except Exception:CODE
LOWmodelscope/preprocessors/nlp/space/fields/gen_field.py882 except Exception:CODE
231 more matches not shown…
Modern Structural Boilerplate310 hits · 308 pts
SeverityFileLineSnippetContext
LOWmodelscope/preprocessors/kws.py14__all__ = ['WavToLists']CODE
LOWmodelscope/preprocessors/multi_modal.py33__all__ = [CODE
LOWmodelscope/preprocessors/tts.py17__all__ = ['KanttsDataPreprocessor']CODE
LOWmodelscope/preprocessors/asr.py12__all__ = ['WavToScp']CODE
LOWmodelscope/preprocessors/science/uni_fold.py34__all__ = [CODE
LOWmodelscope/preprocessors/nlp/transformers_tokenizer.py16__all__ = [CODE
LOWmodelscope/preprocessors/nlp/utils.py20__all__ = ['parse_text_and_label', 'labels_to_id']CODE
LOW…/space_T_en/conversational_text_to_sql_preprocessor.py24__all__ = ['ConversationalTextToSqlPreprocessor']CODE
LOW…ors/nlp/space/dialog_intent_prediction_preprocessor.py16__all__ = ['DialogIntentPredictionPreprocessor']CODE
LOW…essors/nlp/space/dialog_state_tracking_preprocessor.py12__all__ = ['DialogStateTrackingPreprocessor']CODE
LOW…reprocessors/nlp/space/dialog_modeling_preprocessor.py14__all__ = ['DialogModelingPreprocessor']CODE
LOWmodelscope/preprocessors/nlp/space/tokenizer.py138logger = logging.getLogger(__name__)CODE
LOWmodelscope/preprocessors/nlp/space/dst_processors.py29logger = logging.getLogger(__name__)CODE
LOW…lp/space_T_cn/table_question_answering_preprocessor.py18__all__ = ['TableQuestionAnsweringPreprocessor']CODE
LOWmodelscope/fileio/format/jsonplus.py26__all__ = [CODE
LOWmodelscope/pipelines/pipeline_template.py14__all__ = ['PipelineTemplate']CODE
LOW…lscope/pipelines/science/protein_structure_pipeline.py29__all__ = ['ProteinStructurePipeline']CODE
LOW…elines/audio/language_recognition_eres2net_pipeline.py22__all__ = ['LanguageRecognitionPipeline']CODE
LOW…pe/pipelines/audio/inverse_text_processing_pipeline.py18__all__ = ['InverseTextProcessingPipeline']CODE
LOWmodelscope/pipelines/audio/text_to_speech_pipeline.py14__all__ = ['TextToSpeechSambertHifiganPipeline']CODE
LOWmodelscope/pipelines/audio/kws_kwsbp_pipeline.py19__all__ = ['KeyWordSpottingKwsbpPipeline']CODE
LOW…scope/pipelines/audio/language_recognition_pipeline.py22__all__ = ['LanguageRecognitionPipeline']CODE
LOW…delscope/pipelines/audio/speech_separation_pipeline.py21__all__ = ['SeparationPipeline']CODE
LOWmodelscope/pipelines/audio/funasr_pipeline.py20__all__ = ['FunASRPipeline']CODE
LOW…pe/pipelines/audio/segmentation_clustering_pipeline.py23__all__ = ['SegmentationClusteringPipeline']CODE
LOW…cope/pipelines/audio/codec_based_synthesis_pipeline.py20__all__ = ['LauraCodecTTSPipeline']CODE
LOW…elscope/pipelines/audio/audio_quantization_pipeline.py21__all__ = ['AudioQuantizationPipeline']CODE
LOW…pipelines/audio/speaker_verification_light_pipeline.py22__all__ = ['SpeakerVerificationPipeline']CODE
LOW…pe/pipelines/audio/speaker_change_locating_pipeline.py21__all__ = ['SpeakerChangeLocatingPipeline']CODE
LOW…lscope/pipelines/audio/asr_wenet_inference_pipeline.py16__all__ = ['WeNetAutomaticSpeechRecognitionPipeline']CODE
LOW…elscope/pipelines/multi_modal/mgeo_ranking_pipeline.py16__all__ = ['MGeoRankingPipeline']CODE
LOW…/pipelines/multi_modal/text_to_image_freeu_pipeline.py20__all__ = ['FreeUTextToImagePipeline']CODE
LOW…ines/multi_modal/visual_question_answering_pipeline.py16__all__ = ['VisualQuestionAnsweringPipeline']CODE
LOW…lines/multi_modal/video_question_answering_pipeline.py15__all__ = ['VideoQuestionAnsweringPipeline']CODE
LOW…scope/pipelines/nlp/translation_evaluation_pipeline.py23__all__ = ['TranslationEvaluationPipeline']CODE
LOW…scope/pipelines/nlp/faq_question_answering_pipeline.py13__all__ = ['FaqQuestionAnsweringPipeline']CODE
LOW…ines/nlp/document_grounded_dialog_generate_pipeline.py14__all__ = ['DocumentGroundedDialogGeneratePipeline']CODE
LOW…scope/pipelines/nlp/automatic_post_editing_pipeline.py30__all__ = ['AutomaticPostEditingPipeline']CODE
LOW…ope/pipelines/nlp/named_entity_recognition_pipeline.py12__all__ = ['NamedEntityRecognitionPipeline']CODE
LOW…cope/pipelines/nlp/interactive_translation_pipeline.py28__all__ = ['InteractiveTranslationPipeline']CODE
LOW…nes/nlp/document_grounded_dialog_retrieval_pipeline.py19__all__ = ['DocumentGroundedDialogRetrievalPipeline']CODE
LOW…pipelines/nlp/fasttext_text_classification_pipeline.py17__all__ = ['FasttextSequenceClassificationPipeline']CODE
LOWmodelscope/pipelines/nlp/word_alignment_pipeline.py15__all__ = ['WordAlignmentPipeline']CODE
LOWmodelscope/pipelines/nlp/feature_extraction_pipeline.py17__all__ = ['FeatureExtractionPipeline']CODE
LOWmodelscope/pipelines/nlp/text_ranking_pipeline.py16__all__ = ['TextRankingPipeline']CODE
LOWmodelscope/pipelines/nlp/fid_dialogue_pipeline.py28__all__ = ['FidDialoguePipeline']CODE
LOW…pelines/nlp/translation_quality_estimation_pipeline.py16__all__ = ['TranslationQualityEstimationPipeline']CODE
LOWmodelscope/pipelines/nlp/fill_mask_pipeline.py15__all__ = ['FillMaskPipeline']CODE
LOW…e/pipelines/nlp/conversational_text_to_sql_pipeline.py16__all__ = ['ConversationalTextToSqlPipeline']CODE
LOW…scope/pipelines/nlp/information_extraction_pipeline.py14__all__ = ['InformationExtractionPipeline']CODE
LOW…ope/pipelines/nlp/table_question_answering_pipeline.py24__all__ = ['TableQuestionAnsweringPipeline']CODE
LOW…pipelines/nlp/user_satisfaction_estimation_pipeline.py16__all__ = ['UserSatisfactionEstimationPipeline']CODE
LOWmodelscope/pipelines/nlp/dialog_modeling_pipeline.py14__all__ = ['DialogModelingPipeline']CODE
LOWmodelscope/pipelines/nlp/canmt_translation_pipeline.py18__all__ = ['CanmtTranslationPipeline']CODE
LOWmodelscope/pipelines/nlp/word_segmentation_pipeline.py20__all__ = ['WordSegmentationPipeline', 'WordSegmentationThaiPipeline']CODE
LOW…scope/pipelines/nlp/polylm_text_generation_pipeline.py18__all__ = ['PolyLMTextGenerationPipeline']CODE
LOW…lscope/pipelines/nlp/document_segmentation_pipeline.py22__all__ = ['DocumentSegmentationPipeline']CODE
LOW…ope/pipelines/nlp/extractive_summarization_pipeline.py22__all__ = ['ExtractiveSummarizationPipeline']CODE
LOW…lscope/pipelines/nlp/text_error_correction_pipeline.py16__all__ = ['TextErrorCorrectionPipeline']CODE
LOW…lscope/pipelines/nlp/dialog_state_tracking_pipeline.py14__all__ = ['DialogStateTrackingPipeline']CODE
250 more matches not shown…
Over-Commented Block285 hits · 266 pts
SeverityFileLineSnippetContext
LOWtools/weight_diff.py1# Copyright 2023 Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen LiCOMMENT
LOWdocs/source/conf.py1# Configuration file for the Sphinx documentation builder.COMMENT
LOWdocs/source/conf.py81source_suffix = ['.rst', '.md']COMMENT
LOWdocs/source/conf.py101# 'faq.md',COMMENT
LOWdocs/source/conf.py121COMMENT
LOWmodelscope/pipeline_inputs.py321 InputKeys.IMAGE: InputType.IMAGE,COMMENT
LOW…rics/video_super_resolution_metric/matlab_functions.py41 # in output space maps to 0.5 in input space, and 0.5 + scale in outputCOMMENT
LOWmodelscope/preprocessors/nlp/space/tokenizer.py121COMMENT
LOWmodelscope/preprocessors/nlp/space/dst_processors.py1#COMMENT
LOWmodelscope/preprocessors/nlp/space/dst_processors.py961 # type_ids: 0 0 0 0 0 0 0COMMENT
LOWmodelscope/preprocessors/nlp/space/tensorlistdataset.py1#COMMENT
LOWmodelscope/fileio/format/jsonplus.py21 from moneyed import Currency, MoneyCOMMENT
LOWmodelscope/fileio/format/jsonplus.py41# respectively.COMMENT
LOW…s/multi_modal/disco_guided_diffusion_pipeline/utils.py201 # only used for by_convs, to calc the boundaries of each filter theCOMMENT
LOW…s/multi_modal/disco_guided_diffusion_pipeline/utils.py261 # along cur dim)- a list of 1d neighbors locations.COMMENT
LOWmodelscope/pipelines/cv/ocr_utils/resnet18_v1.py1# Copyright 2016 The TensorFlow Authors. All Rights Reserved.COMMENT
LOWmodelscope/pipelines/cv/ocr_utils/resnet_utils.py1# Copyright 2016 The TensorFlow Authors. All Rights Reserved.COMMENT
LOWmodelscope/pipelines/cv/ocr_utils/resnet_utils.py241 with slim.arg_scope([slim.batch_norm], **batch_norm_params):COMMENT
LOWmodelscope/utils/nlp/distributed.py1# Copyright 2021-2022 The Alibaba DAMO NLP Team Authors.COMMENT
LOWmodelscope/utils/nlp/load_checkpoint.py1# Copyright 2021-2022 The Alibaba DAMO NLP Team Authors.COMMENT
LOWmodelscope/models/science/unifold/msa/mmcif.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOW…delscope/models/science/unifold/msa/msa_identifiers.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWmodelscope/models/science/unifold/msa/parsers.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWmodelscope/models/science/unifold/msa/templates.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWmodelscope/models/science/unifold/msa/pipeline.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOW…delscope/models/science/unifold/msa/tools/hmmsearch.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWmodelscope/models/science/unifold/msa/tools/hhblits.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWmodelscope/models/science/unifold/msa/tools/__init__.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWmodelscope/models/science/unifold/msa/tools/kalign.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWmodelscope/models/science/unifold/msa/tools/utils.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWmodelscope/models/science/unifold/msa/tools/hmmbuild.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOW…delscope/models/science/unifold/msa/tools/jackhmmer.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWmodelscope/models/science/unifold/msa/tools/hhsearch.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOW…lscope/models/science/unifold/data/process_multimer.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWmodelscope/models/science/unifold/data/__init__.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOWmodelscope/models/science/unifold/data/protein.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOW…scope/models/science/unifold/data/residue_constants.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOW…scope/models/science/unifold/data/residue_constants.py121 [0.0, 0.0, 0.0, 0.0], # TRPCOMMENT
LOWmodelscope/models/science/unifold/data/msa_pairing.py1# Copyright 2021 DeepMind Technologies LimitedCOMMENT
LOW…elscope/models/audio/ans/zipenhancer_layers/scaling.py1# Copyright 2022-2023 Xiaomi Corp. (authors: Daniel Povey)COMMENT
LOW…elscope/models/audio/ans/zipenhancer_layers/scaling.py41# models to ONNX via torch.jit.trace()COMMENT
LOW…scope/models/audio/ans/zipenhancer_layers/zipformer.py1#!/usr/bin/env python3COMMENT
LOW…scope/models/audio/ans/zipenhancer_layers/zipformer.py501 compression_length = self.embed_dim**0.5COMMENT
LOW…scope/models/audio/ans/zipenhancer_layers/zipformer.py721 # inplace operator importantCOMMENT
LOW…cope/models/audio/sv/speaker_change_locator_xvector.py121 # e: (BT, F)COMMENT
LOWmodelscope/models/audio/sv/speaker_change_locator.py121 # e: (BT, F)COMMENT
LOWmodelscope/models/audio/kws/farfield/fsmn_sele_v2.py161 numouts = 1.0COMMENT
LOWmodelscope/models/audio/kws/nearfield/cmvn.py1#!/usr/bin/env python3COMMENT
LOW…delscope/models/multi_modal/clip/configuration_bert.py1# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.COMMENT
LOWmodelscope/models/multi_modal/clip/bert_tokenizer.py1# Copyright 2018 The Google AI Language Team Authors.COMMENT
LOWmodelscope/models/multi_modal/clip/model.py1# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.COMMENT
LOWmodelscope/models/multi_modal/clip/modeling_bert.py1# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.COMMENT
LOWmodelscope/models/multi_modal/clip/modeling_bert.py461 # used in OpenAI GPT, we just need to prepare the broadcast dimension here.COMMENT
LOW…lscope/models/multi_modal/prost/models/until_module.py1# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.COMMENT
LOW…lscope/models/multi_modal/prost/models/until_module.py201 for name, child in module._modules.items():COMMENT
LOW…lscope/models/multi_modal/prost/models/until_config.py1# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.COMMENT
LOWmodelscope/models/multi_modal/prost/models/modeling.py121 cp_weight = torch.cat(cat_list, dim=2)COMMENT
LOWmodelscope/models/multi_modal/prost/models/modeling.py281 # show_log(task_config, "\t embed_dim: {}".format(embed_dim))COMMENT
LOWmodelscope/models/multi_modal/diffusion/structbert.py1# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team and Alibaba inc.COMMENT
LOWmodelscope/models/multi_modal/diffusion/tokenizer.py1# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team and Alibaba inc.COMMENT
225 more matches not shown…
Cross-Language Confusion21 hits · 118 pts
SeverityFileLineSnippetContext
HIGHdocker/build_image.py103 ret = self.push()CODE
HIGH…preprocessors/test_action_detection_mapper_security.py131 "'echo HACKED && touch {}')").format(canary)CODE
HIGHtests/pipelines/test_tinynas_classification_security.py69 "__import__('os').system('echo HACKED && touch {}')".format(CODE
HIGHtests/cli/test_download_cmd.py50 repo.push('add model')CODE
HIGHtests/hub/test_hub_revision_release_mode.py60 self.repo.push('add model')CODE
HIGHtests/hub/test_hub_revision_release_mode.py69 self.repo.push('add new file')CODE
HIGHtests/hub/test_hub_revision_release_mode.py75 self.repo.push('add new file', remote_branch=branch_name)CODE
HIGHtests/hub/test_hub_private_files.py47 repo.push('add model')CODE
HIGHtests/hub/test_hub_repository.py73 repo.push('test')CODE
HIGHtests/hub/test_hub_repository.py93 repo.push('test')CODE
HIGHtests/hub/test_hub_operation.py56 repo.push('add model')CODE
HIGHtests/hub/test_hub_revision.py53 self.repo.push('add model')CODE
HIGHtests/hub/test_hub_revision.py80 self.repo.push('add new file')CODE
HIGHmodelscope/fileio/format/jsonplus.py139 Predicate priority. If undefined, encoder is added atSTRING
HIGHmodelscope/fileio/format/jsonplus.py164 # if priority undefined, set it to lowestCOMMENT
HIGH…lscope/trainers/nlp/sequence_classification_trainer.py37 """get attribute from config, if the attribute does exist, return falseSTRING
HIGHmodelscope/msdatasets/ms_dataset.py506 _repo.push(commit_message=commit_message, branch=revision, force=force)STRING
HIGHmodelscope/hub/push_to_hub.py65 repo.push(commit_message)CODE
HIGHmodelscope/hub/repository.py145 self.git_wrapper.push(CODE
HIGHmodelscope/hub/repository.py262 self.git_wrapper.push(CODE
HIGHmodelscope/hub/utils/utils.py314 repo.push(commit_message)CODE
Hallucination Indicators9 hits · 110 pts
SeverityFileLineSnippetContext
CRITICALmodelscope/models/multi_modal/prost/models/modeling.py94 kernel_size = model.clip.visual.conv2.weight.size(2)CODE
CRITICALmodelscope/models/multi_modal/prost/models/modeling.py95 conv2_size = model.clip.visual.conv2.weight.size()CODE
CRITICALmodelscope/models/nlp/codegeex/codegeex.py1007 self.language_model.embedding.word_embeddings.weight.half())CODE
CRITICALmodelscope/models/nlp/plug/distributed_plug.py96 model.module.model.bert.embeddings.word_embeddings.float()CODE
CRITICALmodelscope/models/nlp/plug/distributed_plug.py97 model.module.model.bert.embeddings.position_embeddings.float()CODE
CRITICALmodelscope/models/nlp/plug/distributed_plug.py98 model.module.model.bert.embeddings.token_type_embeddings.float(CODE
CRITICALmodelscope/models/nlp/plug/distributed_plug.py101 model.module.model.bert.embeddings.token_type_embeddings.float(CODE
CRITICAL…lti_modal/custom_diffusion/custom_diffusion_trainer.py390 self.model.text_encoder.text_model.encoder.parameters(),CODE
CRITICAL…lti_modal/custom_diffusion/custom_diffusion_trainer.py391 self.model.text_encoder.text_model.final_layer_norm.parameters(),CODE
Self-Referential Comments35 hits · 87 pts
SeverityFileLineSnippetContext
MEDIUMtests/hub/test_create_aigc_model.py24 # Create a dummy file for AIGC model testCOMMENT
MEDIUMmodelscope/preprocessors/nlp/space/dst_processors.py69 """This method is to generate the utterances with user, sys, dialog_acts and metadata,STRING
MEDIUMmodelscope/exporters/torch_model_exporter.py356 """This function is used to recover the original call method.STRING
MEDIUMmodelscope/pipelines/nlp/distributed_plug_pipeline.py18 """This class is used to instantiate the plug model.STRING
MEDIUMmodelscope/pipelines/nlp/distributed_gpt3_pipeline.py21 """This class is used to instantiate the gpt3 model.STRING
MEDIUM…delscope/pipelines/nlp/distributed_gpt_moe_pipeline.py18 """This class is used to instantiate the gpt-moe model.STRING
MEDIUMmodelscope/utils/plugins.py2# This file is adapted from the AllenNLP library at https://github.com/allenai/allennlpCOMMENT
MEDIUMmodelscope/utils/regress_test_utils.py27 """This class is used to stop inference/training results from changing by some unaware affections by unittests.STRING
MEDIUMmodelscope/utils/thread_utils.py47 # Create a tqdm progress bar with the total number of items to processCOMMENT
MEDIUMmodelscope/utils/thread_utils.py56 # Define a wrapper function to update the progress barCOMMENT
MEDIUM…scope/models/science/unifold/data/residue_constants.py491 # Create a fast lookup dict for bond lengths.COMMENT
MEDIUM…scope/models/science/unifold/data/residue_constants.py798# Define a restype name for all unknown residues.COMMENT
MEDIUM…scope/models/science/unifold/data/residue_constants.py1171 # Create an ambiguous atoms mask. shape: (21, 14).COMMENT
MEDIUMmodelscope/models/science/unifold/data/data_ops.py809 # Create a mask for known ground truth positions.COMMENT
MEDIUMmodelscope/models/science/unifold/data/data_ops.py846 # Create the mask for the alternative ground truth (differs from theCOMMENT
MEDIUM…elscope/models/audio/ans/zipenhancer_layers/scaling.py40# The following function is to solve the above error when exportingCOMMENT
MEDIUMmodelscope/models/audio/separation/mossformer.py229 """This class implements the transformer encoder.STRING
MEDIUMmodelscope/models/audio/separation/m2/mossformer.py262 """This class implements the transformer encoder.STRING
MEDIUM…pe/models/multi_modal/vldoc/modeling_layout_roberta.py252 # Create the position ids from the input token ids. Any padded tokens remain padded.COMMENT
MEDIUM…/models/multi_modal/ofa/generate/sequence_generator.py694 # Create a set of "{sent}{unfin_idx}", whereCOMMENT
MEDIUMmodelscope/models/nlp/mglm/data_utils/file_utils.py2# This file is provided as is from:COMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/moe/sharded_moe.py157# The following functions are extracted and scriptedCOMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/moe/sharded_moe.py210 # Create a mask for 1st's expert per tokenCOMMENT
MEDIUMmodelscope/models/nlp/gpt_moe/moe/utils.py94 # Create the param MoE groups, leave param assign to next stepCOMMENT
MEDIUMmodelscope/models/nlp/xlm_roberta/backbone.py114 # Create the position ids from the input token ids. Any padded tokens remain padded.COMMENT
MEDIUMmodelscope/models/nlp/deberta_v2/backbone.py83 >>> # Create a maskSTRING
MEDIUM…lscope/models/nlp/llama/convert_llama_weights_to_hf.py27# This file is mainly copied from the llama code of transformersCOMMENT
MEDIUMmodelscope/models/nlp/llama/text_generation.py73# This file is mainly copied from the llama code of transformersCOMMENT
MEDIUM…odels/cv/image_control_3d_portrait/network/triplane.py100 # Create a batch of rays for volume renderingCOMMENT
MEDIUM…inynas_detection/damo/base_models/core/ota_assigner.py129 # Create an overlap for each predicted boxCOMMENT
MEDIUMmodelscope/models/cv/human3d_animation/utils.py250# The following code is based on https://github.com/Mathux/ACTOR.gitCOMMENT
MEDIUM…scope/models/cv/video_depth_estimation/utils/config.py68 # Create a name based on available informationCOMMENT
MEDIUMmodelscope/msdatasets/download/dataset_builder.py403 # Create a dataset for each of the given splitsCOMMENT
MEDIUMmodelscope/hub/cache_manager.py507 # Create a single revision from cached filesCOMMENT
MEDIUMmodelscope/hub/cache_manager.py522 # Create a CachedRevisionInfo for the repositoryCOMMENT
AI Slop Vocabulary15 hits · 33 pts
SeverityFileLineSnippetContext
MEDIUMmodelscope/pipelines/builder.py142 # if not specified in both args and configuration.json, prefer llm pipeline for aforementioned tasksCOMMENT
MEDIUM…elines/nlp/document_grounded_dialog_rerank_pipeline.py398 # 2. check what's the minimum number of predicted pages needed to get a robust P/R@kCOMMENT
MEDIUMmodelscope/utils/plugins.py1158 """update the plugins file in order to maintain the latest plugins informationSTRING
MEDIUMmodelscope/models/science/unifold/msa/templates.py605 # Essentially set to infinity - we don't want to reject templates unlessCOMMENT
LOW…scope/models/audio/ans/zipenhancer_layers/zipformer.py227 # only need the mask, can just use the 1st one and expand laterCOMMENT
MEDIUM…delscope/models/multi_modal/clip_interrogator/model.py80# CLIP-Interrogator utilize CLIP and BLIP to generate rich caption for images.COMMENT
MEDIUM…elscope/models/nlp/mglm/mglm_for_text_summarization.py169 # https://medium.com/huggingface/how-to-build-a-state-of-the-art-conversational-ai-with-transfer-learning-2d818ac263COMMENT
MEDIUMmodelscope/models/nlp/peer/backbone.py174 self.side_info_size = 16 # leverage the information of token_position_in_sentenceCODE
MEDIUMmodelscope/models/nlp/plug/distributed_plug.py124 # https://medium.com/huggingface/how-to-build-a-state-of-the-art-COMMENT
MEDIUM…scope/models/cv/image_to_image_translation/ops/apps.py2# APPs that facilitate the use of pretrained neural networks.COMMENT
LOW…/models/cv/image_to_3d/ldm/modules/encoders/modules.py18# TODO: can we directly rely on lucidrains code and simply add this as a requirement? --> testCOMMENT
LOW…pe/models/cv/nerf_recon_acc/dataloader/nerf_dataset.py289 # just use white during inferenceCOMMENT
LOW…pe/models/cv/nerf_recon_acc/dataloader/nerf_dataset.py508 # just use white during inferenceCOMMENT
LOW…facial_68ldk_detection/lib/dataset/alignmentDataset.py94 # If not, just return the image as isCOMMENT
LOW…68ldk_detection/lib/dataset/encoder/encoder_default.py45 # If not, just return the image as isCOMMENT
Verbosity Indicators11 hits · 20 pts
SeverityFileLineSnippetContext
LOW…models/cv/nerf_recon_vq_compression/dataloader/llff.py180 # Step 1: rescale focal length according to training resolutionCOMMENT
LOW…models/cv/nerf_recon_vq_compression/dataloader/llff.py190 # Step 2: correct posesCOMMENT
LOW…models/cv/nerf_recon_vq_compression/dataloader/llff.py198 # Step 3: correct scale so that the nearest depth is at a little more than 1.0COMMENT
LOW…cv/video_multi_object_tracking/tracker/multitracker.py248 # Step 1: Network forward, get detections & embeddingsCOMMENT
LOW…cv/video_multi_object_tracking/tracker/multitracker.py288 # Step 2: First association, with embeddingCOMMENT
LOW…cv/video_multi_object_tracking/tracker/multitracker.py307 # Step 3: Second association, with IOUCOMMENT
LOW…cv/video_multi_object_tracking/tracker/multitracker.py345 # Step 4: Init new stracksCOMMENT
LOW…cv/video_multi_object_tracking/tracker/multitracker.py352 # Step 5: Update stateCOMMENT
LOW…es/pytorch/human_detection/finetune_human_detection.py25# Step 1: 数据集准备,可以使用modelscope上已有的数据集,也可以自己在本地构建COCO数据集COMMENT
LOW…es/pytorch/human_detection/finetune_human_detection.py37# Step 2: 相关参数设置COMMENT
LOW…es/pytorch/human_detection/finetune_human_detection.py62# Step 3: 开启训练任务COMMENT
Structural Annotation Overuse11 hits · 20 pts
SeverityFileLineSnippetContext
LOW…models/cv/nerf_recon_vq_compression/dataloader/llff.py180 # Step 1: rescale focal length according to training resolutionCOMMENT
LOW…models/cv/nerf_recon_vq_compression/dataloader/llff.py190 # Step 2: correct posesCOMMENT
LOW…models/cv/nerf_recon_vq_compression/dataloader/llff.py198 # Step 3: correct scale so that the nearest depth is at a little more than 1.0COMMENT
LOW…cv/video_multi_object_tracking/tracker/multitracker.py248 # Step 1: Network forward, get detections & embeddingsCOMMENT
LOW…cv/video_multi_object_tracking/tracker/multitracker.py288 # Step 2: First association, with embeddingCOMMENT
LOW…cv/video_multi_object_tracking/tracker/multitracker.py307 # Step 3: Second association, with IOUCOMMENT
LOW…cv/video_multi_object_tracking/tracker/multitracker.py345 # Step 4: Init new stracksCOMMENT
LOW…cv/video_multi_object_tracking/tracker/multitracker.py352 # Step 5: Update stateCOMMENT
LOW…es/pytorch/human_detection/finetune_human_detection.py25# Step 1: 数据集准备,可以使用modelscope上已有的数据集,也可以自己在本地构建COCO数据集COMMENT
LOW…es/pytorch/human_detection/finetune_human_detection.py37# Step 2: 相关参数设置COMMENT
LOW…es/pytorch/human_detection/finetune_human_detection.py62# Step 3: 开启训练任务COMMENT
Redundant / Tautological Comments14 hits · 20 pts
SeverityFileLineSnippetContext
LOWtests/hub/test_create_aigc_model.py70 # Check if the error message is the one we expect.COMMENT
LOWmodelscope/exporters/torch_model_exporter.py138 # Check if this arg has a default valueCOMMENT
LOWmodelscope/models/nlp/mglm/generation_utils.py244 # Check if we are done so that we can save a pad step if all(done)STRING
LOWmodelscope/models/nlp/T5/backbone.py926 # Set embed_tokens to first layerSTRING
LOWmodelscope/models/nlp/heads/crf_head.py356 # Set score to the next score if this timestep is valid (mask == 1)COMMENT
LOWmodelscope/models/nlp/heads/crf_head.py424 # Set score to the next score if this timestep is valid (mask == 1)COMMENT
LOWmodelscope/models/nlp/heads/crf_head.py527 # Set score to the next score if this timestep is valid (mask == 1)COMMENT
LOW…lscope/models/cv/video_depth_estimation/utils/image.py20 # Check if camera opened successfullyCOMMENT
LOW…s/cv/video_depth_estimation/models/model_checkpoint.py112 # Check if saving or notCOMMENT
LOW…lti_modal/custom_diffusion/custom_diffusion_trainer.py365 # Check if initializer_token is a single token or a sequence of tokensCOMMENT
LOW…rainers/nlp/document_grounded_dialog_rerank_trainer.py438 # Check if saved optimizer or scheduler states existCOMMENT
LOWmodelscope/hub/file_download.py199 # Check if download is completeCOMMENT
LOWmodelscope/hub/utils/utils.py308 # Write the file if it has changedCOMMENT
LOWmodelscope/hub/utils/aigc.py117 # Check if it's a local file path (not a URL)COMMENT
Fake / Example Data15 hits · 10 pts
SeverityFileLineSnippetContext
LOWmodelscope/models/multi_modal/mgeo/backbone.py1784 dummy_token = torch.full((effective_batch_size, 1),STRING
LOWmodelscope/models/multi_modal/mgeo/backbone.py1788 input_ids = torch.cat([input_ids, dummy_token], dim=1)STRING
LOWmodelscope/models/multi_modal/mgeo/backbone.py1911 dummy_token = torch.full((effective_batch_size, 1),STRING
LOWmodelscope/models/multi_modal/mgeo/backbone.py1915 input_ids = torch.cat([input_ids, dummy_token], dim=1)STRING
LOWmodelscope/models/nlp/structbert/fill_mask.py280 dummy_token = torch.full((effective_batch_size, 1),STRING
LOWmodelscope/models/nlp/structbert/fill_mask.py284 input_ids = torch.cat([input_ids, dummy_token], dim=1)STRING
LOWmodelscope/models/nlp/task_models/fill_mask.py68 dummy_token = torch.full((effective_batch_size, 1),CODE
LOWmodelscope/models/nlp/task_models/fill_mask.py72 input_ids = torch.cat([input_ids, dummy_token], dim=1)CODE
LOWmodelscope/models/nlp/megatron_bert/fill_mask.py281 dummy_token = torch.full((effective_batch_size, 1),STRING
LOWmodelscope/models/nlp/megatron_bert/fill_mask.py285 input_ids = torch.cat([input_ids, dummy_token], dim=1)STRING
LOW…dels/cv/face_reconstruction/models/pix2pix/networks.py361 fake_data,CODE
LOW…dels/cv/face_reconstruction/models/pix2pix/networks.py371 fake_data (tensor array) -- generated images from the generatorSTRING
LOW…dels/cv/face_reconstruction/models/pix2pix/networks.py384 interpolatesv = fake_dataCODE
LOW…dels/cv/face_reconstruction/models/pix2pix/networks.py391 interpolatesv = alpha * real_data + ((1 - alpha) * fake_data)CODE
LOW…e/models/cv/video_panoptic_segmentation/video_k_net.py142 previous='placeholder',CODE
Modern AI Meta-Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUM…delscope/models/multi_modal/clip_interrogator/model.py81# CLIP is a zero-shot image classifier which can be used to generate image and text embeddings.COMMENT
MEDIUMmodelscope/outputs/outputs.py1172 # zero-shot classification result for single sampleCOMMENT
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMmodelscope/models/multi_modal/mgeo/backbone.py2501CODE
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWmodelscope/models/nlp/plug/AnnealingLR.py59 # TODO: implement exponential decayCOMMENT