Core ML tools contain supporting tools for Core ML model conversion, editing, and validation.
This report summarizes scanner evidence for apple/coremltools, a Python project with 5,438 GitHub stars. SynthScan examined 409,761 lines of code across 1120 source files, recording 4384 pattern matches distributed across 25 syntactic categories. The legacy adjusted pattern signal is 12.0 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 3431 finding(s).
Are imports declared and package/API names verified? 771 finding(s).
Are wrappers, guards, and repeated structures necessary? 2702 finding(s).
Which changes need focused human review? 4384 finding(s).
Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 4384 distinct pattern matches across 25 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | coremltools/optimize/_utils.py | 133 | def promote_rank_to_same_as_data( | CODE |
| LOW | coremltools/optimize/_utils.py | 163 | def _cast_from_quantized_dtype(input_data: np.ndarray) -> np.ndarray: | CODE |
| LOW | coremltools/optimize/_utils.py | 200 | def dequantize_by_scale_and_zp( | CODE |
| LOW | coremltools/optimize/_utils.py | 371 | def reshape_weight_for_vector_lut( | CODE |
| LOW | coremltools/optimize/_utils.py | 536 | def select_input_output_channel_axis(op: "Operation") -> Tuple[Optional[int], Optional[int]]: | CODE |
| LOW | coremltools/optimize/_utils.py | 791 | def restore_elements_from_packed_bits( | CODE |
| LOW | coremltools/optimize/_utils.py | 881 | def _combine_lists_with_common_elements(data: List[List[str]]) -> List[List[str]]: | CODE |
| LOW | coremltools/optimize/_utils.py | 914 | def _adjust_concat_surrounding_activation_stats( | CODE |
| LOW | coremltools/optimize/torch/base_model_optimizer.py | 70 | def _get_model_for_compression(self, inplace: bool): | CODE |
| LOW | coremltools/optimize/torch/optimization_config.py | 153 | def _structure_from_dict_hook_factory(conversion_cls: _Any) -> _Callable: | CODE |
| LOW | coremltools/optimize/torch/optimization_config.py | 154 | def _structure_from_dict_hook( | CODE |
| LOW | coremltools/optimize/torch/optimization_config.py | 174 | def _validate_module_type_keys_factory(supported_modules): | CODE |
| LOW | coremltools/optimize/torch/_utils/k_means.py | 211 | def _scale_by_per_channel_scale(self, param_name: str, param: _torch.Tensor) -> _torch.Tensor: | CODE |
| LOW | coremltools/optimize/torch/_utils/k_means.py | 227 | def _get_compression_metadata( | CODE |
| LOW | coremltools/optimize/torch/_utils/k_means.py | 274 | def _register_compression_metadata( | CODE |
| LOW | coremltools/optimize/torch/_utils/k_means.py | 283 | def _unscale_by_per_channel_scale(self, param_name: str, param: _torch.Tensor) -> _torch.Tensor: | CODE |
| LOW | coremltools/optimize/torch/_utils/k_means.py | 508 | def _cluster_weights_with_masking( | CODE |
| LOW | coremltools/optimize/torch/_utils/k_means.py | 685 | def _update_clustered_block_weight( | CODE |
| LOW | coremltools/optimize/torch/_utils/k_means.py | 900 | def _prepare_worker_processes( | CODE |
| LOW | coremltools/optimize/torch/_utils/k_means.py | 1034 | def _prepare_worker_processes( | CODE |
| LOW | coremltools/optimize/torch/_utils/k_means.py | 1077 | def _prepare_worker_processes( | CODE |
| LOW | coremltools/optimize/torch/_utils/report_utils.py | 39 | def compute_post_training_report( | CODE |
| LOW | coremltools/optimize/torch/_utils/optimizer_utils.py | 57 | def is_supported_module_for_config( | CODE |
| LOW | coremltools/optimize/torch/_utils/graph_utils.py | 104 | def parse_call_function_target(target: _Any) -> str: | CODE |
| LOW | coremltools/optimize/torch/_utils/validation_utils.py | 54 | def sanitize_quantization_block_size(self): | CODE |
| LOW⚡ | coremltools/optimize/torch/_utils/validation_utils.py | 122 | def sanitize_palettization_group_size(self): | CODE |
| LOW | coremltools/optimize/torch/_utils/validation_utils.py | 149 | def sanitize_palettization_cluster_dim(self): | CODE |
| LOW | coremltools/optimize/torch/_utils/metadata_utils.py | 113 | def _get_metadata_buffer_name(self, metadata_key: str) -> str: | CODE |
| LOW | coremltools/optimize/torch/_utils/metadata_utils.py | 140 | def register_metadata_version(model: _torch.nn.Module): | CODE |
| LOW | coremltools/optimize/torch/_utils/torch_utils.py | 112 | def maybe_convert_str_to_dtype(dtype: _Union[str, _torch.dtype]) -> _torch.dtype: | CODE |
| LOW | coremltools/optimize/torch/_utils/torch_utils.py | 150 | def maybe_convert_str_to_mod_type(mod_type: str): | CODE |
| LOW | coremltools/optimize/torch/_utils/torch_utils.py | 249 | def normalize_fsdp_module_name(module_name: str) -> str: | CODE |
| LOW | …ze/torch/layerwise_compression/layerwise_compressor.py | 312 | def _register_activation_processing_hook( | CODE |
| LOW | …ze/torch/layerwise_compression/layerwise_compressor.py | 321 | def activation_processing_hook(_, inp, out): | CODE |
| LOW | …ols/optimize/torch/layerwise_compression/algorithms.py | 332 | def _get_compression_metadata(self, param_name, param): | CODE |
| LOW | …ols/optimize/torch/layerwise_compression/algorithms.py | 335 | def _store_quantization_params(self, quantizer: _Quantizer): | CODE |
| LOW | …ols/optimize/torch/layerwise_compression/algorithms.py | 510 | def _get_compression_metadata(self, param_name, param): | CODE |
| LOW | …ols/optimize/torch/layerwise_compression/algorithms.py | 694 | def _get_compression_metadata(self, param_name, param): | CODE |
| LOW | …s/optimize/torch/layerwise_compression/input_cacher.py | 115 | def _get_input_cacher_pre_hook(inputs, kwarg_inputs): | CODE |
| LOW | …optimize/torch/quantization/_coreml_quantizer_utils.py | 179 | def get_not_object_type_or_name_filter( | CODE |
| LOW | …optimize/torch/quantization/_coreml_quantizer_utils.py | 190 | def not_object_type_or_name_filter(n: _Node) -> bool: | CODE |
| LOW | …optimize/torch/quantization/_coreml_quantizer_utils.py | 196 | def _get_weighted_mod_pattern( | CODE |
| LOW | …optimize/torch/quantization/_coreml_quantizer_utils.py | 233 | def _get_weighted_mod_bn_pattern( | CODE |
| LOW | …optimize/torch/quantization/_coreml_quantizer_utils.py | 270 | def get_binary_op_act_pattern( | CODE |
| LOW | …optimize/torch/quantization/_coreml_quantizer_utils.py | 403 | def annotate_weighted_mod_pattern( | CODE |
| LOW | …optimize/torch/quantization/_coreml_quantizer_utils.py | 513 | def annotate_binary_op_act_pattern( | CODE |
| LOW | …optimize/torch/quantization/_coreml_quantizer_utils.py | 607 | def annotate_unary_shared_observer_ops( | CODE |
| LOW | …optimize/torch/quantization/_coreml_quantizer_utils.py | 663 | def annotate_conv_bn_act_helper( | CODE |
| LOW | …optimize/torch/quantization/_coreml_quantizer_utils.py | 706 | def annotate_linear_bn_act_helper( | CODE |
| LOW | …optimize/torch/quantization/_coreml_quantizer_utils.py | 746 | def annotate_binary_op_helper( | CODE |
| LOW | …imize/torch/quantization/post_training_quantization.py | 356 | def _compute_quantization_params( | CODE |
| LOW | …imize/torch/quantization/post_training_quantization.py | 498 | def _get_compression_metadata(self, param_name, submod_config, scale, zero_point): | CODE |
| LOW | coremltools/optimize/torch/quantization/quantizer.py | 172 | def _get_torch_ao_prepared_model( | CODE |
| LOW | coremltools/optimize/torch/quantization/_configure.py | 185 | def _get_default_quantization_options(self): | CODE |
| LOW | coremltools/optimize/torch/quantization/_configure.py | 188 | def _get_observer_type_to_param_names(self): | CODE |
| LOW | coremltools/optimize/torch/quantization/_configure.py | 214 | def _setup_fake_quant_module_device( | CODE |
| LOW | coremltools/optimize/torch/quantization/_configure.py | 254 | def _get_affine_act_post_process_mod_from_symmetric(self, module: _aoquant.FakeQuantizeBase): | CODE |
| LOW | coremltools/optimize/torch/quantization/_configure.py | 286 | def _replace_activation_quantizers(self, model: _fx.GraphModule) -> _fx.GraphModule: | CODE |
| LOW | coremltools/optimize/torch/quantization/_configure.py | 306 | def _mark_act_post_process_for_replacement( | CODE |
| LOW | coremltools/optimize/torch/quantization/_configure.py | 343 | def _remove_activation_quantizer_after_dropout(model: _fx.GraphModule): | CODE |
| 2389 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlmodel/docs/preprocess.py | 4 | CODE | |
| LOW | coremltools/__init__.py | 28 | CODE | |
| LOW | coremltools/__init__.py | 124 | CODE | |
| LOW | coremltools/__init__.py | 124 | CODE | |
| LOW | coremltools/__init__.py | 124 | CODE | |
| LOW | coremltools/__init__.py | 124 | CODE | |
| LOW | coremltools/__init__.py | 127 | CODE | |
| LOW | coremltools/__init__.py | 128 | CODE | |
| LOW | coremltools/__init__.py | 129 | CODE | |
| LOW | coremltools/__init__.py | 129 | CODE | |
| LOW | coremltools/__init__.py | 129 | CODE | |
| LOW | coremltools/__init__.py | 129 | CODE | |
| LOW | coremltools/__init__.py | 129 | CODE | |
| LOW | coremltools/__init__.py | 129 | CODE | |
| LOW | coremltools/__init__.py | 129 | CODE | |
| LOW | coremltools/__init__.py | 130 | CODE | |
| LOW | coremltools/__init__.py | 131 | CODE | |
| LOW | coremltools/__init__.py | 132 | CODE | |
| LOW | coremltools/__init__.py | 133 | CODE | |
| LOW | coremltools/__init__.py | 134 | CODE | |
| LOW | coremltools/__init__.py | 135 | CODE | |
| LOW | coremltools/__init__.py | 138 | CODE | |
| LOW | coremltools/optimize/__init__.py | 9 | CODE | |
| LOW | coremltools/optimize/_utils.py | 13 | CODE | |
| LOW | coremltools/optimize/torch/__init__.py | 6 | CODE | |
| LOW | coremltools/optimize/torch/__init__.py | 6 | CODE | |
| LOW | coremltools/optimize/torch/__init__.py | 6 | CODE | |
| LOW | coremltools/optimize/torch/__init__.py | 6 | CODE | |
| LOW | coremltools/optimize/torch/__init__.py | 6 | CODE | |
| LOW | coremltools/optimize/torch/__init__.py | 6 | CODE | |
| LOW | …tools/optimize/torch/layerwise_compression/__init__.py | 89 | CODE | |
| LOW | …tools/optimize/torch/layerwise_compression/__init__.py | 89 | CODE | |
| LOW | …tools/optimize/torch/layerwise_compression/__init__.py | 89 | CODE | |
| LOW | …tools/optimize/torch/layerwise_compression/__init__.py | 89 | CODE | |
| LOW | …tools/optimize/torch/layerwise_compression/__init__.py | 89 | CODE | |
| LOW | …tools/optimize/torch/layerwise_compression/__init__.py | 89 | CODE | |
| LOW | …tools/optimize/torch/layerwise_compression/__init__.py | 97 | CODE | |
| LOW | …tools/optimize/torch/layerwise_compression/__init__.py | 97 | CODE | |
| LOW | …tools/optimize/torch/layerwise_compression/__init__.py | 97 | CODE | |
| LOW | …tools/optimize/torch/layerwise_compression/__init__.py | 98 | CODE | |
| LOW | …tools/optimize/torch/layerwise_compression/__init__.py | 98 | CODE | |
| LOW | coremltools/optimize/torch/quantization/__init__.py | 44 | CODE | |
| LOW | coremltools/optimize/torch/quantization/__init__.py | 44 | CODE | |
| LOW | coremltools/optimize/torch/quantization/__init__.py | 44 | CODE | |
| LOW | coremltools/optimize/torch/quantization/__init__.py | 44 | CODE | |
| LOW | coremltools/optimize/torch/quantization/__init__.py | 50 | CODE | |
| LOW | coremltools/optimize/torch/quantization/__init__.py | 52 | CODE | |
| LOW | coremltools/optimize/torch/quantization/__init__.py | 52 | CODE | |
| LOW | coremltools/optimize/torch/quantization/__init__.py | 52 | CODE | |
| LOW | coremltools/optimize/torch/pruning/__init__.py | 57 | CODE | |
| LOW | coremltools/optimize/torch/pruning/__init__.py | 57 | CODE | |
| LOW | coremltools/optimize/torch/pruning/__init__.py | 57 | CODE | |
| LOW | coremltools/optimize/torch/pruning/__init__.py | 58 | CODE | |
| LOW | coremltools/optimize/torch/pruning/__init__.py | 58 | CODE | |
| LOW | coremltools/optimize/torch/palettization/__init__.py | 59 | CODE | |
| LOW | coremltools/optimize/torch/palettization/__init__.py | 60 | CODE | |
| LOW | coremltools/optimize/torch/palettization/__init__.py | 60 | CODE | |
| LOW | coremltools/optimize/torch/palettization/__init__.py | 61 | CODE | |
| LOW | coremltools/optimize/torch/palettization/__init__.py | 62 | CODE | |
| LOW | coremltools/optimize/torch/palettization/__init__.py | 62 | CODE | |
| 649 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | …ize/torch/quantization/modules/conv_transpose_fused.py | 71 | nni.qat.modules.conv_fused._ConvBnNd.__init__( | CODE |
| CRITICAL | …mltools/test/neural_network/test_custom_neural_nets.py | 74 | output.type.multiArrayType.dataType = coremltools.proto.FeatureTypes_pb2.ArrayFeatureType.ArrayDataType.Value( | CODE |
| CRITICAL | coremltools/test/neural_network/test_numpy_nn_layers.py | 5458 | output.type.multiArrayType.dataType = coremltools.proto.FeatureTypes_pb2.ArrayFeatureType.ArrayDataType.Value( | CODE |
| CRITICAL | coremltools/test/neural_network/test_numpy_nn_layers.py | 5530 | output.type.multiArrayType.dataType = coremltools.proto.FeatureTypes_pb2.ArrayFeatureType.ArrayDataType.Value( | CODE |
| CRITICAL | coremltools/test/sklearn_tests/test_io_types.py | 265 | output.type.imageType.colorSpace = coremltools.proto.FeatureTypes_pb2.ImageFeatureType.ColorSpace.Value( | CODE |
| CRITICAL | coremltools/test/sklearn_tests/test_io_types.py | 298 | output.type.imageType.colorSpace = coremltools.proto.FeatureTypes_pb2.ImageFeatureType.ColorSpace.Value( | CODE |
| CRITICAL | coremltools/test/sklearn_tests/test_io_types.py | 331 | output.type.imageType.colorSpace = coremltools.proto.FeatureTypes_pb2.ImageFeatureType.ColorSpace.Value( | CODE |
| CRITICAL⚡ | …s/mil/frontend/torch/test/test_torch_conversion_api.py | 296 | assert ct.converters.mil.frontend.torch.is_torch_fx_node_supported(node) | CODE |
| CRITICAL⚡ | …s/mil/frontend/torch/test/test_torch_conversion_api.py | 299 | assert not ct.converters.mil.frontend.torch.is_torch_fx_node_supported(node) | CODE |
| CRITICAL | …s/mil/frontend/torch/test/test_torch_conversion_api.py | 325 | == ct.converters.mil.frontend.torch.is_torch_fx_node_supported(node) | CODE |
| CRITICAL | …s/mil/frontend/torch/test/test_torch_conversion_api.py | 329 | assert not ct.converters.mil.frontend.torch.is_torch_fx_node_supported(node) | CODE |
| CRITICAL | coremltools/models/tree_ensemble.py | 191 | _proto.TreeEnsemble_pb2.TreeEnsembleParameters.TreeNode.TreeNodeBehavior.Value( | STRING |
| CRITICAL | coremltools/models/tree_ensemble.py | 229 | _proto.TreeEnsemble_pb2.TreeEnsembleParameters.TreeNode.TreeNodeBehavior.Value( | STRING |
| CRITICAL | coremltools/models/tree_ensemble.py | 250 | _proto.TreeEnsemble_pb2.TreeEnsembleParameters.TreeNode.TreeNodeBehavior.Value( | STRING |
| CRITICAL | coremltools/models/model.py | 1020 | key_pair.key.immediateValue.tensor.strings.values.append(k) | CODE |
| CRITICAL | coremltools/models/model.py | 1022 | key_pair.value.immediateValue.tensor.strings.values.append(v) | CODE |
| CRITICAL | coremltools/models/nearest_neighbors/builder.py | 187 | self.spec.kNearestNeighborsClassifier.nearestNeighborsIndex.squaredEuclideanDistance.MergeFromString( | CODE |
| CRITICAL | coremltools/models/nearest_neighbors/builder.py | 376 | self.spec.kNearestNeighborsClassifier.nearestNeighborsIndex.linearIndex.MergeFromString( | CODE |
| CRITICAL | coremltools/models/nearest_neighbors/builder.py | 518 | self.spec.kNearestNeighborsClassifier.numberOfNeighbors.set.values.append( | CODE |
| CRITICAL⚡ | coremltools/models/nearest_neighbors/builder.py | 593 | self.spec.kNearestNeighborsClassifier.nearestNeighborsIndex.floatSamples.add() | CODE |
| CRITICAL⚡ | coremltools/models/nearest_neighbors/builder.py | 600 | self.spec.kNearestNeighborsClassifier.int64ClassLabels.vector.append( | CODE |
| CRITICAL⚡ | coremltools/models/nearest_neighbors/builder.py | 606 | self.spec.kNearestNeighborsClassifier.stringClassLabels.vector.append( | CODE |
| CRITICAL | coremltools/models/neural_network/builder.py | 1183 | self.nn_spec.updateParams.epochs.set.values.extend([epochs]) | STRING |
| CRITICAL | coremltools/models/neural_network/builder.py | 1185 | self.nn_spec.updateParams.epochs.set.values.extend(allowed_set) | STRING |
| CRITICAL | …emltools/models/neural_network/flexible_shape_utils.py | 343 | s = feature.type.multiArrayType.shapeRange.sizeRanges.add() | CODE |
| CRITICAL | …emltools/models/neural_network/flexible_shape_utils.py | 414 | s = feature.type.multiArrayType.enumeratedShapes.shapes.add() | CODE |
| CRITICAL | …emltools/models/neural_network/flexible_shape_utils.py | 451 | s = feature.type.imageType.enumeratedSizes.sizes.add() | CODE |
| CRITICAL | …emltools/models/neural_network/flexible_shape_utils.py | 535 | s = feature.type.multiArrayType.enumeratedShapes.shapes.add() | CODE |
| CRITICAL | …emltools/models/neural_network/flexible_shape_utils.py | 603 | s = feature.type.imageType.enumeratedSizes.sizes.add() | CODE |
| CRITICAL⚡ | …emltools/models/neural_network/flexible_shape_utils.py | 708 | s = feature.type.multiArrayType.shapeRange.sizeRanges.add() | CODE |
| CRITICAL⚡ | …emltools/models/neural_network/flexible_shape_utils.py | 714 | s = feature.type.multiArrayType.shapeRange.sizeRanges.add() | CODE |
| CRITICAL⚡ | …emltools/models/neural_network/flexible_shape_utils.py | 718 | s = feature.type.multiArrayType.shapeRange.sizeRanges.add() | CODE |
| CRITICAL⚡ | …ools/models/ml_program/experimental/debugging_utils.py | 1512 | coremltools.models.ml_program.experimental.debugging_utils.MLModelComparator( | STRING |
| CRITICAL | …ools/models/ml_program/experimental/debugging_utils.py | 480 | inspector = coremltools.models.ml_program.experimental.debugging_utils.MLModelInspector( | STRING |
| CRITICAL | …ools/models/ml_program/experimental/debugging_utils.py | 604 | inspector = coremltools.models.ml_program.experimental.debugging_utils.MLModelInspector( | STRING |
| CRITICAL | …ools/models/ml_program/experimental/debugging_utils.py | 815 | validator = coremltools.models.ml_program.experimental.debugging_utils.MLModelValidator( | STRING |
| CRITICAL | …ools/models/ml_program/experimental/debugging_utils.py | 986 | validator = coremltools.models.ml_program.experimental.debugging_utils.MLModelValidator( | STRING |
| CRITICAL | …ools/models/ml_program/experimental/debugging_utils.py | 1095 | validator = coremltools.models.ml_program.experimental.debugging_utils.MLModelValidator( | STRING |
| CRITICAL | …ools/models/ml_program/experimental/debugging_utils.py | 1151 | validator = coremltools.models.ml_program.experimental.debugging_utils.MLModelValidator( | STRING |
| CRITICAL | …ools/models/ml_program/experimental/debugging_utils.py | 1292 | coremltools.models.ml_program.experimental.debugging_utils.MLModelComparator( | STRING |
| CRITICAL | …s/models/ml_program/experimental/compute_plan_utils.py | 257 | compute_plan = await coremltools.models.ml_program.experimental.compute_plan_utils.load_compute_plan_from_path_o | STRING |
| CRITICAL | …s/models/ml_program/experimental/compute_plan_utils.py | 324 | element_value.immediateValue.tensor.strings.values.append(element) | CODE |
| CRITICAL⚡ | …s/models/ml_program/experimental/compute_plan_utils.py | 432 | attr.immediateValue.tensor.strings.values.append(id_generator(operation_spec)) | CODE |
| CRITICAL | …odels/ml_program/experimental/torch/debugging_utils.py | 1055 | ) = coremltools.models.ml_program.experimental.torch._convert_and_retrieve_jit_module_mapping( | STRING |
| CRITICAL | …odels/ml_program/experimental/torch/debugging_utils.py | 1196 | ) = coremltools.models.ml_program.experimental.torch._convert_and_retrieve_exported_program_op_mapping( | STRING |
| CRITICAL | …odels/ml_program/experimental/torch/debugging_utils.py | 1377 | ) = coremltools.models.ml_program.experimental.torch.convert_and_retrieve_op_mapping( | STRING |
| CRITICAL | …odels/ml_program/experimental/torch/debugging_utils.py | 1823 | coremltools.models.ml_program.experimental.torch.TorchScriptMLModelComparator( | STRING |
| CRITICAL | …odels/ml_program/experimental/torch/debugging_utils.py | 2259 | coremltools.models.ml_program.experimental.torch.TorchExportMLModelComparator( | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .gitlab-ci.yml | 1 | stages: | COMMENT |
| LOW | coremlpython/CoreMLPythonUtils.mm | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| LOW | coremlpython/CoreMLPythonArray.h | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| LOW | coremlpython/CoreMLPython.mm | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| LOW | coremlpython/CoreMLPythonUtils.h | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| LOW | coremlpython/CoreMLPython.h | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| LOW | coremlpython/CoreMLPython.h | 21 | COMMENT | |
| LOW | coremlpython/CoreMLPython.h | 41 | #if !defined(ML_MODEL_STRUCTURE_IS_AVAILABLE) && __has_include(<CoreML/MLModelStructure.h>) | COMMENT |
| LOW | milstoragepython/MilStorage.cpp | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| LOW | milstoragepython/MilStoragePython.cpp | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| LOW | modelpackage/src/ModelPackagePython.cpp | 1 | // | COMMENT |
| LOW | modelpackage/src/ModelPackage.cpp | 1 | // | COMMENT |
| LOW | modelpackage/src/ModelPackage.hpp | 1 | // | COMMENT |
| LOW | modelpackage/src/utils/JsonMap.hpp | 1 | // | COMMENT |
| LOW | modelpackage/src/utils/JsonMap.cpp | 1 | // JsonMap.cpp | COMMENT |
| LOW | mlmodel/tests/NNShaperTest.cpp | 1 | // | COMMENT |
| LOW | mlmodel/tests/KNNValidatorTests.cpp | 1 | // | COMMENT |
| LOW | mlmodel/tests/UpdatableModelValidatorTests.cpp | 1 | // | COMMENT |
| LOW | mlmodel/tests/VisionFeaturePrintValidatorTests.cpp | 1 | // | COMMENT |
| LOW | mlmodel/tests/NNShapeTests.cpp | 1 | // Copyright (c) 2022, Apple Inc. All rights reserved. | COMMENT |
| LOW | …del/tests/SoundAnalysisPreprocessingValidatorTests.cpp | 1 | // | COMMENT |
| LOW | mlmodel/tests/ParameterTests.cpp | 1 | // | COMMENT |
| LOW | …model/tests/BayesianProbitRegressionValidatorTests.cpp | 1 | // | COMMENT |
| LOW | mlmodel/tests/AudioFeaturePrintValidatorTests.cpp | 1 | // | COMMENT |
| LOW | mlmodel/tests/NNValidatorTests.cpp | 1 | // | COMMENT |
| LOW | mlmodel/tests/framework/TestUtils.hpp | 1 | #include <cstring> | COMMENT |
| LOW | mlmodel/tests/MILBlob/StorageWriterTests.cpp | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| LOW | mlmodel/tests/MILBlob/StorageReaderTests.cpp | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| LOW | mlmodel/tests/MILBlob/MMapFileReaderTests.cpp | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| LOW | mlmodel/tests/MILBlob/FileWriterTests.cpp | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| LOW | mlmodel/tests/MILBlob/StorageIntegrationTests.cpp | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| LOW | mlmodel/tests/MILBlob/StorageIntegrationTests.cpp | 41 | offset0 = writer.WriteData(Util::MakeSpan(data0)); | COMMENT |
| LOW | mlmodel/tests/MILBlob/AutoDeleteTempFile.cpp | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| LOW | mlmodel/tests/MILBlob/SpanTests.cpp | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| LOW | mlmodel/docs/conf.py | 1 | # Configuration file for the Sphinx documentation builder. | COMMENT |
| LOW | mlmodel/docs/conf.py | 41 | COMMENT | |
| LOW | mlmodel/src/ResultType.hpp | 1 | // | COMMENT |
| LOW | mlmodel/src/TreeEnsembleCommon.cpp | 1 | // Copyright (c) 2022, Apple Inc. All rights reserved. | COMMENT |
| LOW | mlmodel/src/Export.hpp | 1 | // | COMMENT |
| LOW | mlmodel/src/Comparison.hpp | 1 | // | COMMENT |
| LOW | mlmodel/src/MLModelSpecification.hpp | 1 | // | COMMENT |
| LOW | mlmodel/src/MLModelSpecification.hpp | 21 | #pragma clang diagnostic ignored "-Wdeprecated" | COMMENT |
| LOW | mlmodel/src/ItemSimilarityRecommenderCommon.hpp | 1 | // | COMMENT |
| LOW | mlmodel/src/Globals.hpp | 21 | // - custom models | COMMENT |
| LOW | mlmodel/src/Globals.hpp | 41 | // - Sound Analysis Prepreocessing | COMMENT |
| LOW | mlmodel/src/Utils.hpp | 1 | #ifndef MLMODEL_UTILS | COMMENT |
| LOW | mlmodel/src/Format.hpp | 1 | #ifndef _FORMAT_HPP | COMMENT |
| LOW | mlmodel/src/LayerShapeConstraints.hpp | 1 | // | COMMENT |
| LOW | mlmodel/src/transforms/ItemSimilarityRecommender.hpp | 1 | // | COMMENT |
| LOW | mlmodel/src/transforms/NeuralNetwork.cpp | 1 | // | COMMENT |
| LOW | mlmodel/src/transforms/TreeEnsemble.cpp | 1 | // | COMMENT |
| LOW | mlmodel/src/transforms/DictVectorizer.hpp | 1 | // | COMMENT |
| LOW | mlmodel/src/transforms/Pipeline.hpp | 1 | // | COMMENT |
| LOW | mlmodel/src/transforms/DictVectorizer.cpp | 1 | // | COMMENT |
| LOW | mlmodel/src/transforms/ItemSimilarityRecommender.cpp | 1 | // | COMMENT |
| LOW | mlmodel/src/transforms/NeuralNetwork.hpp | 1 | // | COMMENT |
| LOW | mlmodel/src/MILBlob/Fp16.cpp | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| LOW | mlmodel/src/MILBlob/SubByteTypes.hpp | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| LOW | mlmodel/src/MILBlob/SubByteTypes.hpp | 21 | void SetInt(int i); \ | COMMENT |
| LOW | mlmodel/src/MILBlob/Util/Span.hpp | 1 | // Copyright (c) 2021, Apple Inc. All rights reserved. | COMMENT |
| 355 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mlmodel/docs/readme_session.py | 113 | CODE | |
| LOW | coremltools/optimize/_utils.py | 536 | CODE | |
| LOW | coremltools/optimize/torch/_utils/k_means.py | 540 | CODE | |
| LOW | coremltools/optimize/torch/_utils/k_means.py | 719 | CODE | |
| LOW | coremltools/optimize/torch/_utils/k_means.py | 924 | CODE | |
| LOW | coremltools/optimize/torch/_utils/k_means.py | 941 | CODE | |
| LOW | coremltools/optimize/torch/_utils/report_utils.py | 39 | CODE | |
| LOW | coremltools/optimize/torch/_utils/graph_utils.py | 37 | CODE | |
| LOW | coremltools/optimize/torch/_utils/graph_utils.py | 337 | CODE | |
| LOW | coremltools/optimize/torch/_utils/graph_utils.py | 500 | CODE | |
| LOW | coremltools/optimize/torch/_utils/torch_utils.py | 150 | CODE | |
| LOW | coremltools/optimize/torch/_utils/torch_utils.py | 222 | CODE | |
| LOW | …ze/torch/layerwise_compression/layerwise_compressor.py | 158 | CODE | |
| LOW | …ols/optimize/torch/layerwise_compression/algorithms.py | 396 | CODE | |
| LOW | …imize/torch/quantization/post_training_quantization.py | 512 | CODE | |
| LOW | coremltools/optimize/torch/quantization/quantizer.py | 321 | CODE | |
| LOW | coremltools/optimize/torch/quantization/quantizer.py | 362 | CODE | |
| LOW | coremltools/optimize/torch/quantization/_configure.py | 214 | CODE | |
| LOW | coremltools/optimize/torch/quantization/_configure.py | 286 | CODE | |
| LOW | coremltools/optimize/torch/quantization/_configure.py | 306 | CODE | |
| LOW | coremltools/optimize/torch/quantization/_configure.py | 343 | CODE | |
| LOW | coremltools/optimize/torch/quantization/_configure.py | 377 | CODE | |
| LOW | coremltools/optimize/torch/quantization/_configure.py | 423 | CODE | |
| LOW | coremltools/optimize/torch/quantization/_configure.py | 474 | CODE | |
| LOW | coremltools/optimize/torch/quantization/_configure.py | 496 | CODE | |
| LOW | coremltools/optimize/torch/quantization/_utils.py | 130 | CODE | |
| LOW | …/torch/quantization/modules/learnable_fake_quantize.py | 230 | CODE | |
| LOW | …/torch/quantization/modules/learnable_fake_quantize.py | 325 | CODE | |
| LOW | …mltools/optimize/torch/pruning/_base_pruning_method.py | 155 | CODE | |
| LOW | coremltools/optimize/torch/pruning/_base_pruner.py | 78 | CODE | |
| LOW | coremltools/optimize/torch/pruning/_base_pruner.py | 126 | CODE | |
| LOW | coremltools/optimize/torch/pruning/_utils.py | 38 | CODE | |
| LOW | coremltools/optimize/torch/palettization/palettizer.py | 129 | CODE | |
| LOW | coremltools/optimize/torch/palettization/palettizer.py | 391 | CODE | |
| LOW | …remltools/optimize/torch/palettization/_partitioner.py | 145 | CODE | |
| LOW | …ols/optimize/torch/palettization/_custom_conversion.py | 65 | CODE | |
| LOW | …mltools/optimize/torch/palettization/fake_palettize.py | 268 | CODE | |
| LOW | …mltools/optimize/torch/palettization/fake_palettize.py | 338 | CODE | |
| LOW | …mltools/optimize/torch/palettization/fake_palettize.py | 579 | CODE | |
| LOW | …ze/torch/palettization/_fake_palettizer_tensor_hook.py | 136 | CODE | |
| LOW | …ools/optimize/torch/palettization/_efficient_kmeans.py | 84 | CODE | |
| LOW | …ools/optimize/torch/palettization/_efficient_kmeans.py | 172 | CODE | |
| LOW | coremltools/optimize/coreml/_quantization_passes.py | 199 | CODE | |
| LOW | coremltools/optimize/coreml/_quantization_passes.py | 492 | CODE | |
| LOW | coremltools/optimize/coreml/_quantization_passes.py | 632 | CODE | |
| LOW | coremltools/optimize/coreml/_quantization_passes.py | 695 | CODE | |
| LOW | coremltools/optimize/coreml/_quantization_passes.py | 877 | CODE | |
| LOW | coremltools/optimize/coreml/_quantization_passes.py | 1220 | CODE | |
| LOW | coremltools/optimize/coreml/_quantization_passes.py | 1375 | CODE | |
| LOW | coremltools/optimize/coreml/_config.py | 73 | CODE | |
| LOW | coremltools/optimize/coreml/_config.py | 91 | CODE | |
| LOW | …mltools/test/optimize/torch/test_utils/test_k_means.py | 69 | CODE | |
| LOW | …ols/test/optimize/torch/quantization/test_configure.py | 1155 | CODE | |
| LOW | …ols/test/optimize/torch/quantization/test_quantizer.py | 576 | CODE | |
| LOW | …ols/test/optimize/torch/quantization/test_quantizer.py | 644 | CODE | |
| LOW | …optimize/torch/palettization/test_palettization_api.py | 472 | CODE | |
| LOW | …est/optimize/coreml/test_post_training_quantization.py | 1313 | CODE | |
| LOW | coremltools/test/neural_network/test_numpy_nn_layers.py | 1464 | CODE | |
| LOW | coremltools/test/neural_network/test_numpy_nn_layers.py | 1556 | CODE | |
| LOW | coremltools/test/neural_network/test_numpy_nn_layers.py | 1708 | CODE | |
| 342 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | coremltools/test/pipeline/test_pipeline.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | …ls/test/xgboost_tests/test_boosted_trees_regression.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | …ls/test/xgboost_tests/test_boosted_trees_classifier.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | …ls/test/xgboost_tests/test_decision_tree_regression.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | …ls/test/xgboost_tests/test_decision_tree_classifier.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_normalizer.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_ridge_regression.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_dict_vectorizer.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | …ls/test/sklearn_tests/test_random_forest_classifier.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | …ls/test/sklearn_tests/test_random_forest_regression.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | …mltools/test/sklearn_tests/test_categorical_imputer.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_imputer.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | …remltools/test/sklearn_tests/test_linear_regression.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | …ools/test/sklearn_tests/test_k_neighbors_classifier.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_NuSVC.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_one_hot_encoder.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_standard_scalar.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_NuSVR.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_SVC.py | 0 | unit test class for testing scikit-learn converter. | STRING |
| HIGH | coremltools/test/pipeline/test_pipeline.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | …ls/test/xgboost_tests/test_boosted_trees_regression.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | …ls/test/xgboost_tests/test_boosted_trees_classifier.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | …xgboost_tests/test_boosted_trees_regression_numeric.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | …ls/test/xgboost_tests/test_decision_tree_regression.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | …ls/test/xgboost_tests/test_decision_tree_classifier.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | …xgboost_tests/test_boosted_trees_classifier_numeric.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | …xgboost_tests/test_decision_tree_regression_numeric.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_ridge_regression.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | …ls/test/sklearn_tests/test_random_forest_classifier.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | …ls/test/sklearn_tests/test_random_forest_regression.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | …mltools/test/sklearn_tests/test_categorical_imputer.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | …remltools/test/sklearn_tests/test_linear_regression.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | …sklearn_tests/test_random_forest_classifier_numeric.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | …ools/test/sklearn_tests/test_k_neighbors_classifier.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_SVR.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_NuSVC.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_one_hot_encoder.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | …sklearn_tests/test_random_forest_regression_numeric.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_NuSVR.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_SVC.py | 0 | set up the unit test by loading the dataset and training a model. | STRING |
| HIGH | …ols/test/optimize/torch/quantization/test_quantizer.py | 0 | test that calling finalize on the module leads to compression metadata being added to the model | STRING |
| HIGH | …s/test/optimize/torch/pruning/test_magnitude_pruner.py | 0 | test that calling finalize on the module leads to compression metadata being added to the model | STRING |
| HIGH | …ltools/test/optimize/torch/pruning/test_base_pruner.py | 0 | test that calling finalize on the module leads to compression metadata being added to the model | STRING |
| HIGH | …xgboost_tests/test_boosted_trees_classifier_numeric.py | 0 | unit test class for testing scikit-learn converter and running both models | STRING |
| HIGH | …xgboost_tests/test_decision_tree_regression_numeric.py | 0 | unit test class for testing scikit-learn converter and running both models | STRING |
| HIGH | …sklearn_tests/test_random_forest_regression_numeric.py | 0 | unit test class for testing scikit-learn converter and running both models | STRING |
| HIGH | …xgboost_tests/test_boosted_trees_classifier_numeric.py | 0 | train a scikit-learn model, convert it and then evaluate it with coreml | STRING |
| HIGH | …xgboost_tests/test_decision_tree_regression_numeric.py | 0 | train a scikit-learn model, convert it and then evaluate it with coreml | STRING |
| HIGH | …sklearn_tests/test_random_forest_regression_numeric.py | 0 | train a scikit-learn model, convert it and then evaluate it with coreml | STRING |
| HIGH | coremltools/test/sklearn_tests/test_SVR.py | 0 | unit test class for testing the libsvm sklearn converter. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_NuSVC.py | 0 | unit test class for testing the libsvm sklearn converter. | STRING |
| HIGH | coremltools/test/sklearn_tests/test_NuSVR.py | 0 | unit test class for testing the libsvm sklearn converter. | STRING |
| HIGH | …mltools/converters/sklearn/_random_forest_regressor.py | 0 | convert a decision tree model to protobuf format. parameters ---------- decision_tree : decisiontreeregressor a trained | STRING |
| HIGH | …ltools/converters/sklearn/_random_forest_classifier.py | 0 | convert a decision tree model to protobuf format. parameters ---------- decision_tree : decisiontreeregressor a trained | STRING |
| HIGH | …ls/converters/sklearn/_gradient_boosting_classifier.py | 0 | convert a decision tree model to protobuf format. parameters ---------- decision_tree : decisiontreeregressor a trained | STRING |
| HIGH | …mltools/converters/sklearn/_decision_tree_regressor.py | 0 | convert a decision tree model to protobuf format. parameters ---------- decision_tree : decisiontreeregressor a trained | STRING |
| HIGH | coremltools/converters/sklearn/_imputer.py | 0 | given a model that takes an array of dimension input_dimension, returns the output dimension. | STRING |
| HIGH | coremltools/converters/sklearn/_normalizer.py | 0 | given a model that takes an array of dimension input_dimension, returns the output dimension. | STRING |
| HIGH | coremltools/converters/sklearn/_one_hot_encoder.py | 0 | given a model that takes an array of dimension input_dimension, returns the output dimension. | STRING |
| HIGH | coremltools/converters/sklearn/_LinearSVC.py | 0 | convert a linear regression model to the protobuf spec. parameters ---------- model: linearregression a trained linear r | STRING |
| 3 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | …/converters/mil/mil/passes/defs/optimize_repeat_ops.py | 1584 | # --------------------- | COMMENT |
| MEDIUM⚡ | …/converters/mil/mil/passes/defs/optimize_repeat_ops.py | 1586 | # -------------------- | COMMENT |
| MEDIUM⚡ | …/converters/mil/mil/passes/defs/optimize_repeat_ops.py | 1591 | # --------------------- | COMMENT |
| MEDIUM⚡ | …/converters/mil/mil/passes/defs/optimize_repeat_ops.py | 1593 | # -------------------- | COMMENT |
| MEDIUM⚡ | …/converters/mil/mil/passes/defs/optimize_repeat_ops.py | 1632 | # ---------------------- | COMMENT |
| MEDIUM⚡ | …/converters/mil/mil/passes/defs/optimize_repeat_ops.py | 1634 | # ---------------------- | COMMENT |
| MEDIUM⚡ | …/converters/mil/mil/passes/defs/optimize_repeat_ops.py | 1639 | # -------------------------- | COMMENT |
| MEDIUM⚡ | …/converters/mil/mil/passes/defs/optimize_repeat_ops.py | 1641 | # -------------------------- | COMMENT |
| MEDIUM | …/converters/mil/mil/passes/defs/optimize_repeat_ops.py | 1606 | # --------------------- | COMMENT |
| MEDIUM | …/converters/mil/mil/passes/defs/optimize_repeat_ops.py | 1608 | # -------------------- | COMMENT |
| MEDIUM | coremltools/_deps/__init__.py | 42 | # --------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | coremltools/_deps/__init__.py | 53 | # --------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | coremltools/_deps/__init__.py | 87 | # --------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | coremltools/_deps/__init__.py | 95 | # --------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | coremltools/_deps/__init__.py | 104 | # --------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | coremltools/_deps/__init__.py | 112 | # --------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | coremltools/_deps/__init__.py | 164 | # --------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | coremltools/_deps/__init__.py | 224 | # --------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | coremltools/_deps/__init__.py | 232 | # --------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …les/optimize/torch/quantization/linear_quantization.py | 20 | # ------------------------------ | COMMENT |
| MEDIUM | …les/optimize/torch/quantization/linear_quantization.py | 83 | # --------------------------------------- | COMMENT |
| MEDIUM | …les/optimize/torch/quantization/linear_quantization.py | 145 | # --------------------------------------- | COMMENT |
| MEDIUM | …les/optimize/torch/quantization/linear_quantization.py | 176 | # --------------------- | COMMENT |
| MEDIUM | …les/optimize/torch/quantization/linear_quantization.py | 210 | # ------------------------------- | COMMENT |
| MEDIUM | …les/optimize/torch/quantization/linear_quantization.py | 224 | # ------------------------------------------- | COMMENT |
| MEDIUM | …s/examples/optimize/torch/pruning/magnitude_pruning.py | 20 | # ------------------------------ | COMMENT |
| MEDIUM | …s/examples/optimize/torch/pruning/magnitude_pruning.py | 79 | # ---------------------------------- | COMMENT |
| MEDIUM | …s/examples/optimize/torch/pruning/magnitude_pruning.py | 135 | # ---------------------------------- | COMMENT |
| MEDIUM | …s/examples/optimize/torch/pruning/magnitude_pruning.py | 187 | # ---------------------------- | COMMENT |
| MEDIUM | …s/examples/optimize/torch/pruning/magnitude_pruning.py | 220 | # ------------------------------- | COMMENT |
| MEDIUM | …s/examples/optimize/torch/pruning/magnitude_pruning.py | 235 | # ------------------------------------------- | COMMENT |
| MEDIUM | …ples/optimize/torch/palettization/dkm_palettization.py | 21 | # -------------------------------- | COMMENT |
| MEDIUM | …ples/optimize/torch/palettization/dkm_palettization.py | 83 | # ---------------------------------------- | COMMENT |
| MEDIUM | …ples/optimize/torch/palettization/dkm_palettization.py | 141 | # ------------------------- | COMMENT |
| MEDIUM | …ples/optimize/torch/palettization/dkm_palettization.py | 164 | # -------------------------------- | COMMENT |
| MEDIUM | …ples/optimize/torch/palettization/dkm_palettization.py | 190 | # ------------------------------------ | COMMENT |
| MEDIUM | …ples/optimize/torch/palettization/dkm_palettization.py | 199 | # ------------------------------------------- | COMMENT |
| MEDIUM | scripts/build.sh | 5 | ##============================================================================= | COMMENT |
| MEDIUM | scripts/build_docs.sh | 5 | ##============================================================================= | COMMENT |
| MEDIUM | scripts/test.sh | 6 | ##============================================================================= | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | coremltools/__init__.py | 139 | except: | CODE |
| HIGH | coremltools/optimize/torch/_utils/metadata_utils.py | 103 | except AttributeError: | CODE |
| HIGH | …s/optimize/torch/layerwise_compression/input_cacher.py | 108 | except StopExecution: | CODE |
| HIGH | coremltools/test/optimize/torch/utils.py | 50 | except ModuleNotFoundError: | CODE |
| HIGH | coremltools/converters/_converters_entry.py | 1059 | except: | CODE |
| HIGH | coremltools/converters/_converters_entry.py | 1067 | except: | CODE |
| HIGH | coremltools/converters/xgboost/_tree_ensemble.py | 36 | except KeyError: | CODE |
| HIGH | coremltools/converters/xgboost/_tree_ensemble.py | 64 | except KeyError: | CODE |
| HIGH | coremltools/converters/mil/input_types.py | 647 | except ValueError: | CODE |
| HIGH | coremltools/converters/mil/input_types.py | 652 | except ValueError: | CODE |
| HIGH | …ltools/converters/mil/frontend/torch/torchir_passes.py | 327 | except ValueError: | CODE |
| HIGH | …ltools/converters/mil/frontend/torch/internal_graph.py | 59 | except ValueError: | CODE |
| HIGH | coremltools/converters/mil/frontend/torch/ops.py | 2521 | except: | CODE |
| HIGH | coremltools/converters/mil/frontend/torch/ops.py | 8364 | except: | CODE |
| HIGH | coremltools/converters/mil/frontend/torch/ops.py | 8411 | except: | CODE |
| HIGH | coremltools/converters/mil/frontend/torch/ops.py | 8490 | except: | CODE |
| HIGH | coremltools/converters/mil/frontend/torch/ops.py | 8538 | except: | CODE |
| HIGH | coremltools/converters/mil/mil/types/type_tensor.py | 56 | except TypeError: | CODE |
| HIGH | coremltools/models/_interface_management.py | 99 | except AttributeError: | CODE |
| HIGH | coremltools/models/model.py | 618 | except Exception: | CODE |
| HIGH | coremltools/models/model.py | 557 | except OSError: | CODE |
| HIGH | coremltools/models/utils.py | 1407 | except: | CODE |
| HIGH | deps/pybind11/pybind11/setup_helpers.py | 143 | except ModuleNotFoundError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | mlmodel/docs/readme_session.py | 177 | # Create a version with default settings. | COMMENT |
| MEDIUM | mlmodel/docs/readme_session.py | 316 | # Create the new page | COMMENT |
| MEDIUM⚡ | coremltools/test/pipeline/test_pipeline.py | 377 | # Create the first two models that take the same input | COMMENT |
| MEDIUM⚡ | coremltools/test/pipeline/test_pipeline.py | 381 | # Create the last models which add the output from the other two models. | COMMENT |
| MEDIUM⚡ | coremltools/test/optimize/torch/utils.py | 177 | # Create a StringIO object to capture the log output | COMMENT |
| MEDIUM⚡ | coremltools/test/optimize/torch/utils.py | 186 | # Create a custom logging handler that writes to the StringIO object | COMMENT |
| MEDIUM | coremltools/test/ml_program/test_utils.py | 1773 | # The following code will produce two chunks models: | COMMENT |
| MEDIUM | coremltools/test/ml_program/test_utils.py | 1780 | # The following code will produce a single pipeline model `./output/my_model_chunked_pipeline.mlpackage` | COMMENT |
| MEDIUM | …ols/test/ml_program/experimental/test_remote_device.py | 87 | # Create a Timer object | COMMENT |
| MEDIUM | …emltools/converters/mil/frontend/milproto/test_load.py | 77 | # Define a PyMIL program | COMMENT |
| MEDIUM | …emltools/converters/mil/frontend/milproto/test_load.py | 136 | # Define a PyMIL program | COMMENT |
| MEDIUM | coremltools/converters/mil/frontend/torch/ops.py | 4990 | # Create an interation count. This will only be used if this is a for loop. | COMMENT |
| MEDIUM | …ols/converters/mil/frontend/torch/torch_op_registry.py | 63 | # The following functions will be deprecated after 7.2 | COMMENT |
| MEDIUM⚡ | …remltools/converters/mil/frontend/torch/dialect_ops.py | 20 | # This file contains the Torch dialect of SSA. Briefly, these ops are only | COMMENT |
| MEDIUM | …s/converters/mil/frontend/torch/test/test_torch_ops.py | 10078 | # Create a tensor of given shape with ~90% zero entries | COMMENT |
| MEDIUM | …ools/converters/mil/frontend/tensorflow/dialect_ops.py | 15 | # This file contains the TF dialect of SSA. Briefly, these ops are only | COMMENT |
| MEDIUM | …mil/frontend/tensorflow/test/test_tf_conversion_api.py | 79 | # Create a test sample | COMMENT |
| MEDIUM | coremltools/converters/sklearn/_converter.py | 142 | # This function is just a thin wrapper around the internal converter so | COMMENT |
| MEDIUM | coremltools/converters/sklearn/_one_hot_encoder.py | 82 | # Create a pipeline that can do all of the subsequent feature extraction. | COMMENT |
| MEDIUM | coremltools/converters/sklearn/_one_hot_encoder.py | 119 | # Create a one hot encoder per column | COMMENT |
| MEDIUM | coremltools/converters/libsvm/_libsvm_converter.py | 65 | # Create the spec | COMMENT |
| MEDIUM | coremltools/models/datatypes.py | 74 | # Create a single dimensions array of length five | STRING |
| MEDIUM | coremltools/models/datatypes.py | 77 | # Create a multi dimension array five by two by ten. | STRING |
| MEDIUM | coremltools/models/datatypes.py | 115 | # Create a dictionary with string keys | STRING |
| MEDIUM | coremltools/models/datatypes.py | 118 | # Create a dictionary with int keys | STRING |
| MEDIUM | coremltools/models/utils.py | 1432 | # The below code inserts the "main" function from "my_model.mlpackage" as "main_1", | STRING |
| MEDIUM | coremltools/models/utils.py | 1914 | # The following code will produce two smaller models: | STRING |
| MEDIUM | coremltools/models/utils.py | 1922 | # The following code will produce a single pipeline model `./output/my_model_chunked_pipeline.mlpackage` | STRING |
| MEDIUM | coremltools/models/_feature_management.py | 340 | # Define the output feature types | COMMENT |
| MEDIUM | coremltools/models/array_feature_extractor.py | 34 | # Create the model. | COMMENT |
| MEDIUM | coremltools/models/nearest_neighbors/builder.py | 28 | # Create a KNearestNeighborsClassifier model that takes 4-dimensional input data and outputs a string label. | STRING |
| MEDIUM | coremltools/models/neural_network/builder.py | 240 | # Create a neural network binary classifier that classifies | STRING |
| MEDIUM⚡ | …ools/models/ml_program/experimental/debugging_utils.py | 1510 | # Create an instance of MLModelComparator | STRING |
| MEDIUM⚡ | …ools/models/ml_program/experimental/debugging_utils.py | 1519 | # Define a custom comparison function | STRING |
| MEDIUM | …ools/models/ml_program/experimental/debugging_utils.py | 1290 | # Create an instance of MLModelComparator | STRING |
| MEDIUM | …remltools/models/ml_program/experimental/perf_utils.py | 92 | # Create a new image with the specified size | COMMENT |
| MEDIUM | …odels/ml_program/experimental/torch/debugging_utils.py | 115 | # Create a queue and enqueue all vertices with in-degree 0 | COMMENT |
| MEDIUM | …odels/ml_program/experimental/torch/debugging_utils.py | 643 | # Create a copy of nodes for iteration as the graph is mutated when inlining. | COMMENT |
| MEDIUM | …les/optimize/torch/quantization/linear_quantization.py | 148 | # Create an instance of the :py:class:`~.quantization.LinearQuantizerConfig` class | COMMENT |
| MEDIUM | …ples/optimize/torch/palettization/dkm_palettization.py | 20 | # Defining the Network and Dataset | COMMENT |
| MEDIUM | scripts/build.sh | 86 | # Create a directory for building the artifacts | COMMENT |
| MEDIUM | deps/pybind11/tests/test_eval_call.py | 1 | # This file is called from 'test_eval.py' | COMMENT |
| MEDIUM | deps/pybind11/docs/conf.py | 6 | # This file is execfile()d with the current directory set to its | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | coremltools/optimize/torch/_utils/metadata_utils.py | 137 | CODE | |
| LOW | …mltools/optimize/torch/layerwise_compression/_quant.py | 69 | CODE | |
| LOW | …imize/torch/quantization/post_training_quantization.py | 378 | CODE | |
| LOW | …ize/torch/quantization/modules/conv_transpose_fused.py | 250 | CODE | |
| LOW | …ize/torch/quantization/modules/conv_transpose_fused.py | 352 | CODE | |
| LOW | …ize/torch/quantization/modules/conv_transpose_fused.py | 454 | CODE | |
| LOW | …/optimize/torch/quantization/modules/conv_transpose.py | 155 | CODE | |
| LOW | …/optimize/torch/quantization/modules/conv_transpose.py | 245 | CODE | |
| LOW | …/optimize/torch/quantization/modules/conv_transpose.py | 335 | CODE | |
| LOW | …tools/optimize/torch/quantization/modules/observers.py | 67 | CODE | |
| LOW | …tools/optimize/torch/quantization/modules/observers.py | 208 | CODE | |
| LOW | coremltools/test/modelpackage/test_modelpackage.py | 584 | CODE | |
| LOW | coremltools/test/modelpackage/test_modelpackage.py | 590 | CODE | |
| LOW | coremltools/test/neural_network/test_model.py | 538 | CODE | |
| LOW | coremltools/test/api/test_api_examples.py | 787 | CODE | |
| LOW | coremltools/converters/_converters_entry.py | 69 | CODE | |
| LOW | coremltools/converters/mil/testing_utils.py | 529 | CODE | |
| LOW | coremltools/converters/mil/testing_utils.py | 657 | CODE | |
| LOW | coremltools/converters/mil/frontend/_utils.py | 799 | CODE | |
| LOW | …emltools/converters/mil/frontend/milproto/test_load.py | 164 | CODE | |
| LOW | …ltools/converters/mil/frontend/torch/internal_graph.py | 163 | CODE | |
| LOW | coremltools/converters/mil/frontend/torch/ops.py | 7670 | CODE | |
| LOW | …s/converters/mil/frontend/torch/test/test_torch_ops.py | 614 | CODE | |
| LOW | …s/converters/mil/frontend/torch/test/test_torch_ops.py | 1642 | CODE | |
| LOW | …ls/converters/mil/frontend/torch/test/testing_utils.py | 243 | CODE | |
| LOW | …ls/converters/mil/frontend/torch/test/testing_utils.py | 329 | CODE | |
| LOW | coremltools/converters/mil/frontend/tensorflow/parse.py | 48 | CODE | |
| LOW | …nverters/mil/frontend/tensorflow/test/testing_utils.py | 203 | CODE | |
| LOW | …nverters/mil/frontend/tensorflow/test/testing_utils.py | 353 | CODE | |
| LOW | …ls/converters/mil/frontend/tensorflow/test/test_ops.py | 3489 | CODE | |
| LOW | …onverters/mil/frontend/tensorflow2/test/test_v2_ops.py | 767 | CODE | |
| LOW | …verters/mil/frontend/tensorflow2/test/testing_utils.py | 70 | CODE | |
| LOW | …verters/mil/frontend/tensorflow2/test/testing_utils.py | 249 | CODE | |
| LOW | coremltools/converters/mil/mil/input_type.py | 253 | CODE | |
| LOW | …rters/mil/mil/passes/tests/test_quantization_passes.py | 843 | CODE | |
| LOW | …rters/mil/mil/passes/tests/test_quantization_passes.py | 2790 | CODE | |
| LOW | …rters/mil/mil/passes/defs/lower_complex_dialect_ops.py | 403 | CODE | |
| LOW | …rters/mil/mil/passes/defs/lower_complex_dialect_ops.py | 412 | CODE | |
| LOW | …/converters/mil/mil/passes/defs/optimize_activation.py | 657 | CODE | |
| LOW | coremltools/converters/mil/mil/tests/test_programs.py | 536 | CODE | |
| LOW | coremltools/converters/mil/mil/tests/test_programs.py | 431 | CODE | |
| LOW | …emltools/converters/mil/mil/ops/tests/testing_utils.py | 56 | CODE | |
| LOW | …verters/mil/mil/ops/tests/iOS16/test_scatter_gather.py | 140 | CODE | |
| LOW | …verters/mil/mil/ops/tests/iOS16/test_scatter_gather.py | 241 | CODE | |
| LOW | …/mil/mil/ops/tests/iOS18/test_tensor_transformation.py | 19 | CODE | |
| LOW | …verters/mil/mil/ops/tests/iOS17/test_scatter_gather.py | 328 | CODE | |
| LOW | …verters/mil/mil/ops/tests/iOS17/test_scatter_gather.py | 362 | CODE | |
| LOW | …verters/mil/mil/ops/tests/iOS17/test_scatter_gather.py | 403 | CODE | |
| LOW | …verters/mil/mil/ops/tests/iOS17/test_scatter_gather.py | 456 | CODE | |
| LOW | …rters/mil/mil/ops/tests/iOS14/test_tensor_operation.py | 137 | CODE | |
| LOW | …verters/mil/mil/ops/tests/iOS14/test_scatter_gather.py | 178 | CODE | |
| LOW | …verters/mil/mil/ops/tests/iOS14/test_scatter_gather.py | 458 | CODE | |
| LOW | …verters/mil/mil/ops/tests/iOS14/test_scatter_gather.py | 479 | CODE | |
| LOW | …verters/mil/mil/ops/tests/iOS14/test_scatter_gather.py | 586 | CODE | |
| LOW | …verters/mil/mil/ops/tests/iOS14/test_scatter_gather.py | 673 | CODE | |
| LOW | …tools/converters/mil/mil/ops/defs/iOS18/compression.py | 164 | CODE | |
| LOW | coremltools/converters/mil/mil/ops/defs/iOS15/linear.py | 359 | CODE | |
| LOW | coremltools/models/neural_network/builder.py | 271 | CODE | |
| LOW | coremltools/models/neural_network/builder.py | 2263 | CODE | |
| LOW | coremltools/models/neural_network/builder.py | 2547 | CODE | |
| 11 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | coremlpython/CoreMLPythonUtils.mm | 407 | py::print("Error: value type not convertible:"); | CODE |
| MEDIUM | mlmodel/docs/readme_session.py | 40 | print("Error (code " + str(response.status_code) + "): " + response.text) | CODE |
| LOW | coremltools/optimize/torch/_utils/torch_utils.py | 63 | except Exception: | CODE |
| LOW | …ols/test/optimize/torch/conversion/conversion_utils.py | 76 | except Exception as err: | CODE |
| LOW | coremltools/test/neural_network/test_model.py | 220 | except Exception as e: | CODE |
| LOW⚡ | coremltools/test/neural_network/test_nn_builder.py | 617 | except Exception as e: | CODE |
| LOW | …ols/test/ml_program/experimental/test_remote_device.py | 48 | except Exception: | CODE |
| MEDIUM | …ols/test/ml_program/experimental/test_remote_device.py | 39 | def has_xcodebuild(): | CODE |
| LOW | coremltools/converters/mil/frontend/milproto/load.py | 35 | except Exception as e: | CODE |
| LOW | coremltools/converters/mil/frontend/torch/ops.py | 114 | except Exception as e: | CODE |
| LOW | coremltools/converters/mil/frontend/torch/load.py | 105 | except Exception as e: | CODE |
| LOW | coremltools/converters/mil/frontend/torch/load.py | 130 | except Exception as e: | CODE |
| LOW | coremltools/converters/mil/frontend/tensorflow/load.py | 212 | except Exception as e: | CODE |
| LOW | coremltools/converters/mil/frontend/tensorflow/load.py | 315 | except Exception: | CODE |
| LOW | …ntend/tensorflow/tf_graph_pass/constant_propagation.py | 152 | except Exception as e: | CODE |
| MEDIUM | …ntend/tensorflow/tf_graph_pass/constant_propagation.py | 66 | def _constant_propagation(fn, new_graph, constant_nodes, constant_node_num_outpu | CODE |
| LOW | coremltools/converters/mil/frontend/tensorflow2/load.py | 181 | except Exception as e: | CODE |
| LOW | coremltools/converters/mil/backend/mil/load.py | 54 | except Exception as e: | CODE |
| LOW | …mil/backend/mil/passes/adjust_io_to_supported_types.py | 167 | except Exception as e: | CODE |
| LOW | coremltools/converters/mil/mil/types/type_int.py | 52 | except Exception: | CODE |
| LOW | coremltools/converters/mil/mil/passes/pass_pipeline.py | 499 | except Exception as e: | CODE |
| LOW | …rters/mil/mil/passes/defs/cleanup/const_elimination.py | 46 | except Exception as e: | CODE |
| LOW | coremltools/converters/lightgbm/_tree.py | 87 | except Exception: | CODE |
| LOW | coremltools/models/compute_plan.py | 21 | except Exception as e: | CODE |
| LOW | coremltools/models/compute_plan.py | 27 | except Exception as e: | CODE |
| LOW | coremltools/models/model.py | 56 | except Exception as e: | CODE |
| LOW | coremltools/models/model.py | 63 | except Exception as e: | CODE |
| LOW | coremltools/models/model.py | 618 | except Exception: | CODE |
| LOW | coremltools/models/utils.py | 220 | except Exception as e: | CODE |
| LOW | coremltools/models/utils.py | 1486 | except Exception as err: | CODE |
| LOW⚡ | coremltools/models/compute_device.py | 13 | except Exception as e: | CODE |
| LOW⚡ | coremltools/models/compute_device.py | 19 | except Exception as e: | CODE |
| LOW⚡ | coremltools/models/compute_device.py | 25 | except Exception as e: | CODE |
| LOW⚡ | coremltools/models/compute_device.py | 31 | except Exception as e: | CODE |
| LOW | coremltools/models/neural_network/quantization_utils.py | 555 | except Exception as e: | CODE |
| LOW | coremltools/models/neural_network/quantization_utils.py | 1369 | except Exception as e: | CODE |
| LOW | coremltools/models/neural_network/quantization_utils.py | 1404 | except Exception as e: | CODE |
| LOW | …ools/models/ml_program/experimental/debugging_utils.py | 405 | except Exception as e: | CODE |
| LOW⚡ | …s/models/ml_program/experimental/compute_plan_utils.py | 32 | except Exception as e: | CODE |
| LOW⚡ | …s/models/ml_program/experimental/compute_plan_utils.py | 39 | except Exception as e: | CODE |
| LOW⚡ | …s/models/ml_program/experimental/compute_plan_utils.py | 46 | except Exception as e: | CODE |
| LOW⚡ | …s/models/ml_program/experimental/compute_plan_utils.py | 53 | except Exception as e: | CODE |
| LOW | …ltools/models/ml_program/experimental/async_wrapper.py | 413 | except Exception as e: | CODE |
| MEDIUM | …ltools/models/ml_program/experimental/async_wrapper.py | 410 | def retrieve_compute_plan(self) -> MLComputePlan: | CODE |
| LOW | …odels/ml_program/experimental/torch/debugging_utils.py | 1658 | except Exception as e: | CODE |
| LOW | …odels/ml_program/experimental/torch/debugging_utils.py | 2140 | except Exception as e: | CODE |
| LOW | deps/pybind11/tests/conftest.py | 23 | except Exception: | CODE |
| LOW | deps/pybind11/tests/test_thread.py | 18 | except Exception as e: | CODE |
| MEDIUM | deps/pybind11/tests/test_thread.py | 14 | def run(self): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | coremltools/optimize/_utils.py | 490 | # Set channel axis if we can infer it from block sizes; else just use the default one | COMMENT |
| LOW | coremltools/optimize/_utils.py | 736 | # If non_single_dim is empty, it means it's per-tensor quantization, just use a dummy axis. | COMMENT |
| LOW | coremltools/optimize/coreml/_quantization_passes.py | 1470 | # the sparse version of the quant op; instead we just use the dense version of | COMMENT |
| LOW | …ools/test/sklearn_tests/test_k_neighbors_classifier.py | 231 | ] # the labels themselves don't matter - just use 100 of the Iris ones | CODE |
| LOW | coremltools/converters/mil/frontend/_utils.py | 826 | # Empty non_single_dim means per-tensor quantization, just use a dummy axis. | COMMENT |
| LOW | coremltools/converters/mil/frontend/torch/converter.py | 169 | # we just use floating-point tensors after dequantization. This means that information about | COMMENT |
| MEDIUM | …ltools/converters/mil/frontend/torch/internal_graph.py | 266 | # to leverage the existing TorchScript converter infra | COMMENT |
| LOW | coremltools/converters/mil/frontend/torch/ops.py | 6593 | # Handling x[:], just pass through the tensor. | COMMENT |
| MEDIUM⚡ | …remltools/converters/mil/frontend/torch/dialect_ops.py | 22 | # No backend would support any of the op here. These ops exist to facilitate | COMMENT |
| LOW | …nd/torch/ssa_passes/torch_upsample_to_core_upsample.py | 108 | # so we can just return scale factor 1 for that case | COMMENT |
| MEDIUM | …ools/converters/mil/frontend/tensorflow/dialect_ops.py | 17 | # No backend would support any of the op here. These ops exist to facilitate | COMMENT |
| MEDIUM | …rflow2/tf_graph_pass/rewrite_control_flow_functions.py | 238 | # utilize FunctionDef's ret to make sure function outputs and | STRING |
| MEDIUM | …rflow2/tf_graph_pass/rewrite_control_flow_functions.py | 487 | # utilize FunctionDef's ret to make sure function outputs and | STRING |
| LOW | coremltools/converters/sklearn/_converter_internal.py | 197 | # In the corner case that it's only the dict vectorizer here, just return | COMMENT |
| MEDIUM | coremltools/converters/sklearn/_converter_internal.py | 223 | # into the form expected by scipy's pipelines. Essentially this is a | COMMENT |
| LOW | coremltools/models/neural_network/builder.py | 2490 | # If weight comes from another tensor just return | STRING |
| MEDIUM | deps/pybind11/tests/test_numpy_array.py | 604 | # HINT: An easy and robust way (although only manual unfortunately) to check for | COMMENT |
| LOW | deps/pybind11/tests/test_modules.py | 110 | # changes in future Python versions, simply add the new expected exception types here. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | coremltools/optimize/torch/_utils/k_means.py | 952 | # Check if workers are still running, in which case they may still be chewing on data and we | COMMENT |
| LOW⚡ | coremltools/optimize/torch/_utils/validation_utils.py | 105 | # Check if the output-channel block size is divisible by the axis length | COMMENT |
| LOW⚡ | coremltools/optimize/torch/_utils/validation_utils.py | 112 | # Check if the input-channel block size is divisible by the axis length | COMMENT |
| LOW⚡ | …version/palettization/test_palettization_conversion.py | 474 | # Verify if number of bits is correct. | COMMENT |
| LOW | coremltools/test/converters/torch/test_ops.py | 17 | # Check if pytorch module is installed | COMMENT |
| LOW | coremltools/test/neural_network/test_numpy_nn_layers.py | 6904 | # Check if dilated kernel size exceeds padded input size in | COMMENT |
| LOW | coremltools/converters/mil/frontend/torch/ops.py | 2666 | # Check if pad is a list (which happens when `_array_construct` returns | COMMENT |
| LOW | …rontend/tensorflow/tf_graph_pass/fuse_dilation_conv.py | 40 | # Check if Conv1D/Conv2D is surrounded by SpaceToBatchND and BatchToSpaceND | COMMENT |
| LOW⚡ | …frontend/tensorflow/ssa_passes/tf_lstm_to_core_lstm.py | 221 | # Check if the tf lstm op can be replaced with coreml lstm op | COMMENT |
| LOW | coremltools/converters/mil/test/test_rms_norm.py | 14 | # Check if pytorch module is installed | COMMENT |
| LOW | …il/mil/passes/defs/optimize_activation_quantization.py | 195 | # Check if 2nd operation is part of a valid pattern. | COMMENT |
| LOW⚡ | coremltools/models/model.py | 1008 | # Set ValueType to dictionary of string to string | COMMENT |
| LOW | coremltools/models/model.py | 1048 | # Check if the input name given by the user is valid. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | coremltools/converters/mil/frontend/torch/ops.py | 196 | context.push((block.inputs, inputs)) | CODE |
| HIGH⚡ | …s/mil/frontend/torch/test/test_torch_conversion_api.py | 295 | # All PyTorch ops in the example model are supported, so they should all return true | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | coremltools/optimize/torch/_utils/graph_utils.py | 58 | if node.op == "placeholder": | CODE |
| LOW | coremltools/optimize/torch/_utils/graph_utils.py | 360 | if node.op == "placeholder": | CODE |
| LOW⚡ | …s/test/sklearn_tests/test_nearest_neighbors_builder.py | 96 | builder.author = "John Doe" | CODE |
| LOW⚡ | …s/test/sklearn_tests/test_nearest_neighbors_builder.py | 97 | self.assertEqual(builder.author, "John Doe") | CODE |
| LOW⚡ | …s/test/sklearn_tests/test_nearest_neighbors_builder.py | 98 | self.assertEqual(builder.spec.description.metadata.author, "John Doe") | CODE |
| LOW | coremltools/converters/mil/frontend/torch/converter.py | 1320 | source=ScopeSource.TORCHSCRIPT_MODULE_TYPE, data="placeholder" | CODE |
| LOW | …ltools/converters/mil/frontend/torch/internal_graph.py | 656 | elif node.op == "placeholder": | CODE |
| LOW | coremltools/converters/mil/frontend/torch/exir_utils.py | 117 | if node.op == "placeholder": | CODE |
| LOW | coremltools/converters/mil/frontend/tensorflow/parse.py | 136 | elif attr.HasField("placeholder"): | CODE |
| LOW | …nverters/mil/frontend/tensorflow/test/testing_utils.py | 93 | instance 'placeholder:0' could become 'placeholder'. | STRING |
| LOW | …odels/ml_program/experimental/torch/debugging_utils.py | 2098 | op_type_to_skip = ["placeholder", "get_attr", "call_module"] | CODE |
| LOW | …odels/ml_program/experimental/torch/debugging_utils.py | 2144 | if node.op == "get_attr" or node.op == "placeholder": | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …ols/optimize/torch/quantization/quantization_config.py | 180 | # In this example, from step 0 onwards, observers will collect statistics | STRING |
| HIGH | coremltools/optimize/coreml/_config.py | 650 | # In this example, we assume elements in the weights >= 0 | STRING |
| HIGH | docs-guides/source/convert-nlp-model.md | 15 | You can apply a [mix of scripting and tracing](model-scripting.md#mix-tracing-and-scripting) to optimize which parts of | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | coremltools/converters/mil/mil/types/type_mapping.py | 264 | Get the smallest type to which the given scalar types can be cast. Args: dtype1 (builtin): dty | STRING |
| HIGH | coremltools/converters/mil/mil/types/type_mapping.py | 301 | Get the smallest promoted dtype, to which all scalar dtypes (provided through dtypes list argument) can be casted. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …ols/test/optimize/torch/quantization/test_quantizer.py | 382 | def my_method(self): | CODE |
| LOW | coremltools/converters/mil/mil/types/type_state.py | 13 | def helper(state_type): | CODE |
| LOW | coremltools/converters/mil/mil/types/type_tensor.py | 27 | def helper(x, y): | CODE |
| LOW | coremltools/converters/mil/mil/types/type_dict.py | 16 | def helper(x, y): | CODE |
| LOW | coremltools/converters/mil/mil/types/type_list.py | 16 | def helper(x, init_length=None, dynamic_length=True): | CODE |
| LOW | coremltools/converters/mil/mil/types/type_tuple.py | 17 | def helper(x): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs-guides/source/custom-operators.md | 31 | ## Step 1: Register the MIL Operator | COMMENT |
| LOW | docs-guides/source/custom-operators.md | 104 | ## Step 2: Define a TensorFlow Composite Operator | COMMENT |
| LOW | docs-guides/source/custom-operators.md | 126 | ## Step 3: Convert the Model | COMMENT |
| LOW | docs-guides/source/custom-operators.md | 139 | ## Step 4: Implement Classes in Swift | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …ize/torch/quantization/modules/conv_transpose_fused.py | 38 | __all__ = ["ConvTransposeBn1d", "ConvTransposeBn2d", "ConvTransposeBn3d"] | CODE |
| LOW | …/optimize/torch/quantization/modules/conv_transpose.py | 21 | __all__ = ["ConvTranspose1d", "ConvTranspose2d", "ConvTranspose3d"] | CODE |
| LOW | …mltools/optimize/torch/pruning/_base_pruning_method.py | 44 | def update_mask(self, module: _torch.nn.Module, scheduled_value: float) -> None: | CODE |
| LOW | …mltools/optimize/torch/pruning/_base_pruning_method.py | 257 | def update_mask(self, module: _torch.nn.Module, scheduled_value: float) -> None: | CODE |
| LOW | coremltools/converters/mil/mil/block.py | 1120 | def set_output_types(self, outputs: Optional[List["_input_types.InputType"]] = None) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …mltools/converters/mil/mil/passes/tests/test_passes.py | 2039 | CODE | |
| MEDIUM | …mltools/converters/mil/mil/passes/tests/test_passes.py | 2040 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …lidation/NeuralNetwork/NeuralNetworkLayerValidator.cpp | 34 | // We need to check if the ConvolutionPaddingType is set | COMMENT |
| LOW | …lidation/NeuralNetwork/NeuralNetworkLayerValidator.cpp | 499 | // We need to check if the PoolingPaddingType is set | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …ce/updatable-tiny-drawing-classifier-pipeline-model.md | 121 | # Inputs are the inputs from the embedding model | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | deps/pybind11/tools/libsize.py | 7 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | deps/pybind11/tests/test_numpy_array.py | 611 | # value increases without bounds. (Don't forget to Ctrl-C the test!) | COMMENT |