Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request replaces the immutabledict library with constantdict throughout the codebase. Beyond the simple library substitution, the PR includes several type annotation changes that narrow types from ScalarExpression to ArithmeticExpression in reduction bounds and related code paths. The mypy baseline file has been completely removed (3017 lines), suggesting significant type checking improvements, though the basedpyright baseline shows some new type warnings related to the changes.
Changes:
- Replaced
immutabledictwithconstantdictacross all Python files in the codebase - Narrowed type annotations for reduction bounds from
ScalarExpressiontoArithmeticExpressionin several modules - Updated documentation URLs (JAX documentation moved to new domain)
- Modified mapper methods in
scalar_expr.pyto userec_arithinstead ofrecfor processing bounds - Removed unused
ScalarExpressionimport frompytato/reductions.py - Added runtime assertion in
pytato/utils.pyto validate arithmetic expression results - Deleted entire mypy baseline file and updated basedpyright baseline
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Updated dependency from immutabledict to constantdict |
| doc/conf.py | Changed intersphinx URLs for jax and constantdict documentation |
| pytato/utils.py | Replaced imports, narrowed return type to ArithmeticExpression, added assertion |
| pytato/scalar_expr.py | Replaced imports, changed mapper methods to use rec_arith for bounds processing |
| pytato/reductions.py | Replaced imports, narrowed type annotations for bounds, removed unused import |
| pytato/transform/lower_to_index_lambda.py | Replaced imports, narrowed type annotations for bounds |
| pytato/transform/materialize.py | Replaced import and usage |
| pytato/transform/einsum_distributive_law.py | Replaced import and usage |
| pytato/transform/dead_code_elimination.py | Replaced import and usage |
| pytato/transform/init.py | Replaced import and usage |
| pytato/target/python/numpy_like.py | Replaced import and usage |
| pytato/target/loopy/init.py | Replaced import and usage |
| pytato/stringifier.py | Replaced import and isinstance check |
| pytato/raising.py | Replaced import and usage |
| pytato/loopy.py | Replaced import, usage, and isinstance check |
| pytato/function.py | Replaced import, usage, and isinstance checks |
| pytato/distributed/partition.py | Replaced import and usage |
| pytato/codegen.py | Replaced import and usage |
| pytato/cmath.py | Replaced import and usage |
| pytato/array.py | Replaced import, usage, and isinstance checks throughout |
| test/test_pytato.py | Updated all test imports and usage |
| .mypy/baseline.json | Deleted entire file (3017 lines removed) |
| .basedpyright/baseline.json | Updated with new type checking warnings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8074e3c to
7f246d0
Compare
7f246d0 to
99eeb01
Compare
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.
No description provided.