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

[Frontend] Add support for logical or, and and not in autograph #325

Merged
merged 64 commits into from
Nov 1, 2023

Conversation

sergei-mironov
Copy link
Contributor

@sergei-mironov sergei-mironov commented Oct 19, 2023

Support Python and-, or- and not- operators in Autograph-converted programs.

[sc-41303]

Test cases mentioned:

  • cases where the boolean statement is a mix of dynamic and static variables,
  • test cases where the parameters are of different types (jax arrays, booleans, numpy arrays)
  • cases where the boolean is used as conditionals for if statements
  • cases where the boolean is used as the conditional for while statemen
  • test cases where the parameters are arbitrary Python objects which can decay to Boolean (like strings, lists, etc, anything that Python allows in an if statement)

@sergei-mironov sergei-mironov changed the title [Frontend] Add support for logical or, and and not [Frontend] Add autograph support for logical or, and and not Oct 19, 2023
@sergei-mironov sergei-mironov changed the title [Frontend] Add autograph support for logical or, and and not [Frontend] Add support for logical or, and and not in autograph Oct 19, 2023
@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bc8ad36) 99.62% compared to head (50f56fe) 99.62%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #325   +/-   ##
=======================================
  Coverage   99.62%   99.62%           
=======================================
  Files          42       42           
  Lines        7438     7454   +16     
  Branches      434      439    +5     
=======================================
+ Hits         7410     7426   +16     
  Misses         14       14           
  Partials       14       14           
Files Coverage Δ
frontend/catalyst/ag_primitives.py 100.00% <100.00%> (ø)
frontend/catalyst/autograph.py 100.00% <100.00%> (ø)

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

@sergei-mironov
Copy link
Contributor Author

sergei-mironov commented Oct 20, 2023

Hi @josh146. I expect this logic ops implementation to have corner-cases, so I 'd like to know what do we want to support in the first place here. Do we have any particular use-cases in mind, e.g. among the tutorial algorithms which I could check?

Copy link
Contributor

@dime10 dime10 left a comment

Choose a reason for hiding this comment

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

Looks good 👍

Base automatically changed from autograph-while-loops to main November 1, 2023 07:27
@sergei-mironov sergei-mironov merged commit 6eb0a26 into main Nov 1, 2023
19 checks passed
@sergei-mironov sergei-mironov deleted the autograph-and-or branch November 1, 2023 10:45
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.

3 participants