Skip to content
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

Integrate new autograph package into catalyst #401

Merged
merged 14 commits into from
Feb 26, 2024
Merged

Conversation

dime10
Copy link
Collaborator

@dime10 dime10 commented Dec 9, 2023

To remove our dependency on tensorflow, we will be releasing a standalone autograph package. This PR makes the necessary changes in Catalyst to use the new package.

Changes include:

  • Substitute tensorflow imports with standalone autograph imports.
  • Inherit from the existing transformer class to reuse upstream code more effectively. This means we now run all AST passes that standard AutoGraph runs.
  • Eliminate the ag_utils module.
  • Make diastatic-malt a hard dependency of pennylane-catalyst.

[sc-46389]
[sc-57401]

Substitute tensorflow imports with standalone autograph imports.

Inherit from the existing transformer class to reuse upstream code more
effectively. This means we now run all AST passes that standard
AutoGraph runs.

Eliminate the ag_utils module.
setup.py Outdated Show resolved Hide resolved
@dime10
Copy link
Collaborator Author

dime10 commented Dec 11, 2023

@josh146 From the technical side I'll consider this ready. As soon as the package is released we can move forward with the PR.

@dime10 dime10 changed the title [WIP] Integrate new autograph package into catalyst Integrate new autograph package into catalyst Dec 11, 2023
@dime10 dime10 marked this pull request as ready for review December 11, 2023 20:47
@dime10 dime10 added this to the v0.5.0 milestone Feb 21, 2024
@josh146
Copy link
Member

josh146 commented Feb 21, 2024

7c6410d seems like an easy change 🤞

@rmoyard rmoyard mentioned this pull request Feb 22, 2024
@dime10 dime10 added reviewer:require-wheels Pull Requests will need wheel building job successful before being merged author:build-wheels Run the wheel building workflows on this Pull Request and removed do-not-merge labels Feb 23, 2024
@dime10 dime10 requested a review from josh146 February 26, 2024 17:54
Copy link
Member

@josh146 josh146 left a comment

Choose a reason for hiding this comment

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

Just a small change to enable the docs to properly build!

frontend/catalyst/ag_primitives.py Show resolved Hide resolved
frontend/catalyst/autograph.py Show resolved Hide resolved
frontend/catalyst/__init__.py Show resolved Hide resolved
@dime10 dime10 requested a review from josh146 February 26, 2024 20:27
.. which appears to print (or not print) a space character depending on
the system.
@dime10 dime10 removed reviewer:require-wheels Pull Requests will need wheel building job successful before being merged author:build-wheels Run the wheel building workflows on this Pull Request labels Feb 26, 2024
Copy link

codecov bot commented Feb 26, 2024

Codecov Report

Attention: Patch coverage is 92.15686% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 99.54%. Comparing base (27f6b8e) to head (f3e7d41).
Report is 3 commits behind head on main.

Files Patch % Lines
frontend/catalyst/autograph.py 89.18% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #401      +/-   ##
==========================================
- Coverage   99.56%   99.54%   -0.03%     
==========================================
  Files          52       51       -1     
  Lines        8510     8485      -25     
  Branches      568      569       +1     
==========================================
- Hits         8473     8446      -27     
- Misses         20       21       +1     
- Partials       17       18       +1     

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

@dime10 dime10 merged commit 3e81baf into main Feb 26, 2024
53 of 55 checks passed
@dime10 dime10 deleted the autograph-integration branch February 26, 2024 23:34
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.

2 participants