Skip to content

Resolve tf.TensorShape literals in shape arguments#706

Merged
khatchad merged 1 commit into
masterfrom
789-tensorshape
Jul 26, 2026
Merged

Resolve tf.TensorShape literals in shape arguments#706
khatchad merged 1 commit into
masterfrom
789-tensorshape

Conversation

@khatchad

Copy link
Copy Markdown
Member

Closes wala#789.

tf.TensorShape was unsummarized, so a declared shape wrapped in the constructor form (output_shapes=tf.TensorShape([2])) was present but unparseable and honestly degraded the shape axis to while the dtype survived. The constructor is now modeled like TensorSpec: it stores its dims argument on the result, and the shape-argument parser recurses into the stored field at both the top-level and nested positions. The declared-shapes guard flips to full precision: the TensorShape([2]) form composes (2,) through the from_generator transformation chain exactly like the positional and keyword tuple forms.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GoqNGum9YcBd81MuypTWwX

The constructor is modeled like `TensorSpec`: it stores its `dims` argument on the result, and the shape-argument parser recurses into the stored field at both the top-level and nested positions. The declared-shapes guard flips to its full precision: the `TensorShape([2])` form now composes `(2,)` through the `from_generator` transformation chain exactly like the tuple forms.
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.52%. Comparing base (51171f2) to head (88ee34f).

Files with missing lines Patch % Lines
...bm/wala/cast/python/ml/client/TensorGenerator.java 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master     #706   +/-   ##
=========================================
  Coverage     75.51%   75.52%           
- Complexity     4831     4833    +2     
=========================================
  Files           340      340           
  Lines         28133    28142    +9     
  Branches       5254     5257    +3     
=========================================
+ Hits          21245    21254    +9     
- Misses         4781     4782    +1     
+ Partials       2107     2106    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@khatchad
khatchad added this pull request to the merge queue Jul 26, 2026
Merged via the queue into master with commit 6e2dd8f Jul 26, 2026
22 checks passed
@khatchad
khatchad deleted the 789-tensorshape branch July 26, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resolve tf.TensorShape literals in output_shapes arguments

1 participant