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

Check black list when contracting operators #26

Merged
merged 5 commits into from
Jul 20, 2024
Merged

Conversation

lukem12345
Copy link
Member

@lukem12345 lukem12345 commented Apr 30, 2024

The contract_operators function finds chains of unary operators, and replaces them with a single operator containing a vector of the operators from that chain.

We currently support the ability to only contract when operators are in some given white list of operators. When there is no white list given, we default to allowing any operator to be chained.

It will simplify future Decapode manipulation if we also support a black list of operators. If an operator is in the black list, such an operator will not be chained.

@lukem12345 lukem12345 self-assigned this Apr 30, 2024
@lukem12345 lukem12345 marked this pull request as ready for review May 1, 2024 00:21
@lukem12345
Copy link
Member Author

Before

flowchart LR

A -->|g| B
B -->|f| C
C -->|e| D
D -->|d| E
E -->|c| F
F -->|b| G
G -->|a| H

Loading
contract_operators(t15_orig,
    white_list=Set([:a, :b, :c]),
    black_list=Set([:d]))

After

flowchart LR

A -->|g| B
B -->|f| C
C -->|e| D
D -->|d| E
E -->|c,b,a| H

Loading

@lukem12345 lukem12345 requested a review from jpfairbanks May 1, 2024 00:49
@lukem12345 lukem12345 added the enhancement New feature or request label May 1, 2024
@lukem12345 lukem12345 requested a review from quffaro May 14, 2024 01:40
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.80%. Comparing base (e21e6c7) to head (4860877).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #26      +/-   ##
==========================================
+ Coverage   86.62%   86.80%   +0.17%     
==========================================
  Files          13       13              
  Lines         890      894       +4     
==========================================
+ Hits          771      776       +5     
+ Misses        119      118       -1     

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

@lukem12345 lukem12345 requested a review from GeorgeR227 July 12, 2024 15:45
@lukem12345 lukem12345 merged commit 55d2972 into main Jul 20, 2024
10 checks passed
@lukem12345 lukem12345 deleted the llm/blacklist branch July 20, 2024 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant