AI Slop Code Risk Monitor

ml-explore/mlx

SlopCodeMonitor badge for ml-explore/mlx Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

MLX: An array framework for Apple silicon

3.2 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for ml-explore/mlx, a C++ project with 28,983 GitHub stars. SynthScan examined 227,520 lines of code across 705 source files, recording 737 pattern matches distributed across 13 syntactic categories. The legacy adjusted pattern signal is 3.2 (Low 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.

3.2
Adjusted Signal
3.2
Raw Pattern Score
100%
Time Factor
2026-10-31
Last Push
29.0K
Stars
C++
Language
227.5K
Lines of Code
705
Files
737
Pattern Hits
2026-10-31
Scan Date
0.02
HC Hit Rate

Risk Review · Payload v1

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

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 11.8/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 1.9/100 · LOW

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

Agent Over-Engineering Ratio 8.0/100 · LOW

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

PR Review Velocity Impact 16.8/100 · LOW

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

What These Metrics Mean

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

Pattern-Signal History

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

Severity Breakdown

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

CRITICAL 0HIGH 16MEDIUM 11LOW 710

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 737 distinct pattern matches across 13 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

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

Hyper-Verbose Identifiers343 hits · 304 pts
SeverityFileLineSnippetContext
LOWsetup.py17def cuda_toolkit_major_version():CODE
LOWpython/tests/test_fast_sdpa.py164 def test_sdpa_pad_head_dim_opt_in(self):CODE
LOWpython/tests/test_fast_sdpa.py535 def test_sdpa_vector_kv_transposed_head_seq(self):CODE
LOWpython/tests/test_fast_sdpa.py640 def test_sdpa_vector_gqa_long(self):CODE
LOWpython/tests/test_fast_sdpa.py863 def test_sdpa_short_query_many_heads(self):CODE
LOWpython/tests/test_fast_sdpa.py896 def test_sdpa_split_large_values(self):CODE
LOWpython/tests/test_fast_sdpa.py907 def test_sdpa_vector_value_dims(self):CODE
LOWpython/tests/test_fast_sdpa.py1003 def test_sdpa_blocks_env_override(self):CODE
LOWpython/tests/test_fast_sdpa.py1103 def test_sdpa_long_masked_sequence(self):CODE
LOWpython/tests/test_fast_sdpa.py1156 def test_sdpa_noncontiguous_inputs(self):CODE
LOWpython/tests/test_fast_sdpa.py1167 def test_sdpa_vector_reversed_mask(self):CODE
LOWpython/tests/test_fast_sdpa.py1225 def test_sdpa_attention_sinks(self):CODE
LOWpython/tests/test_fast_sdpa.py1328 def test_sdpa_force_fused_metal(self):CODE
LOWpython/tests/test_fast_sdpa.py1415 def test_sdpa_force_fused_cuda(self):CODE
LOWpython/tests/test_fast_sdpa.py1595 def test_sdpa_window_size_errors(self):CODE
LOWpython/tests/test_extension.py24 def test_extension_paths_use_public_build_metadata(self):CODE
LOWpython/tests/test_extension.py61 def test_reads_mlx_macos_deployment_target(self):CODE
LOW⚡python/tests/test_extension.py108 def test_debug_build_enables_metal_debug(self):STRING
LOW⚡python/tests/test_extension.py115 def test_build_extension_uses_mlx_macos_deployment_target(self):STRING
LOW⚡python/tests/test_extension.py124 def test_environment_overrides_macos_deployment_target(self):STRING
LOW⚡python/tests/test_extension.py133 def test_environment_rejects_macos_deployment_target_below_minimum(self):STRING
LOW⚡python/tests/test_extension.py139 def test_cmake_args_overrides_macos_deployment_target(self):STRING
LOW⚡python/tests/test_extension.py325 def test_rejects_unknown_compile_argument_group(self):STRING
LOW⚡python/tests/test_extension.py333 def test_rejects_non_list_compile_arguments(self):STRING
LOW⚡python/tests/test_extension.py341 def test_generated_cmake_builds_module_and_metallib(self):STRING
LOWpython/tests/test_extension.py92 def test_build_extension_can_enable_ninja(self):STRING
LOWpython/tests/test_extension.py152 def test_cmake_args_rejects_macos_deployment_target_below_minimum(self):STRING
LOWpython/tests/test_extension.py161 def test_build_extension_uses_default_generator(self):STRING
LOWpython/tests/test_extension.py172 def test_build_extension_falls_back_without_ninja(self):STRING
LOWpython/tests/test_extension.py185 def test_explicit_cmake_generator_overrides_ninja(self):STRING
LOWpython/tests/test_extension.py200 def test_cmake_generator_environment_uses_distinct_build_directory(self):STRING
LOWpython/tests/test_extension.py209 def test_build_extension_can_disable_stub_generation(self):STRING
LOWpython/tests/test_extension.py253 def test_requires_host_source(self):STRING
LOWpython/tests/test_extension.py257 def test_compile_argument_list_applies_to_cxx(self):STRING
LOWpython/tests/test_extension.py269 def test_requires_metal_source(self):STRING
LOWpython/tests/test_extension.py273 def test_explicit_metal_libraries(self):STRING
LOWpython/tests/test_extension.py306 def test_rejects_mixed_metal_source_forms(self):STRING
LOWpython/tests/test_extension.py314 def test_rejects_duplicate_metal_library_names(self):STRING
LOWpython/tests/test_extension.py376 def test_generated_cmake_uses_nested_package_mlx_rpath(self):STRING
LOWpython/tests/test_extension.py383 def test_rejects_python_stable_abi(self):STRING
LOWpython/tests/test_conv_transpose.py827 def test_conv_transpose_unfold_tiling(self):CODE
LOWpython/tests/test_tree.py158 def test_tree_unflatten_integer_key_collision(self):CODE
LOWpython/tests/test_upsample.py99 def test_torch_upsample_antialias(self):CODE
LOWpython/tests/test_upsample.py190 def test_antialias_upscale_linear_is_noop(self):CODE
LOWpython/tests/test_upsample.py216 def test_antialias_upscale_cubic_matches_pytorch(self):CODE
LOWpython/tests/test_upsample.py245 def test_antialias_non_integer_scale_smoke(self):CODE
LOWpython/tests/test_losses.py94 def test_binary_cross_entropy(self):CODE
LOWpython/tests/test_losses.py153 def _test_tiny_probs_as_inputs():CODE
LOWpython/tests/test_losses.py446 def test_cosine_similarity_loss(self):CODE
LOWpython/tests/test_fast.py187 def test_rope_dims_validation(self):CODE
LOWpython/tests/test_fast.py412 def test_rope_with_large_offset(self):CODE
LOWpython/tests/test_fast.py569 def test_cross_entropy_shape_checks(self):CODE
LOWpython/tests/test_fast.py616 def test_cross_entropy_grad_non_contiguous(self):CODE
LOWpython/tests/test_fast.py631 def test_layer_norm_dim_check(self):CODE
LOWpython/tests/test_fast.py728 def test_slice_into_layer_norm(self):CODE
LOWpython/tests/test_fast.py782 def test_layer_norm_grad_no_bias(self):CODE
LOWpython/tests/test_fast.py821 def test_layer_norm_grad_no_params(self):CODE
LOWpython/tests/test_fast.py837 def test_layer_norm_grad_params(self):CODE
LOWpython/tests/test_fast.py987 def test_custom_kernel_strides(self):STRING
LOWpython/tests/test_fast.py1042 def test_custom_kernel_helper(self):STRING
283 more matches not shown…
Over-Commented Block142 hits · 142 pts
SeverityFileLineSnippetContext
LOWsetup.py61# etc)COMMENT
LOWpython/tests/xp-tests/xfail.txt201### does not accept a scalar argumentCOMMENT
LOWpython/tests/xp-tests/xfail.txt221### Missing argument `include_initial` and does not promote uint8 results to uint32COMMENT
LOWpython/tests/xp-tests/xfail.txt281### returns uint32 indices instead of the required default signed integer dtypeCOMMENT
LOWpython/src/ops.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/utils.h1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/distributed.cpp1// Copyright © 2024 Apple Inc.COMMENT
LOWpython/src/transforms.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/fast.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/convert.cpp1// Copyright © 2024 Apple Inc.COMMENT
LOWpython/src/load.h1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/random.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/fft.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/array.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/export.cpp1// Copyright © 2024 Apple Inc.COMMENT
LOWpython/src/buffer.h1// Copyright © 2024 Apple Inc.COMMENT
LOWpython/src/stream.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/load.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWpython/src/metal.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWtests/allocator_tests.cpp1// Copyright © 2023-2026 Apple Inc.COMMENT
LOWtests/jaccl_tests.cpp1// Copyright © 2026 Apple Inc.COMMENT
LOWtests/random_tests.cpp281 key = array({0u, 0u, 0u}, {3, 1});COMMENT
LOWtests/gpu_tests.cpp741 // before the main vjp kernel. When the cotangent is donatable the kernelCOMMENT
LOWtests/autograd_tests.cpp1// Copyright © 2023 Apple Inc.COMMENT
LOWexamples/metal_extension/activation.cpp1// Copyright © 2026 Apple Inc.COMMENT
LOWexamples/cmake_extension/axpby/axpby.cpp1// Copyright © 2023-2025 Apple Inc.COMMENT
LOWmlx/mlx.h1// Copyright © 2023 Apple Inc.COMMENT
LOWmlx/mlx.h21#include "mlx/random.h"COMMENT
LOWmlx/ops.cpp1// Copyright © 2023-2026 Apple Inc.COMMENT
LOWmlx/utils.h1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWmlx/transforms.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWmlx/threadpool.h1// This code was modified from https://github.com/progschj/ThreadPoolCOMMENT
LOWmlx/threadpool.h21// 3. This notice may not be removed or altered from any sourceCOMMENT
LOWmlx/small_vector.h1// Copyright © 2025 Apple Inc.COMMENT
LOWmlx/small_vector.h21// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHTCOMMENT
LOWmlx/small_vector.h41#elseCOMMENT
LOWmlx/small_vector.h81// Minimal SmallVector implementation. Uses inline storage first, switches toCOMMENT
LOWmlx/scheduler.h1// Copyright © 2023 Apple Inc.COMMENT
LOWmlx/api.h1// Copyright © 2024 Apple Inc.COMMENT
LOWmlx/api.h21#define MLX_API __declspec(dllexport)COMMENT
LOWmlx/export.cpp1// Copyright © 2024 Apple Inc.COMMENT
LOWmlx/allocator.h1// Copyright © 2023 Apple Inc.COMMENT
LOWmlx/compile.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWmlx/compile.cpp821 for (int i = tape.size() - 1; i >= 0; --i) {COMMENT
LOWmlx/stream.cpp1// Copyright © 2026 Apple Inc.COMMENT
LOWmlx/primitives.cpp1// Copyright © 2023-2024 Apple Inc.COMMENT
LOWmlx/primitives.cpp5941 // - tm = (M + block_size - 1) // block_size; MP = tm * block_size;COMMENT
LOWmlx/array.h1// Copyright © 2023 Apple Inc.COMMENT
LOWmlx/array.h241 // in the underlying data buffer belongs to at least one index.COMMENT
LOWmlx/graph_utils.cpp1// Copyright © 2023 Apple Inc.COMMENT
LOWmlx/einsum.cpp1// Copyright © 2024 Apple Inc.COMMENT
LOWmlx/distributed/jaccl/lib/jaccl/ring_impl.h281 // Perform the dual direction ring reduce scatter for a single wire lw.COMMENT
LOWmlx/distributed/jaccl/lib/jaccl/threadpool.h1// This code was modified from https://github.com/progschj/ThreadPoolCOMMENT
LOWmlx/distributed/jaccl/lib/jaccl/threadpool.h21// 3. This notice may not be removed or altered from any sourceCOMMENT
LOWmlx/distributed/jaccl/lib/jaccl/mesh_impl.h81 recv_end[rank_]++;COMMENT
LOWmlx/distributed/jaccl/lib/jaccl/mesh_impl.h301 //COMMENT
LOWmlx/distributed/jaccl/lib/jaccl/mesh_impl.h421 // The input is split into size_ equal chunks of `chunk` elements. TheCOMMENT
LOWmlx/distributed/jaccl/lib/jaccl/rdma.h1// Copyright © 2025 Apple Inc.COMMENT
LOWmlx/distributed/jaccl/lib/examples/allreduce_bench.cpp1// Copyright © 2025 Apple Inc.COMMENT
LOWmlx/distributed/jaccl/lib/examples/allreduce_bench.cpp21//COMMENT
82 more matches not shown…
Deep Nesting90 hits · 80 pts
SeverityFileLineSnippetContext
LOWpython/tests/test_fast_sdpa.py137CODE
LOWpython/tests/test_fast_sdpa.py173CODE
LOWpython/tests/test_fast_sdpa.py218CODE
LOWpython/tests/test_fast_sdpa.py245CODE
LOWpython/tests/test_fast_sdpa.py314CODE
LOWpython/tests/test_fast_sdpa.py426CODE
LOWpython/tests/test_fast_sdpa.py661CODE
LOWpython/tests/test_fast_sdpa.py706CODE
LOWpython/tests/test_fast_sdpa.py964CODE
LOWpython/tests/test_fast_sdpa.py1018CODE
LOWpython/tests/test_fast_sdpa.py1436CODE
LOWpython/tests/test_fast_sdpa.py1468CODE
LOWpython/tests/test_fast_sdpa.py1532CODE
LOWpython/tests/test_linalg.py12CODE
LOWpython/tests/test_linalg.py90CODE
LOWpython/tests/test_extension.py41CODE
LOWpython/tests/test_conv_transpose.py827CODE
LOWpython/tests/test_upsample.py21CODE
LOWpython/tests/test_upsample.py99CODE
LOWpython/tests/test_upsample.py245CODE
LOWpython/tests/test_fast.py390CODE
LOWpython/tests/test_double.py113CODE
LOWpython/tests/test_array.py1960CODE
LOWpython/tests/test_array.py2076CODE
LOWpython/tests/test_export_import.py546CODE
LOWpython/tests/test_export_import.py558CODE
LOWpython/tests/test_optimizers.py591CODE
LOWpython/tests/test_compile.py664CODE
LOWpython/tests/test_fft.py72CODE
LOWpython/tests/test_fft.py319CODE
LOWpython/tests/test_quantized.py258CODE
LOWpython/tests/test_quantized.py565CODE
LOWpython/tests/test_quantized.py991CODE
LOWpython/tests/test_quantized.py1158CODE
LOWpython/tests/test_quantized.py2461CODE
LOWpython/tests/test_quantized.py2505CODE
LOWpython/tests/test_blas.py309CODE
LOWpython/tests/test_blas.py504CODE
LOWpython/tests/test_blas.py874CODE
LOWpython/tests/test_blas.py929CODE
LOWpython/tests/test_blas.py1549CODE
LOWpython/tests/mpi_test_distributed.py31CODE
LOWpython/tests/test_reduce.py13CODE
LOWpython/tests/test_reduce.py30CODE
LOWpython/tests/test_reduce.py88CODE
LOWpython/tests/test_reduce.py124CODE
LOWpython/tests/test_reduce.py249CODE
LOWpython/tests/test_reduce.py314CODE
LOWpython/tests/test_reduce.py343CODE
LOWpython/tests/test_reduce.py394CODE
LOWpython/tests/test_bf16.py129CODE
LOWpython/tests/test_fast_gated_delta.py306CODE
LOWpython/tests/test_ops.py2113CODE
LOWpython/tests/test_ops.py2180CODE
LOWpython/tests/test_ops.py2283CODE
LOWpython/tests/test_ops.py3212CODE
LOWpython/tests/test_ops.py4191CODE
LOWpython/tests/test_ops.py4828CODE
LOWpython/tests/test_autograd.py1035CODE
LOWpython/tests/test_autograd.py1784CODE
30 more matches not shown…
Unused Imports110 hits · 70 pts
SeverityFileLineSnippetContext
LOWpython/tests/test_optimizers.py18CODE
LOWpython/mlx/nn/__init__.py3CODE
LOWpython/mlx/nn/__init__.py3CODE
LOWpython/mlx/nn/__init__.py4CODE
LOWpython/mlx/nn/__init__.py5CODE
LOWpython/mlx/nn/__init__.py5CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py3CODE
LOWpython/mlx/nn/layers/__init__.py57CODE
LOWpython/mlx/nn/layers/__init__.py58CODE
50 more matches not shown…
Empty Error Handlers8 hits · 40 pts
SeverityFileLineSnippetContext
HIGHpython/tests/test_array.py2427except ValueError:CODE
HIGHpython/tests/test_array.py2949except ValueError:CODE
HIGHpython/tests/test_device.py141except Exception:CODE
HIGHpython/tests/test_load.py142except Exception:CODE
HIGHpython/mlx/_distributed_utils/launch.py495except KeyboardInterrupt:CODE
HIGHpython/mlx/_distributed_utils/launch.py200except QueueEmpty:CODE
HIGHpython/mlx/_distributed_utils/launch.py276except QueueEmpty:CODE
HIGHpython/mlx/_distributed_utils/launch.py282except QueueEmpty:CODE
Excessive Try-Catch Wrapping21 hits · 28 pts
SeverityFileLineSnippetContext
MEDIUMpython/tests/test_compile.py108def worker():CODE
MEDIUMpython/tests/test_compile.py143def worker():CODE
LOWpython/tests/test_compile.py114 except Exception as e:CODE
LOWpython/tests/test_compile.py152 except Exception as e:CODE
LOWpython/tests/test_zero_copy.py177 except Exception as e:CODE
MEDIUMpython/tests/test_zero_copy.py172def worker():CODE
LOWpython/tests/test_threads.py74 except Exception as e:CODE
LOWpython/tests/test_threads.py86 except Exception as e:CODE
LOWpython/tests/test_threads.py98 except Exception as e:CODE
MEDIUMpython/tests/test_threads.py65def grad_worker():CODE
MEDIUMpython/tests/test_threads.py77def compile_worker():CODE
MEDIUMpython/tests/test_threads.py89def vmap_worker():CODE
LOWpython/tests/test_device.py141 except Exception:CODE
MEDIUMpython/tests/test_device.py136def gen():CODE
LOW⚡python/tests/test_load.py142 except Exception:CODE
LOWpython/mlx/_distributed_utils/common.py88 except Exception as e:CODE
LOWbenchmarks/python/masked_scatter.py36 except Exception:CODE
LOWbenchmarks/python/masked_scatter.py45 except Exception:CODE
LOWbenchmarks/python/gated_delta_bench.py93 except Exception as ex:CODE
LOWbenchmarks/python/gated_delta_bench.py171 except Exception as ex:CODE
LOWbenchmarks/python/gated_delta_bench.py210 except Exception as ex:CODE
Docstring Block Structure4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHpython/mlx/nn/losses.py31 Computes the cross entropy loss. Args: logits (array): The unnormalized logits. targets (arraySTRING
HIGHpython/mlx/nn/losses.py150 Computes the binary cross entropy loss. By default, this function takes the pre-sigmoid logits, which results STRING
HIGHpython/mlx/nn/losses.py594 Calculate the margin ranking loss that loss given inputs :math:`x_1`, :math:`x_2` and a label :math:`y` (contaiSTRING
HIGHpython/mlx/nn/layers/linear.py84Return a quantized approximation of this layer. If ``quantize_input`` is ``False``, returns a :obj:`QuantizedLiSTRING
Cross-Language Confusion4 hits · 16 pts
SeverityFileLineSnippetContext
HIGHpython/mlx/_distributed_utils/launch.py166 script += "if ps -p $pid >/dev/null; then "CODE
HIGH⚡python/mlx/_distributed_utils/common.py52 "rdma": [null, "rdma_en2", "rdma_en3"]},STRING
HIGH⚡python/mlx/_distributed_utils/common.py54 "rdma": ["rdma_en2", null, "rdma_en3"]},STRING
HIGH⚡python/mlx/_distributed_utils/common.py57 "rdma": ["rdma_en2", "rdma_en3", null]},STRING
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMpython/mlx/utils.py162 # Create the function to update the destination. We are taking advantage ofCOMMENT
MEDIUMpython/mlx/_distributed_utils/config.py255 # Create a reverse index to be able to map uuids to (host, port) quicklyCOMMENT
MEDIUMpython/src/stream.cpp207 # Create a context manager for the default device and stream.COMMENT
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOWsetup.py152 # Set CMAKE_BUILD_PARALLEL_LEVEL to control the parallel build levelCOMMENT
LOWpython/tests/test_constants.py11 # Check if mlx constants match expected valuesCOMMENT
LOW⚡python/tests/test_constants.py24 # Check if mlx constants are availableCOMMENT
LOWpython/mlx/extension.py636 # Set CMAKE_BUILD_PARALLEL_LEVEL to control the parallel build levelCOMMENT
LOWpython/mlx/_distributed_utils/launch.py287 # Check if all are running and terminate otherwiseCOMMENT
AI Structural Patterns5 hits · 4 pts
SeverityFileLineSnippetContext
LOWpython/tests/test_quantized.py1818CODE
LOWpython/tests/test_blas.py1288CODE
LOWpython/tests/test_conv.py722CODE
LOWpython/mlx/nn/layers/transformer.py314CODE
LOWpython/mlx/optimizers/optimizers.py761CODE
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMmlx/distributed/jaccl/lib/jaccl/rdma.h433 // Twice has proven to be more robust to initialization issues.COMMENT
Modern Structural Boilerplate1 hit · 1 pts
SeverityFileLineSnippetContext
LOWpython/mlx/nn/layers/base.py591 def _set_training_mode(self, mode: bool) -> None:CODE