Flax is a neural network library for JAX that is designed for flexibility.
This report presents the forensic synthetic code analysis of google/flax, a Jupyter Notebook project with 7,307 GitHub stars. SynthScan v2.0 examined 161,626 lines of code across 479 source files, recording 2403 pattern matches distributed across 23 syntactic categories. The overall adjusted score of 17.9 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 2403 distinct pattern matches across 23 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/traceback_util_test.py | 49 | def test_simple_exclusion_tracebackhide(self): | CODE |
| LOW | tests/traceback_util_test.py | 87 | def test_simple_exclusion_remove_frames(self): | CODE |
| LOW | tests/struct_test.py | 87 | def test_wrap_pytree_node_no_error(self): | CODE |
| LOW | tests/struct_test.py | 125 | def test_metadata_pass_through(self): | CODE |
| LOW | tests/struct_test.py | 160 | def test_generic_pytreenode_base_order(self): | CODE |
| LOW | tests/pickle_test.py | 22 | def test_exception_can_be_pickled(self): | CODE |
| LOW | tests/jax_utils_test.py | 84 | def test_min_device_batch_avoids_recompile(self, dtype): | CODE |
| LOW | tests/checkpoints_test.py | 106 | def test_save_restore_checkpoints(self, use_orbax): | CODE |
| LOW | tests/checkpoints_test.py | 176 | def test_overwrite_checkpoints(self, use_orbax): | CODE |
| LOW | tests/checkpoints_test.py | 232 | def test_save_restore_checkpoints_w_float_steps(self, use_orbax): | CODE |
| LOW | tests/checkpoints_test.py | 266 | def test_save_restore_checkpoints_target_none(self, use_orbax): | CODE |
| LOW | tests/checkpoints_test.py | 288 | def test_save_restore_checkpoints_target_singular(self, use_orbax): | CODE |
| LOW | tests/checkpoints_test.py | 307 | def test_save_restore_checkpoints_target_empty(self, use_orbax): | CODE |
| LOW | tests/checkpoints_test.py | 324 | def test_async_save_checkpoints(self): | CODE |
| LOW | tests/traverse_util_test.py | 68 | def test_traverse_tuple_items(self): | CODE |
| LOW | tests/traverse_util_test.py | 75 | def test_traverse_namedtuple_item(self): | CODE |
| LOW | tests/traverse_util_test.py | 89 | def test_traverse_namedtuple_attr(self): | CODE |
| LOW | tests/traverse_util_test.py | 96 | def test_traverse_dataclass_attr(self): | CODE |
| LOW | tests/traverse_util_test.py | 196 | def test_flatten_dict_keep_empty(self): | CODE |
| LOW | tests/traverse_util_test.py | 210 | def test_flatten_dict_is_leaf(self): | CODE |
| LOW | tests/traverse_util_test.py | 227 | def test_only_works_on_model_params(self): | CODE |
| LOW | tests/traverse_util_test.py | 284 | def test_path_aware_map_with_multi_transform(self): | CODE |
| LOW | tests/traverse_util_test.py | 314 | def test_path_aware_map_with_masked(self): | CODE |
| LOW | tests/traverse_util_test.py | 342 | def test_path_aware_map_with_empty_nodes(self): | CODE |
| LOW | tests/tensorboard_test.py | 51 | def parse_and_return_summary_value(self, path): | CODE |
| LOW | tests/tensorboard_test.py | 69 | def test_summarywriter_flush_after_close(self): | CODE |
| LOW | tests/tensorboard_test.py | 76 | def test_summarywriter_scalar(self): | CODE |
| LOW | tests/tensorboard_test.py | 116 | def test_summarywriter_image_float_pixel_values(self): | CODE |
| LOW | tests/tensorboard_test.py | 145 | def test_summarywriter_single_channel_image_scaled(self): | CODE |
| LOW | tests/tensorboard_test.py | 158 | def test_summarywriter_multiple_images(self): | CODE |
| LOW | tests/tensorboard_test.py | 218 | def test_summarywriter_audio_sampled_output(self): | CODE |
| LOW | tests/tensorboard_test.py | 244 | def test_summarywriter_clipped_audio(self): | CODE |
| LOW | tests/tensorboard_test.py | 272 | def test_summarywriter_histogram_defaultbins(self): | CODE |
| LOW | tests/serialization_test.py | 109 | def test_dataclass_serialization(self): | CODE |
| LOW | tests/serialization_test.py | 128 | def test_pass_through_serialization(self): | CODE |
| LOW | tests/serialization_test.py | 163 | def test_partial_serialization(self): | CODE |
| LOW | tests/serialization_test.py | 170 | def test_optimizer_serialization(self): | CODE |
| LOW | tests/serialization_test.py | 195 | def test_collection_serialization(self): | CODE |
| LOW | tests/serialization_test.py | 314 | def test_jax_numpy_serialization(self): | CODE |
| LOW | tests/serialization_test.py | 344 | def test_complex_serialization(self): | CODE |
| LOW | tests/serialization_test.py | 383 | def test_namedtuple_serialization(self): | CODE |
| LOW | tests/serialization_test.py | 392 | def test_namedtuple_restore_legacy(self): | CODE |
| LOW | tests/serialization_test.py | 405 | def test_model_serialization_to_bytes(self): | CODE |
| LOW | tests/serialization_test.py | 413 | def test_optimizer_serialization_to_bytes(self): | CODE |
| LOW | tests/serialization_test.py | 424 | def test_serialization_chunking(self): | CODE |
| LOW | tests/serialization_test.py | 526 | def test_serialization_errors(self, target, wrong_target, msg): | CODE |
| LOW | tests/cursor_test.py | 594 | def test_apply_update_root_node_unmodified(self): | CODE |
| LOW | tests/cursor_test.py | 658 | def test_named_tuple_multi_access(self): | CODE |
| LOW | tests/core/core_meta_test.py | 84 | def test_partition_axis_unspecified(self): | CODE |
| LOW | tests/core/core_meta_test.py | 188 | def test_boxed_param_with_mesh(self): | CODE |
| LOW | tests/core/core_frozen_dict_test.py | 41 | def test_frozen_dict_partially_maps(self): | CODE |
| LOW | tests/core/core_frozen_dict_test.py | 79 | def test_frozen_dict_copy_reserved_name(self): | CODE |
| LOW | tests/core/core_frozen_dict_test.py | 132 | def test_utility_copy_singlearg(self, x): | CODE |
| LOW | tests/core/core_lift_test.py | 234 | def test_subscope_var_aliasing(self): | CODE |
| LOW | tests/core/core_scope_test.py | 121 | def test_inconsistent_param_shapes(self): | CODE |
| LOW | tests/core/core_scope_test.py | 133 | def test_apply_variables_bad_pytree(self): | CODE |
| LOW | tests/core/core_scope_test.py | 151 | def test_mutate_undefined_collection(self): | CODE |
| LOW | tests/core/core_scope_test.py | 178 | def test_rngs_check_w_frozen_dict(self): | CODE |
| LOW | tests/core/core_scope_test.py | 184 | def test_rng_check_w_old_and_new_keys(self): | CODE |
| LOW | tests/core/core_scope_test.py | 201 | def test_rng_check_w_lazy_rng(self): | CODE |
| 825 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/nnx/mutable_array_test.py | 1040 | # ------------ | COMMENT |
| MEDIUM⚡ | tests/nnx/mutable_array_test.py | 1042 | # ------------ | COMMENT |
| MEDIUM⚡ | tests/nnx/mutable_array_test.py | 1111 | # ------------ | COMMENT |
| MEDIUM⚡ | tests/nnx/mutable_array_test.py | 1113 | # ------------ | COMMENT |
| MEDIUM | flax/core/spmd.py | 100 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | flax/nnx/pytreelib.py | 904 | # ------------------------- | COMMENT |
| MEDIUM⚡ | flax/nnx/pytreelib.py | 906 | # ------------------------- | COMMENT |
| MEDIUM | flax/nnx/pytreelib.py | 984 | # ------------------------- | COMMENT |
| MEDIUM | flax/nnx/pytreelib.py | 986 | # ------------------------- | COMMENT |
| MEDIUM | flax/nnx/spmd.py | 33 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM | flax/nnx/spmd.py | 116 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM | flax/nnx/spmd.py | 172 | # ------------------------------------------------------------------------------ | COMMENT |
| MEDIUM | flax/nnx/rnglib.py | 162 | # ---------------------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/rnglib.py | 164 | # ---------------------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/rnglib.py | 296 | # ---------------------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/rnglib.py | 298 | # ---------------------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/rnglib.py | 613 | # ---------------------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/rnglib.py | 615 | # ---------------------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/rnglib.py | 747 | # ---------------------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/rnglib.py | 749 | # ---------------------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 270 | # --------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 272 | # --------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 527 | # --------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 529 | # --------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 733 | # -------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 735 | # -------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 811 | # --------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 813 | # --------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 909 | # --------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 911 | # --------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 974 | # -------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 976 | # -------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 1030 | # -------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 1032 | # -------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 1825 | # -------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 1827 | # -------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/variablelib.py | 1996 | # -------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/graphlib.py | 1511 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/graphlib.py | 1513 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/graphlib.py | 2229 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/graphlib.py | 2231 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/graphlib.py | 3648 | # --------------------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/graphlib.py | 3650 | # --------------------------------------------------------- | COMMENT |
| MEDIUM | flax/nnx/extract.py | 205 | # ----------------------------- | COMMENT |
| MEDIUM | flax/nnx/extract.py | 207 | # ----------------------------- | COMMENT |
| MEDIUM | flax/nnx/transforms/iteration.py | 63 | # ------------------------------- | COMMENT |
| MEDIUM | flax/nnx/transforms/iteration.py | 65 | # ------------------------------- | COMMENT |
| MEDIUM | flax/nnx/transforms/iteration.py | 158 | # ------------------------------- | COMMENT |
| MEDIUM | flax/nnx/transforms/iteration.py | 160 | # ------------------------------- | COMMENT |
| MEDIUM | flax/nnx/transforms/iteration.py | 594 | # ------------------------------- | COMMENT |
| MEDIUM | flax/nnx/transforms/iteration.py | 596 | # ------------------------------- | COMMENT |
| MEDIUM | flax/nnx/transforms/iteration.py | 854 | # ------------------------------- | COMMENT |
| MEDIUM | flax/nnx/transforms/iteration.py | 856 | # ------------------------------- | COMMENT |
| MEDIUM | flax/nnx/transforms/iteration.py | 1875 | # ------------------------------- | COMMENT |
| MEDIUM | flax/nnx/transforms/iteration.py | 1877 | # ------------------------------- | COMMENT |
| MEDIUM | flax/nnx/transforms/transforms.py | 98 | # ------------------------------- | COMMENT |
| MEDIUM | flax/nnx/transforms/transforms.py | 100 | # ------------------------------- | COMMENT |
| MEDIUM | flax/nnx/transforms/transforms.py | 187 | # ------------------------------- | COMMENT |
| MEDIUM | flax/nnx/transforms/transforms.py | 189 | # ------------------------------- | COMMENT |
| MEDIUM | flax/nnx/transforms/compilation.py | 48 | # ------------------------------- | COMMENT |
| 88 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | nnx.py | 29 | CODE | |
| LOW | nnx.py | 30 | CODE | |
| LOW | flaxlib_src/src/flaxlib/__init__.py | 15 | CODE | |
| LOW | flaxlib_src/src/flaxlib/__init__.py | 16 | CODE | |
| LOW | flaxlib_src/src/flaxlib/__init__.py | 17 | CODE | |
| LOW | flaxlib_src/src/flaxlib/__init__.py | 18 | CODE | |
| LOW | flaxlib_src/src/flaxlib/__init__.py | 19 | CODE | |
| LOW | flax/__init__.py | 24 | CODE | |
| LOW | flax/__init__.py | 25 | CODE | |
| LOW | flax/__init__.py | 26 | CODE | |
| LOW | flax/__init__.py | 27 | CODE | |
| LOW | flax/__init__.py | 28 | CODE | |
| LOW | flax/typing.py | 14 | CODE | |
| LOW | flax/experimental/nnx.py | 17 | CODE | |
| LOW | flax/core/variables.py | 42 | CODE | |
| LOW | flax/core/__init__.py | 15 | CODE | |
| LOW | flax/core/__init__.py | 16 | CODE | |
| LOW | flax/core/__init__.py | 16 | CODE | |
| LOW | flax/core/__init__.py | 16 | CODE | |
| LOW | flax/core/__init__.py | 16 | CODE | |
| LOW | flax/core/__init__.py | 16 | CODE | |
| LOW | flax/core/__init__.py | 16 | CODE | |
| LOW | flax/core/__init__.py | 24 | CODE | |
| LOW | flax/core/__init__.py | 24 | CODE | |
| LOW | flax/core/__init__.py | 24 | CODE | |
| LOW | flax/core/__init__.py | 24 | CODE | |
| LOW | flax/core/__init__.py | 24 | CODE | |
| LOW | flax/core/__init__.py | 24 | CODE | |
| LOW | flax/core/__init__.py | 24 | CODE | |
| LOW | flax/core/__init__.py | 24 | CODE | |
| LOW | flax/core/__init__.py | 24 | CODE | |
| LOW | flax/core/__init__.py | 35 | CODE | |
| LOW | flax/core/__init__.py | 35 | CODE | |
| LOW | flax/core/__init__.py | 35 | CODE | |
| LOW | flax/core/__init__.py | 40 | CODE | |
| LOW | flax/core/__init__.py | 40 | CODE | |
| LOW | flax/core/__init__.py | 40 | CODE | |
| LOW | flax/core/__init__.py | 40 | CODE | |
| LOW | flax/core/__init__.py | 40 | CODE | |
| LOW | flax/core/__init__.py | 40 | CODE | |
| LOW | flax/core/__init__.py | 48 | CODE | |
| LOW | flax/core/__init__.py | 48 | CODE | |
| LOW | flax/core/__init__.py | 53 | CODE | |
| LOW | flax/core/scope.py | 43 | CODE | |
| LOW | flax/core/nn/__init__.py | 19 | CODE | |
| LOW | flax/core/nn/__init__.py | 20 | CODE | |
| LOW | flax/core/nn/__init__.py | 21 | CODE | |
| LOW | flax/core/nn/__init__.py | 21 | CODE | |
| LOW | flax/core/nn/__init__.py | 21 | CODE | |
| LOW | flax/core/nn/__init__.py | 21 | CODE | |
| LOW | flax/core/nn/__init__.py | 21 | CODE | |
| LOW | flax/core/nn/__init__.py | 21 | CODE | |
| LOW | flax/core/nn/__init__.py | 21 | CODE | |
| LOW | flax/core/nn/__init__.py | 21 | CODE | |
| LOW | flax/core/nn/__init__.py | 21 | CODE | |
| LOW | flax/core/nn/__init__.py | 21 | CODE | |
| LOW | flax/core/nn/__init__.py | 21 | CODE | |
| LOW | flax/core/nn/__init__.py | 21 | CODE | |
| LOW | flax/core/nn/__init__.py | 21 | CODE | |
| LOW | flax/core/nn/__init__.py | 21 | CODE | |
| 554 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | docs_nnx/README.md | 0 | applies a linear transformation to the inputs along multiple dimensions. args: inputs: the nd-array to be transformed. r | STRING |
| HIGH | docs/README.md | 0 | applies a linear transformation to the inputs along multiple dimensions. args: inputs: the nd-array to be transformed. r | STRING |
| HIGH | flax/nnx/nn/linear.py | 0 | applies a linear transformation to the inputs along multiple dimensions. args: inputs: the nd-array to be transformed. r | STRING |
| HIGH | flax/linen/linear.py | 0 | applies a linear transformation to the inputs along multiple dimensions. args: inputs: the nd-array to be transformed. r | STRING |
| HIGH | docs_nnx/flip/2434-general-metadata.md | 0 | abstract base class for boxed metadata. ``axismetadata`` enables arbitrary, per axis metadata for variables. by using `` | STRING |
| HIGH | docs/flip/2434-general-metadata.md | 0 | abstract base class for boxed metadata. ``axismetadata`` enables arbitrary, per axis metadata for variables. by using `` | STRING |
| HIGH | flax/core/meta.py | 0 | abstract base class for boxed metadata. ``axismetadata`` enables arbitrary, per axis metadata for variables. by using `` | STRING |
| HIGH | docs_nnx/flip/2434-general-metadata.md | 0 | returns the content of the axismetadata box. note that unlike ``meta.unbox`` the unbox call should not recursively unbox | STRING |
| HIGH | docs/flip/2434-general-metadata.md | 0 | returns the content of the axismetadata box. note that unlike ``meta.unbox`` the unbox call should not recursively unbox | STRING |
| HIGH | flax/core/meta.py | 0 | returns the content of the axismetadata box. note that unlike ``meta.unbox`` the unbox call should not recursively unbox | STRING |
| HIGH | docs_nnx/flip/2434-general-metadata.md | 0 | adds a new axis to the axis metadata. note that add_axis and remove_axis should act as each other's inverse (meaning: `` | STRING |
| HIGH | docs/flip/2434-general-metadata.md | 0 | adds a new axis to the axis metadata. note that add_axis and remove_axis should act as each other's inverse (meaning: `` | STRING |
| HIGH | flax/core/meta.py | 0 | adds a new axis to the axis metadata. note that add_axis and remove_axis should act as each other's inverse (meaning: `` | STRING |
| HIGH | docs_nnx/flip/2434-general-metadata.md | 0 | removes an axis from the axis metadata. note that add_axis and remove_axis should act as each other's inverse (meaning: | STRING |
| HIGH | docs/flip/2434-general-metadata.md | 0 | removes an axis from the axis metadata. note that add_axis and remove_axis should act as each other's inverse (meaning: | STRING |
| HIGH | flax/core/meta.py | 0 | removes an axis from the axis metadata. note that add_axis and remove_axis should act as each other's inverse (meaning: | STRING |
| HIGH | flax/core/nn/linear.py | 0 | computes the dimension numbers based on the input shape. | STRING |
| HIGH | flax/nnx/nn/linear.py | 0 | computes the dimension numbers based on the input shape. | STRING |
| HIGH | flax/linen/linear.py | 0 | computes the dimension numbers based on the input shape. | STRING |
| HIGH | flax/core/nn/linear.py | 0 | attend over the embedding using a query array. args: query: array with last dimension equal the feature depth ``features | STRING |
| HIGH | flax/linen/experimental/layers_with_named_axes.py | 0 | attend over the embedding using a query array. args: query: array with last dimension equal the feature depth ``features | STRING |
| HIGH | flax/linen/linear.py | 0 | attend over the embedding using a query array. args: query: array with last dimension equal the feature depth ``features | STRING |
| HIGH | flax/nnx/nn/linear.py | 0 | applies a linear transformation to the inputs along the last dimension. args: inputs: the nd-array to be transformed. re | STRING |
| HIGH | flax/linen/linear.py | 0 | applies a linear transformation to the inputs along the last dimension. args: inputs: the nd-array to be transformed. re | STRING |
| HIGH | flax/linen/experimental/layers_with_named_axes.py | 0 | applies a linear transformation to the inputs along the last dimension. args: inputs: the nd-array to be transformed. re | STRING |
| HIGH | flax/nnx/nn/normalization.py | 0 | returns a tuple of deduplicated, sorted, and positive axes. | STRING |
| HIGH | flax/linen/normalization.py | 0 | returns a tuple of deduplicated, sorted, and positive axes. | STRING |
| HIGH | flax/linen/experimental/layers_with_named_axes.py | 0 | returns a tuple of deduplicated, sorted, and positive axes. | STRING |
| HIGH | flax/nnx/nn/normalization.py | 0 | computes the elementwise square of the absolute value |x|^2. | STRING |
| HIGH | flax/linen/normalization.py | 0 | computes the elementwise square of the absolute value |x|^2. | STRING |
| HIGH | flax/linen/experimental/layers_with_named_axes.py | 0 | computes the elementwise square of the absolute value |x|^2. | STRING |
| HIGH | examples/gemma/input_pipeline_tf.py | 0 | normalizes feature names to 'inputs' and 'targets'. | STRING |
| HIGH | examples/gemma/input_pipeline_grain.py | 0 | normalizes feature names to 'inputs' and 'targets'. | STRING |
| HIGH | examples/wmt/input_pipeline.py | 0 | normalizes feature names to 'inputs' and 'targets'. | STRING |
| HIGH | examples/lm1b/input_pipeline.py | 0 | normalizes feature names to 'inputs' and 'targets'. | STRING |
| HIGH | examples/gemma/input_pipeline_tf.py | 0 | creates a 'packed' version of a dataset on-the-fly. adapted from the mesh-tf implementation. this is meant to replace th | STRING |
| HIGH | examples/wmt/input_pipeline.py | 0 | creates a 'packed' version of a dataset on-the-fly. adapted from the mesh-tf implementation. this is meant to replace th | STRING |
| HIGH | examples/lm1b/input_pipeline.py | 0 | creates a 'packed' version of a dataset on-the-fly. adapted from the mesh-tf implementation. this is meant to replace th | STRING |
| HIGH | examples/gemma/input_pipeline_tf.py | 0 | helper-function for packing a dataset which has already been batched. helper for pack_dataset() uses tf.while_loop. args | STRING |
| HIGH | examples/lm1b/input_pipeline.py | 0 | helper-function for packing a dataset which has already been batched. helper for pack_dataset() uses tf.while_loop. args | STRING |
| HIGH | examples/wmt/input_pipeline.py | 0 | helper-function for packing a dataset which has already been batched. helper for pack_dataset() uses tf.while_loop. args | STRING |
| HIGH | examples/gemma/input_pipeline_tf.py | 0 | internal function to flat_map over. consumes a batch of input examples and produces a variable number of output examples | STRING |
| HIGH | examples/wmt/input_pipeline.py | 0 | internal function to flat_map over. consumes a batch of input examples and produces a variable number of output examples | STRING |
| HIGH | examples/lm1b/input_pipeline.py | 0 | internal function to flat_map over. consumes a batch of input examples and produces a variable number of output examples | STRING |
| HIGH | examples/gemma/input_pipeline_tf.py | 0 | body function for while_loop. args: i: integer scalar partial: dictionary of tensor (partially-constructed example) outp | STRING |
| HIGH | examples/wmt/input_pipeline.py | 0 | body function for while_loop. args: i: integer scalar partial: dictionary of tensor (partially-constructed example) outp | STRING |
| HIGH | examples/lm1b/input_pipeline.py | 0 | body function for while_loop. args: i: integer scalar partial: dictionary of tensor (partially-constructed example) outp | STRING |
| HIGH | examples/gemma/input_pipeline_tf.py | 0 | load and return dataset of batched examples for use during training. | STRING |
| HIGH | examples/gemma/input_pipeline_grain.py | 0 | load and return dataset of batched examples for use during training. | STRING |
| HIGH | examples/wmt/input_pipeline.py | 0 | load and return dataset of batched examples for use during training. | STRING |
| HIGH | examples/lm1b/input_pipeline.py | 0 | load and return dataset of batched examples for use during training. | STRING |
| HIGH | examples/gemma/tokenizer.py | 0 | write part of a tfds sentence dataset to lines in a text file. args: dataset: tf.dataset containing string-data. maxchar | STRING |
| HIGH | examples/wmt/tokenizer.py | 0 | write part of a tfds sentence dataset to lines in a text file. args: dataset: tf.dataset containing string-data. maxchar | STRING |
| HIGH | examples/lm1b/tokenizer.py | 0 | write part of a tfds sentence dataset to lines in a text file. args: dataset: tf.dataset containing string-data. maxchar | STRING |
| HIGH | examples/gemma/tokenizer.py | 0 | loads the tokenizer at `vocab_path` or trains a one from `dataset`. | STRING |
| HIGH | examples/wmt/tokenizer.py | 0 | loads the tokenizer at `vocab_path` or trains a one from `dataset`. | STRING |
| HIGH | examples/lm1b/tokenizer.py | 0 | loads the tokenizer at `vocab_path` or trains a one from `dataset`. | STRING |
| HIGH | examples/gemma/train.py | 0 | applies a reverse square-root schedule. the reverse square root schedule is simply `lr = init_value / sqrt(step)`. args: | STRING |
| HIGH | examples/lm1b/train.py | 0 | applies a reverse square-root schedule. the reverse square root schedule is simply `lr = init_value / sqrt(step)`. args: | STRING |
| HIGH | examples/wmt/train.py | 0 | applies a reverse square-root schedule. the reverse square root schedule is simply `lr = init_value / sqrt(step)`. args: | STRING |
| 23 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | nnx.py | 1 | # Copyright 2026 The Flax Authors. | COMMENT |
| LOW | .pre-commit-config.yaml | 1 | # Install the pre-commit hooks below with | COMMENT |
| LOW | .readthedocs.yml | 1 | # deprecated | COMMENT |
| LOW | flaxlib_src/src/flaxlib/__init__.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/configurations_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/traceback_util_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/struct_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/pickle_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/early_stopping_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/flaxlib_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/jax_utils_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/checkpoints_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/traverse_util_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/io_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/tensorboard_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/serialization_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/cursor_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/core/core_meta_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/core/core_frozen_dict_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/core/core_lift_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/core/core_scope_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/core/design/core_weight_std_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/core/design/core_vmap_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/core/design/core_big_resnets_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/core/design/core_dense_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/core/design/core_custom_vjp_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/core/design/core_auto_encoder_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/core/design/core_tied_autoencoder_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/core/design/core_scan_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/core/design/core_flow_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/core/design/core_attention_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/core/design/core_resnet_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/containers_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/rngs_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/optimizer_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/filters_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/mutable_array_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/graph_utils_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/transforms_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/__init__.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/metrics_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/helpers_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/state_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/module_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/nnx_compat_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/ids_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/partitioning_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/ema_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/summary_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/test_traversals.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/integration_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/variable_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/spmd_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/nn/recurrent_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/nn/normalization_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/nn/linear_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/nn/conv_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/nn/attention_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/nn/stochastic_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| LOW | tests/nnx/nn/lora_test.py | 1 | # Copyright 2024 The Flax Authors. | COMMENT |
| 313 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | flax/configurations.py | 188 | Read an environment variable and interpret it as a boolean. This is deprecated. Please use bool_flag() unless your fl | STRING |
| HIGH | flax/configurations.py | 215 | Read an environment variable and interpret it as an integer. Args: varname: the name of the variable default: | STRING |
| HIGH | flax/jax_utils.py | 276 | Wraps a function with code that pads, shards, then un-shards, un-pads. Args: wrapped: the function to be wrapped. | STRING |
| HIGH | flax/core/lift.py | 721 | A lifted version of ``jax.vmap``. See ``jax.vmap`` for the unlifted batch transform in Jax. ``vmap`` can be used t | STRING |
| HIGH | flax/nnx/visualization.py | 52 | Renders an object in "constructor format", similar to a dataclass. This produces a rendering like `Foo(bar=1, baz=2)` | STRING |
| HIGH | flax/nnx/summary.py | 268 | Creates a summary of the graph object represented as a table. The table summarizes the object's state and metadata. T | STRING |
| HIGH | flax/linen/transforms.py | 846 | A lifted version of ``jax.vmap``. See ``jax.vmap`` for the unlifted batch transform in Jax. ``vmap`` can be used t | STRING |
| HIGH | flax/linen/attention.py | 63 | Computes dot-product attention weights given query and key. Used by :func:`dot_product_attention`, which is what you' | STRING |
| HIGH | flax/linen/attention.py | 184 | Computes dot-product attention given query, key, and value. This is the core function for applying attention based on | STRING |
| HIGH | flax/linen/partitioning.py | 92 | Reduction function for sow() calls. Args: x: Existing value, or () if there was none. y: New axis names sown. | STRING |
| HIGH | flax/linen/partitioning.py | 131 | Declares and returns a parameter with logical axes in the current Module. See :mod:`flax.linen.module.param` for orig | STRING |
| HIGH | flax/linen/partitioning.py | 255 | Declares and returns a variable with logical axes in the current Module. See :mod:`flax.linen.module.variable` for or | STRING |
| HIGH | flax/linen/summary.py | 187 | Returns a function that creates a summary of the Module represented as a table. This function accepts most of the sam | STRING |
| HIGH | flax/linen/module.py | 2742 | Creates a summary of the Module represented as a table. This method has the same signature and internally calls ``M | STRING |
| HIGH | examples/nlp_seq/input_pipeline.py | 107 | Map for a token a selected subset of attributes to indices. Input example: CoNLL 09 representation for a token. [ | STRING |
| HIGH | examples/nlp_seq/input_pipeline.py | 143 | Create a sentence containing a root. Args: attributes: attributes extracted from token. vocabs: dictionary of | STRING |
| HIGH | examples/nlp_seq/input_pipeline.py | 166 | Load and returns conll data in list format. Args: corpus_filename: filename of corpus. vocabs: dictionary of | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/cursor_test.py | 125 | CODE | |
| LOW | tests/linen/linen_test.py | 1064 | CODE | |
| LOW | docs_nnx/conf_sphinx_patch.py | 32 | CODE | |
| LOW | docs_nnx/conf_sphinx_patch.py | 86 | CODE | |
| LOW | docs_nnx/conf_sphinx_patch.py | 115 | CODE | |
| LOW | docs/conf_sphinx_patch.py | 32 | CODE | |
| LOW | docs/conf_sphinx_patch.py | 86 | CODE | |
| LOW | docs/conf_sphinx_patch.py | 115 | CODE | |
| LOW | flax/serialization.py | 327 | CODE | |
| LOW | flax/serialization.py | 364 | CODE | |
| LOW | flax/serialization.py | 379 | CODE | |
| LOW | flax/cursor.py | 60 | CODE | |
| LOW | flax/cursor.py | 224 | CODE | |
| LOW | flax/core/lift.py | 125 | CODE | |
| LOW | flax/core/lift.py | 259 | CODE | |
| LOW | flax/nnx/pytreelib.py | 313 | CODE | |
| LOW | flax/nnx/pytreelib.py | 518 | CODE | |
| LOW | flax/nnx/pytreelib.py | 680 | CODE | |
| LOW | flax/nnx/rnglib.py | 1256 | CODE | |
| LOW | flax/nnx/rnglib.py | 461 | CODE | |
| LOW | flax/nnx/rnglib.py | 509 | CODE | |
| LOW | flax/nnx/summary.py | 70 | CODE | |
| LOW | flax/nnx/summary.py | 255 | CODE | |
| LOW | flax/nnx/summary.py | 566 | CODE | |
| LOW | flax/nnx/reprlib.py | 100 | CODE | |
| LOW | flax/nnx/variablelib.py | 1419 | CODE | |
| LOW | flax/nnx/module.py | 619 | CODE | |
| LOW | flax/nnx/module.py | 789 | CODE | |
| LOW | flax/nnx/module.py | 928 | CODE | |
| LOW | flax/nnx/module.py | 955 | CODE | |
| LOW | flax/nnx/module.py | 85 | CODE | |
| LOW | flax/nnx/module.py | 186 | CODE | |
| LOW | flax/nnx/module.py | 307 | CODE | |
| LOW | flax/nnx/module.py | 874 | CODE | |
| LOW | flax/nnx/module.py | 932 | CODE | |
| LOW | flax/nnx/graphlib.py | 882 | CODE | |
| LOW | flax/nnx/graphlib.py | 1066 | CODE | |
| LOW | flax/nnx/graphlib.py | 1178 | CODE | |
| LOW | flax/nnx/graphlib.py | 1388 | CODE | |
| LOW | flax/nnx/graphlib.py | 1444 | CODE | |
| LOW | flax/nnx/graphlib.py | 3233 | CODE | |
| LOW | flax/nnx/graphlib.py | 3462 | CODE | |
| LOW | flax/nnx/graphlib.py | 3657 | CODE | |
| LOW | flax/nnx/graphlib.py | 1203 | CODE | |
| LOW | flax/nnx/graphlib.py | 1302 | CODE | |
| LOW | flax/nnx/graphlib.py | 1911 | CODE | |
| LOW | flax/nnx/helpers.py | 260 | CODE | |
| LOW | flax/nnx/filterlib.py | 32 | CODE | |
| LOW | flax/nnx/extract.py | 82 | CODE | |
| LOW | flax/nnx/extract.py | 147 | CODE | |
| LOW | flax/nnx/extract.py | 338 | CODE | |
| LOW | flax/nnx/nn/recurrent.py | 1058 | CODE | |
| LOW | flax/nnx/nn/linear.py | 52 | CODE | |
| LOW | flax/nnx/bridge/wrappers.py | 178 | CODE | |
| LOW | flax/nnx/bridge/wrappers.py | 396 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 234 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 892 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 977 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 1064 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 1180 | CODE | |
| 33 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/core/design/core_attention_test.py | 99 | CODE | |
| LOW | tests/nnx/bridge/wrappers_test.py | 243 | CODE | |
| LOW | tests/linen/linen_transforms_test.py | 459 | CODE | |
| LOW | tests/linen/linen_transforms_test.py | 507 | CODE | |
| LOW | tests/linen/linen_transforms_test.py | 553 | CODE | |
| LOW | tests/linen/linen_transforms_test.py | 608 | CODE | |
| LOW | tests/linen/linen_transforms_test.py | 664 | CODE | |
| LOW | tests/linen/linen_transforms_test.py | 707 | CODE | |
| LOW | flax/core/lift.py | 872 | CODE | |
| LOW | flax/core/nn/attention.py | 34 | CODE | |
| LOW | flax/core/nn/attention.py | 412 | CODE | |
| LOW | flax/core/nn/attention.py | 169 | CODE | |
| LOW | flax/core/nn/linear.py | 183 | CODE | |
| LOW | flax/core/nn/linear.py | 261 | CODE | |
| LOW | flax/core/nn/normalization.py | 28 | CODE | |
| LOW | flax/core/nn/normalization.py | 129 | CODE | |
| LOW | flax/nnx/pytreelib.py | 62 | CODE | |
| LOW | flax/nnx/pytreelib.py | 223 | CODE | |
| LOW | flax/nnx/pytreelib.py | 274 | CODE | |
| LOW | flax/nnx/pytreelib.py | 287 | CODE | |
| LOW | flax/nnx/summary.py | 255 | CODE | |
| LOW | flax/nnx/nn/attention.py | 63 | CODE | |
| LOW | flax/nnx/nn/attention.py | 211 | CODE | |
| LOW | flax/nnx/nn/attention.py | 567 | CODE | |
| LOW | flax/nnx/nn/attention.py | 923 | CODE | |
| LOW | flax/nnx/nn/attention.py | 737 | CODE | |
| LOW | flax/nnx/nn/recurrent.py | 114 | CODE | |
| LOW | flax/nnx/nn/recurrent.py | 306 | CODE | |
| LOW | flax/nnx/nn/recurrent.py | 473 | CODE | |
| LOW | flax/nnx/nn/recurrent.py | 633 | CODE | |
| LOW | flax/nnx/nn/recurrent.py | 786 | CODE | |
| LOW | flax/nnx/nn/linear.py | 156 | CODE | |
| LOW | flax/nnx/nn/linear.py | 357 | CODE | |
| LOW | flax/nnx/nn/linear.py | 482 | CODE | |
| LOW | flax/nnx/nn/linear.py | 715 | CODE | |
| LOW | flax/nnx/nn/linear.py | 1018 | CODE | |
| LOW | flax/nnx/nn/lora.py | 89 | CODE | |
| LOW | flax/nnx/nn/lora.py | 179 | CODE | |
| LOW | flax/nnx/nn/normalization.py | 289 | CODE | |
| LOW | flax/nnx/nn/normalization.py | 500 | CODE | |
| LOW | flax/nnx/nn/normalization.py | 645 | CODE | |
| LOW | flax/nnx/nn/normalization.py | 802 | CODE | |
| LOW | flax/nnx/nn/normalization.py | 988 | CODE | |
| LOW | flax/nnx/nn/normalization.py | 1158 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 364 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 380 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 396 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 633 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 652 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 671 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 1461 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 1479 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 1497 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 2074 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 2192 | CODE | |
| LOW | flax/nnx/transforms/iteration.py | 1924 | CODE | |
| LOW | flax/nnx/transforms/compilation.py | 160 | CODE | |
| LOW | flax/nnx/transforms/compilation.py | 184 | CODE | |
| LOW | flax/nnx/transforms/compilation.py | 200 | CODE | |
| LOW | flax/nnx/transforms/compilation.py | 735 | CODE | |
| 28 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/linen/linen_test.py | 1507 | # Create a scan loop with reused ah_f32 and sf_f32. So, the autograd will | COMMENT |
| MEDIUM | docs_nnx/_ext/codediff.py | 187 | # Create a test node as a comment node so it won't show up in the docs. | COMMENT |
| MEDIUM | docs_nnx/_ext/flax_module.py | 72 | # Create a container for the rendered nodes | COMMENT |
| MEDIUM | docs/_ext/codediff.py | 187 | # Create a test node as a comment node so it won't show up in the docs. | COMMENT |
| MEDIUM | docs/_ext/flax_module.py | 72 | # Create a container for the rendered nodes | COMMENT |
| MEDIUM | flax/nnx/summary.py | 394 | # Create a dictionary-version of the object's class. This makes | COMMENT |
| MEDIUM | flax/nnx/module.py | 898 | # Create the captures tuple | STRING |
| MEDIUM | flax/nnx/bridge/wrappers.py | 486 | >>> # Create a specialized Linen wrapper for linears.DenseGeneral | STRING |
| MEDIUM | flax/training/checkpoints.py | 900 | # Creating the directory containing GDAs explicitly. This should happen only | COMMENT |
| MEDIUM | flax/linen/fp8_ops.py | 42 | # Define a custom dtype for FP8 meta params. | COMMENT |
| MEDIUM | examples/mnist/train_test.py | 57 | # Create a temporary directory where tensorboard metrics are written. | COMMENT |
| MEDIUM | examples/mnist/train.py | 109 | # Create a shuffled dataset by allocating a buffer size of 1024 to randomly | COMMENT |
| MEDIUM | examples/ogbg_molpcba/train_test.py | 274 | # Create the optimizer. | COMMENT |
| MEDIUM | examples/ogbg_molpcba/train_test.py | 277 | # Create the training state. | COMMENT |
| MEDIUM | examples/ogbg_molpcba/train_test.py | 317 | # Create the optimizer. | COMMENT |
| MEDIUM | examples/ogbg_molpcba/train_test.py | 320 | # Create the evaluation state. | COMMENT |
| MEDIUM | examples/ogbg_molpcba/train_test.py | 338 | # Create a temporary directory where TensorBoard metrics are written. | COMMENT |
| MEDIUM | examples/ogbg_molpcba/train.py | 331 | # Create the optimizer. | COMMENT |
| MEDIUM | examples/ogbg_molpcba/train.py | 334 | # Create the training state. | COMMENT |
| MEDIUM | examples/ogbg_molpcba/train.py | 348 | # Create the evaluation state, corresponding to a deterministic model. | COMMENT |
| MEDIUM | examples/nnx_toy_examples/hijax_demo.py | 217 | # Create a copy of the model structure and set its attributes to eval model. | COMMENT |
| MEDIUM | examples/imagenet/train_test.py | 70 | # Create a temporary directory where tensorboard metrics are written. | COMMENT |
| MEDIUM | examples/nlp_seq/input_pipeline.py | 153 | # Create the token properties of an artificial root node. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/core/core_lift_test.py | 28 | a = scope.push('a') | CODE |
| HIGH | tests/core/core_lift_test.py | 47 | dense(scope.push('dense'), np.ones((3, 2)), 2) | CODE |
| HIGH | tests/core/core_lift_test.py | 236 | subscope = scope.push(name='a') | CODE |
| HIGH | tests/core/core_scope_test.py | 164 | nn.dense(scope.push('dense'), np.ones((1, 2)), 2) | CODE |
| HIGH | tests/core/core_scope_test.py | 254 | subscope = scope.push(name='a') | CODE |
| HIGH | tests/core/design/core_resnet_test.py | 73 | block_scope = scope.push(f'block_{i}_{j}') | CODE |
| HIGH | flax/core/lift.py | 116 | scope = scope.push(name, reuse=True) | CODE |
| HIGH | flax/core/lift.py | 1691 | with jit_context.push((scope_fn, repack_fn)): | CODE |
| HIGH | flax/core/lift.py | 1839 | with fold_rngs_context.push((scope_fn, repack_fn)): | CODE |
| HIGH | flax/core/scope.py | 683 | scope = self.push(name) | CODE |
| HIGH | flax/linen/module.py | 387 | _global_interceptor_stack.push(interceptor) | STRING |
| HIGH | flax/linen/module.py | 1371 | self, 'scope', self.parent.scope.push(self.name, reuse=reuse_scopes) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/traceback_util_test.py | 64 | CODE | |
| MEDIUM | tests/traceback_util_test.py | 99 | CODE | |
| MEDIUM | tests/traceback_util_test.py | 140 | CODE | |
| MEDIUM | tests/linen/linen_transforms_test.py | 157 | CODE | |
| MEDIUM | tests/linen/linen_transforms_test.py | 163 | CODE | |
| MEDIUM | tests/linen/linen_transforms_test.py | 164 | CODE | |
| MEDIUM | tests/linen/linen_transforms_test.py | 165 | CODE | |
| MEDIUM | tests/linen/linen_transforms_test.py | 166 | CODE | |
| MEDIUM | tests/linen/linen_transforms_test.py | 167 | CODE | |
| MEDIUM | tests/linen/linen_transforms_test.py | 169 | CODE | |
| MEDIUM | tests/linen/linen_transforms_test.py | 172 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs_nnx/conf_sphinx_patch.py | 52 | except Exception as exc: | CODE |
| LOW | docs_nnx/hijax/hijax.md | 126 | except Exception as e: | CODE |
| LOW | docs_nnx/hijax/hijax.md | 222 | except Exception as e: | CODE |
| LOW | docs_nnx/hijax/hijax.md | 243 | except Exception as e: | CODE |
| MEDIUM | docs_nnx/hijax/hijax.md | 240 | def get_error(f, *args): | CODE |
| LOW | docs_nnx/guides/pytree.md | 326 | except Exception as e: | STRING |
| MEDIUM | docs_nnx/guides/pytree.md | 327 | print(f"Error: {e}") | STRING |
| LOW | docs_nnx/guides/surgery.md | 152 | except Exception as e: | CODE |
| LOW | docs_nnx/guides/transforms.md | 336 | except Exception as e: | CODE |
| LOW | docs/conf_sphinx_patch.py | 52 | except Exception as exc: | CODE |
| LOW | flax/nnx/summary.py | 604 | except Exception: | CODE |
| LOW | flax/nnx/summary.py | 626 | except Exception: | CODE |
| LOW | flax/training/prefetch_iterator.py | 95 | except Exception as e: # pylint: disable=broad-except | CODE |
| LOW | flax/linen/transforms.py | 555 | except Exception as e: | CODE |
| LOW | examples/gemma/tokenizer.py | 162 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/linen/linen_transforms_test.py | 850 | @nn.remat # we just use remat as a convenient test of transform logic | CODE |
| LOW | flax/core/scope.py | 717 | # If this is the top-level Scope, just add an empty collection. | COMMENT |
| LOW | flax/nnx/nn/recurrent.py | 905 | # carry for each sequence. Otherwise we just use the last carry. | STRING |
| LOW | flax/linen/transforms.py | 485 | # if we have already seen the module we just use the index | COMMENT |
| LOW | flax/linen/recurrent.py | 1139 | # carry for each sequence. Otherwise we just use the last carry. | STRING |
| LOW | examples/gemma/input_pipeline_test.py | 26 | # We just use different values here to verify that the input pipeline uses the | COMMENT |
| LOW | examples/wmt/input_pipeline_test.py | 27 | # We just use different values here to verify that the input pipeline uses the | COMMENT |
| LOW | examples/nnx_toy_examples/hijax_demo.py | 266 | # Sampling is trivial, just use 'model_eval' | COMMENT |
| LOW | examples/lm1b/input_pipeline_test.py | 26 | # We just use different values here to verify that the input pipeline uses the | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | flax/nnx/pytreelib.py | 652 | def _setattr(self, name, value: tp.Any) -> None: | CODE |
| LOW⚡ | flax/nnx/variablelib.py | 1408 | def set_metadata(self, metadata: dict[str, tp.Any], /) -> None: | CODE |
| LOW⚡ | flax/nnx/variablelib.py | 1412 | def set_metadata(self, name: str, value: tp.Any, /) -> None: | CODE |
| LOW⚡ | flax/nnx/variablelib.py | 1416 | def set_metadata(self, **metadata: tp.Any) -> None: | CODE |
| LOW⚡ | flax/nnx/variablelib.py | 1419 | def set_metadata(self, *args, **kwargs) -> None: | CODE |
| LOW | flax/nnx/graphlib.py | 3152 | def _set_metadata(path: PathParts, variable: V) -> None: | CODE |
| LOW | flax/nnx/helpers.py | 129 | def _set_elem(self, key: int, value: A) -> None: | CODE |
| LOW | flax/nnx/nn/activations.py | 51 | __all__ = [ | CODE |
| LOW | flax/nnx/bridge/module.py | 218 | def _setattr(self, name: str, value: tp.Any) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | docs_nnx/guides/flax_gspmd.md | 300 | assert logical_model.layers.dot1.kernel.sharding.is_equivalent_to( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | examples/nnx_toy_examples/hijax_demo.py | 39 | # In this version we want the Modules to be pytrees so they can be used with JAX transforms | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | flax/errors.py | 685 | empty_variables = {} # you can also use the real variables | STRING |
| MEDIUM | flax/nnx/graphlib.py | 2154 | Here is a simple example showing the use of ``update_context``:: | STRING |
| LOW | examples/gemma/main.py | 53 | # Please make sure you have installed tensorflow-cpu package without GPU support. | COMMENT |
| MEDIUM | examples/linen_design_test/autoencoder.py | 75 | # Now you can use `ae` as a normal object, calling any methods defined on AutoEncoder | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/nnx/nn/recurrent_test.py | 304 | # Check if the outputs are in reverse order | COMMENT |
| LOW | tests/nnx/nn/recurrent_test.py | 386 | # Check if the outputs are in the original order despite processing in reverse | COMMENT |
| LOW | flax/training/checkpoints.py | 275 | # Check if reading from GCS and the array dir is potentially corrupted. | COMMENT |
| LOW | flax/training/checkpoints.py | 281 | # Check if the given target array types are valid. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | flax/nnx/bridge/variables.py | 57 | # TODO: implement this, supporting hooks | COMMENT |
| LOW | flax/nnx/bridge/variables.py | 61 | # TODO: implement this, supporting hooks | COMMENT |
| LOW | flax/nnx/training/metrics.py | 26 | # TODO: add tests and docstrings | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/nnx/module_test.py | 364 | def helper(self, x): | CODE |
| LOW | tests/linen/linen_transforms_test.py | 1515 | def helper(self, x, m): | CODE |
| LOW | tests/linen/linen_transforms_test.py | 1531 | def helper(self, x, m): | CODE |
| LOW | tests/linen/linen_transforms_test.py | 1550 | def helper(self, x, m): | CODE |
| LOW | tests/linen/linen_transforms_test.py | 1594 | def helper(self, x, ms): | CODE |
| LOW | tests/linen/linen_transforms_test.py | 1606 | def helper(self, x, ms): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | flax/nnx/module.py | 223 | >>> # Step 1: Initialize perturbations | STRING |
| LOW | .github/analytics/get_repo_metrics.py | 81 | # WARNING: The cursor injection depends on the specific structure of the | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | examples/imagenet/README.md | 26 | - [Running fake data benchmarks](#running-fake-data-benchmarks) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | flax/nnx/module.py | 223 | >>> # Step 1: Initialize perturbations | STRING |