Fix tree_map_with_path for namedtuples#3674
Open
chrismicah wants to merge 2 commits into
Open
Conversation
Author
|
Added one more regression in chrismicah/codex/fix-tree-map-with-path-namedtuple@243b1c94 covering tree_map_with_path over a NamedTuple with a matching rest tree, so the fix is not only single-tree reconstruction.\n\nVerification:\n- Passed a Metal-free pure-Python import of python/mlx/utils.py exercising NamedTuple single-tree and rest-tree cases.\n- python python/tests/test_tree.py cannot run in this headless environment because installed mlx fails during import with [metal::load_device] No Metal device available before reaching test_tree. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary\n- preserve namedtuple reconstruction in tree_map_with_path, matching tree_map behavior\n- add tree utils coverage for namedtuple tree_map_with_path paths and return type\n\n## Tests\n- python -m black --check python/mlx/utils.py python/tests/test_tree.py\n- PYTHONPATH=/private/tmp/mlx-upstream-pr-work/python python - <<'PY' ... pure namedtuple tree_map_with_path repro passed\n\nNote: python python/tests/test_tree.py could not run in this sandbox because importing mlx.nn aborts with no Metal device available before reaching the tree tests.