Skip to content

Fix tensor dimensions for Jython 3 #261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 30, 2025

Conversation

khatchad
Copy link
Collaborator

@khatchad khatchad commented Jun 13, 2025

Fix #42 and fix #147 and fix #165 and fix #164 and fix #166.

  1. Add logging and comments.
  2. Add workarounds for Tensor type propagation stops upon tensor shape mismatch #195.
  3. The new API being called from Jython 3 now needs new dependencies. See Jython 3 installation is fragile wrt dependencies #258.

@khatchad khatchad self-assigned this Jun 13, 2025
@khatchad khatchad added bug Something isn't working parsing jython labels Jun 13, 2025
@khatchad khatchad requested review from msridhar and juliandolby June 13, 2025 19:06
@khatchad khatchad marked this pull request as ready for review June 13, 2025 19:06
@khatchad khatchad requested a review from Copilot June 13, 2025 19:06
Copilot

This comment was marked as outdated.

Copy link

codecov bot commented Jun 13, 2025

Codecov Report

Attention: Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Project coverage is 58.50%. Comparing base (b271b53) to head (a3aa8ee).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...com/ibm/wala/cast/python/loader/Python3Loader.java 91.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #261      +/-   ##
============================================
+ Coverage     54.97%   58.50%   +3.53%     
- Complexity      502      517      +15     
============================================
  Files           109      109              
  Lines          7684     7286     -398     
  Branches        827      827              
============================================
+ Hits           4224     4263      +39     
+ Misses         3223     2847     -376     
+ Partials        237      176      -61     

☔ View full report in Codecov by Sentry.
📢 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 enabled auto-merge (squash) June 13, 2025 19:10
@khatchad khatchad disabled auto-merge June 13, 2025 19:18
@khatchad khatchad enabled auto-merge (squash) June 13, 2025 19:18
@msridhar
Copy link
Member

@khatchad lost track of this one is it still waiting on a review?

@khatchad
Copy link
Collaborator Author

@khatchad lost track of this one is it still waiting on a review?

@msridhar Yes. Thanks!

@khatchad khatchad requested a review from Copilot June 25, 2025 20:45
Copilot

This comment was marked as outdated.

Copy link
Member

@msridhar msridhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nitpick

@msridhar msridhar disabled auto-merge June 28, 2025 05:54
@khatchad khatchad requested a review from Copilot June 30, 2025 14:38
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses multiple issues related to tensor dimensions for Jython 3 by updating Maven dependencies, renaming artifacts, and adding logging to improve traceability and error handling. Key changes include:

  • Adding new dependencies (asm-all and jnr-constants) to support the updated API.
  • Renaming Jython-related artifactId references to their Jython 3 counterparts.
  • Enhancing logging in Python3Loader to better capture expression evaluations and syntax errors.

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
com.ibm.wala.cast.python.test/pom.xml Added dependencies for asm-all and jnr-constants to support new API requirements
com.ibm.wala.cast.python.ml/pom.xml Updated artifactId from jython to jython3 to match Jython 3 API
com.ibm.wala.cast.python.ml.test/pom.xml Updated artifactId from jython.test to jython3.test for consistency
com.ibm.wala.cast.python.jython3/source/com/ibm/wala/cast/python/util/Python3Interpreter.java Removed try-catch block during Python interpreter initialization
com.ibm.wala.cast.python.jython3/source/com/ibm/wala/cast/python/loader/Python3Loader.java Added enhanced logging for expression evaluation and syntax error handling

@khatchad
Copy link
Collaborator Author

Thanks!

@khatchad khatchad merged commit 8680867 into wala:master Jun 30, 2025
3 checks passed
@khatchad khatchad deleted the contrib_jython3_tensor_dims branch June 30, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working jython parsing
Projects
None yet
2 participants