AI Slop Code RIsk Monitor

modelscope/modelscope

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

25.9 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for modelscope/modelscope, a Python project with 9,164 GitHub stars. SynthScan examined 636,317 lines of code across 3509 source files, recording 10964 pattern matches distributed across 22 syntactic categories. The legacy adjusted pattern signal is 25.9 (Elevated pattern signal); it is not an authorship estimate.

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

25.9
Adjusted Signal
25.9
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
9.2K
Stars
Python
Language
636.3K
Lines of Code
3.5K
Files
11.0K
Pattern Hits
2026-10-12
Scan Date
0.35
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 30.1/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 30.5/100 · MEDIUM

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

Agent Over-Engineering Ratio 54.5/100 · HIGH

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

PR Review Velocity Impact 75.6/100 · CRITICAL

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

What These Metrics Mean

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

Pattern-Signal History

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

Severity Breakdown

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

CRITICAL 9HIGH 1226MEDIUM 383LOW 9346

Directory Score Breakdown

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

Pattern Findings

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

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

Cross-File Repetition1076 hits · 5380 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
1016 more matches not shown…
Unused Imports4632 hits · 4386 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
4572 more matches not shown…
Hyper-Verbose Identifiers1585 hits · 1596 pts
SeverityFileLineSnippetContext
LOWtools/weight_diff.py32def smart_tokenizer_and_embedding_resize(special_tokens_dict: Dict, tokenizer,CODE
LOWdocker/build_image.py63 def _generate_cudatoolkit_version(self, cuda_version: str) -> str:CODE
LOWdocker/build_image.py75 def _remove_pynini_related_dependency(content: str) -> str:CODE
LOWdocker/build_image.py649 def _modelscope_hub_install_cmd(self) -> Optional[str]:CODE
LOWdocker/build_image.py953 def probe_base_image_versions(cls, base_image: str) -> dict: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
LOW⚡tests/studios/test_studio_cli.py126 def test_studio_deploy_missing_id(self):CODE
LOW⚡tests/studios/test_studio_cli.py131 def test_studio_no_subcommand_raises(self):CODE
LOW⚡tests/studios/test_studio_cli.py138 def test_studio_settings_no_field_raises(self):CODE
LOWtests/studios/test_studio_cli.py160 def test_secret_no_action_raises(self):CODE
LOWtests/studios/test_studio_cli.py240 def test_create_studio_exist_ok(self):CODE
LOWtests/studios/test_studio_cli.py256 def test_create_studio_exist_raises(self):CODE
LOWtests/studios/test_studio_cli.py426 def test_secret_update_direct(self):CODE
LOWtests/studios/test_studio_cli.py452 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
LOW⚡tests/pipelines/test_text_generation.py108 def test_palm_zh_base_with_model_name_batch(self):STRING
LOW⚡tests/pipelines/test_text_generation.py117 def test_palm_zh_base_with_model_name_batch_iter(self):STRING
1525 more matches not shown…
AI Structural Patterns1190 hits · 1164 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.py82CODE
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
1130 more matches not shown…
Deep Nesting1021 hits · 1006 pts
SeverityFileLineSnippetContext
LOWdocker/build_image.py927CODE
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.py59CODE
LOWtests/msdatasets/test_dataset_delete.py48CODE
LOWmodelscope/metainfo.py1086CODE
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
961 more matches not shown…
Decorative Section Separators297 hits · 945 pts
SeverityFileLineSnippetContext
MEDIUMmodelscope/metrics/video_frame_interpolation_metric.py1# ------------------------------------------------------------------------COMMENT
MEDIUMmodelscope/metrics/video_frame_interpolation_metric.py3# ------------------------------------------------------------------------COMMENT
MEDIUM⚡modelscope/metrics/image_denoise_metric.py1# ------------------------------------------------------------------------COMMENT
MEDIUM⚡modelscope/metrics/image_denoise_metric.py3# ------------------------------------------------------------------------COMMENT
MEDIUM⚡modelscope/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
MEDIUM⚡modelscope/models/nlp/gpt_moe/distributed_gpt_moe.py434 # ==================================COMMENT
MEDIUM⚡modelscope/models/nlp/gpt_moe/distributed_gpt_moe.py436 # ==================================COMMENT
MEDIUM⚡modelscope/models/nlp/gpt_moe/distributed_gpt_moe.py441 # =================COMMENT
MEDIUM⚡modelscope/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
237 more matches not shown…
Docstring Block Structure69 hits · 345 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.py531merge dict ``a`` into dict ``b`` (non-inplace). Values in ``a`` will overwrite ``b``. ``b`` is copied first to STRING
HIGHmodelscope/utils/device.py45 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.py102Instantiate 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.py93 List available MCP servers, if (optional) token is presented, this would return private MCP servers as well. STRING
HIGHmodelscope/hub/mcp_api.py217 Get detailed information for a specific MCP Server, a valid token shall be provided if the MCP server iSTRING
HIGHmodelscope/hub/mcp_api.py295 Host an MCP server under your own account. Args: server_id: MCP server ID (e.g., "@amap/amSTRING
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
9 more matches not shown…
Excessive Try-Catch Wrapping302 hits · 330 pts
SeverityFileLineSnippetContext
LOWdocker/build_image.py1300 except Exception as error:CODE
LOWdocker/build_image.py1473 except Exception as build_error:CODE
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.py314 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.py608 except Exception:CODE
LOWtests/utils/test_hf_util.py660 except Exception as e:CODE
LOWtests/utils/test_hf_util.py664 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/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
LOW⚡tests/cli/test_download_cmd.py131 except Exception as e:CODE
LOW⚡tests/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.py37 except Exception as e:CODE
LOW⚡tests/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
MEDIUMtests/hub/test_commit_scheduler.py45def cleanup(scheduler):CODE
MEDIUMtests/hub/test_commit_scheduler.py54def remove_atexit_callback(scheduler):CODE
LOW⚡tests/hub/test_commit_scheduler.py49 except Exception as e:CODE
LOW⚡tests/hub/test_commit_scheduler.py57 except Exception as e:CODE
LOW⚡tests/hub/test_commit_scheduler.py66 except Exception:CODE
LOW⚡tests/hub/test_commit_scheduler.py74 except Exception as e:CODE
LOW⚡tests/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
LOW⚡tests/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
242 more matches not shown…
Modern Structural Boilerplate313 hits · 311 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
253 more matches not shown…
Empty Error Handlers59 hits · 295 pts
SeverityFileLineSnippetContext
HIGHtests/run.py570except AttributeError or ImportError:CODE
HIGHtests/run.py578except AttributeError or ImportError:CODE
HIGHtests/studios/test_studio_cli.py314except Exception:CODE
HIGHtests/utils/test_hf_util_kernels.py81except AttributeError:CODE
HIGHtests/utils/test_hf_util.py125except Exception:CODE
HIGHtests/utils/test_hf_util.py138except: # noqaCODE
HIGHtests/utils/test_hf_util.py157except Exception:CODE
HIGHtests/utils/test_hf_util.py195except Exception:CODE
HIGHtests/utils/test_hf_util.py608except Exception:CODE
HIGHtests/utils/test_hf_util.py664except Exception:CODE
HIGHtests/hub/test_download_file_lock.py74except Exception: # noqaCODE
HIGHtests/hub/test_commit_scheduler.py66except Exception:CODE
HIGHmodelscope/__init__.py130except Exception: # noqaCODE
HIGH…ope/preprocessors/nlp/space_T_cn/fields/schema_link.py53except ValueError:CODE
HIGH…ope/preprocessors/nlp/space_T_cn/fields/schema_link.py60except (TypeError, ValueError):CODE
HIGHmodelscope/preprocessors/templates/loader.py1044except Exception:CODE
HIGHmodelscope/preprocessors/templates/template.py1673except ValueError:CODE
HIGHmodelscope/preprocessors/templates/base.py50except ValueError:CODE
HIGHmodelscope/fileio/format/jsonplus.py22except ImportError:CODE
HIGHmodelscope/pipelines/base.py513except AttributeError:CODE
HIGHmodelscope/utils/plugins.py570except Exception:CODE
HIGHmodelscope/utils/test_utils.py44except Exception:CODE
HIGHmodelscope/utils/config.py726except TypeError:CODE
HIGHmodelscope/utils/import_utils.py194except importlib_metadata.PackageNotFoundError:CODE
HIGHmodelscope/utils/regress_test_utils.py448except MsRegressTool.EarlyStopError:CODE
HIGHmodelscope/utils/audio/audio_utils.py118except Exception:CODE
HIGHmodelscope/utils/hf_util/patcher.py82except: # noqaCODE
HIGHmodelscope/utils/hf_util/patcher.py98except: # noqaCODE
HIGHmodelscope/utils/hf_util/patcher.py609except Exception: # noqaCODE
HIGHmodelscope/utils/hf_util/patcher.py76except: # noqaCODE
HIGHmodelscope/utils/hf_util/patcher.py118except: # noqaCODE
HIGHmodelscope/models/audio/aec/jaec.py113except Exception:CODE
HIGH…elscope/models/cv/anydoor/ldm/models/diffusion/ddpm.py1493except KeyError:CODE
HIGH…e/models/cv/dense_optical_flow_estimation/core/corr.py9except ModuleNotFoundError:CODE
HIGH…cope/models/cv/video_object_segmentation/mod_resnet.py168except Exception:CODE
HIGH…lscope/models/cv/nerf_recon_vq_compression/renderer.py69except Exception:CODE
HIGH…lscope/models/cv/nerf_recon_vq_compression/renderer.py165except Exception:CODE
HIGH…e/models/cv/video_multi_object_tracking/models/yolo.py84except Exception:CODE
HIGH…v/controllable_image_generation/annotator/annotator.py76except Exception:CODE
HIGH…/controllable_image_generation/annotator/mlsd/utils.py607except Exception:CODE
HIGH…models/cv/video_stabilization/utils/ProjectionUtils.py193except Exception:CODE
HIGH…elscope/models/cv/video_stabilization/DUT/rf_det_so.py211except Exception:CODE
HIGH…ope/models/cv/video_stabilization/DUT/rf_det_module.py219except Exception:CODE
HIGH…elscope/models/cv/video_stabilization/DUT/RAFT/corr.py12except Exception:CODE
HIGH…ion/scrfd/mmdet_patch/models/dense_heads/scrfd_head.py231except Exception:CODE
HIGHmodelscope/cli/llamafile.py140except ModuleNotFoundError:CODE
HIGHmodelscope/trainers/nlp_trainer.py64except AttributeError:CODE
HIGHmodelscope/trainers/cli_argument_parser.py68except ValueError:CODE
HIGHmodelscope/trainers/cli_argument_parser.py72except ValueError:CODE
HIGHmodelscope/trainers/hooks/compression/utils.py138except ImportError:CODE
HIGH…s/image_control_3d_portrait/torch_utils/persistence.py144except TypeError:CODE
HIGHmodelscope/msdatasets/utils/hf_datasets_util.py471except Exception:CODE
HIGHmodelscope/hub/file_download.py79except Exception:CODE
HIGHmodelscope/hub/check_model.py104except: # noqa: E722CODE
HIGHmodelscope/hub/repository.py49except GitError:CODE
HIGHmodelscope/hub/utils/caching.py93except OSError:CODE
HIGHmodelscope/hub/utils/caching.py75except OSError:CODE
HIGHmodelscope/hub/utils/caching.py209except OSError:CODE
HIGHmodelscope/hub/utils/utils.py496except OSError:CODE
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 Confusion22 hits · 122 pts
SeverityFileLineSnippetContext
HIGHdocker/build_image.py128 ret = self.push()CODE
HIGHdocker/build_image.py640 return ('cd /tmp && GIT_LFS_SKIP_SMUDGE=1 git clone -b 'CODE
HIGH⚡…preprocessors/test_action_detection_mapper_security.py131 "'echo HACKED && touch {}')").format(canary)CODE
HIGH⚡tests/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
HIGH⚡tests/hub/test_hub_revision_release_mode.py60 self.repo.push('add model')CODE
HIGH⚡tests/hub/test_hub_revision_release_mode.py69 self.repo.push('add new file')CODE
HIGH⚡tests/hub/test_hub_revision_release_mode.py75 self.repo.push('add new file', remote_branch=branch_name)CODE
HIGH⚡tests/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.py66 repo.push(commit_message)CODE
HIGHmodelscope/hub/repository.py145 self.git_wrapper.push(CODE
HIGHmodelscope/hub/repository.py262 self.git_wrapper.push(CODE
HIGH⚡modelscope/hub/utils/utils.py386 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
CRITICAL⚡modelscope/models/nlp/plug/distributed_plug.py96 model.module.model.bert.embeddings.word_embeddings.float()CODE
CRITICAL⚡modelscope/models/nlp/plug/distributed_plug.py97 model.module.model.bert.embeddings.position_embeddings.float()CODE
CRITICAL⚡modelscope/models/nlp/plug/distributed_plug.py98 model.module.model.bert.embeddings.token_type_embeddings.float(CODE
CRITICAL⚡modelscope/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.py25 # 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.py150 # 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.py1181 """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 Comments13 hits · 18 pts
SeverityFileLineSnippetContext
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.py234 # Check if download is completeCOMMENT
LOW⚡modelscope/hub/utils/utils.py380 # Write the file if it has changedCOMMENT
LOWmodelscope/hub/utils/aigc.py126 # 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