-
Notifications
You must be signed in to change notification settings - Fork 129
Code cleanups #842
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
Code cleanups #842
Conversation
d731ac9
to
bf535a8
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #842 +/- ##
==========================================
+ Coverage 80.97% 81.01% +0.03%
==========================================
Files 169 169
Lines 47015 46809 -206
Branches 11497 11475 -22
==========================================
- Hits 38072 37923 -149
+ Misses 6728 6679 -49
+ Partials 2215 2207 -8
|
I wouldn't remove kanren if we don't have to. While the library itself (nor PyMC) is using it at the moment, it was added as a way to implement more powerful rewrites than what is possible with PyTensor built-in machinery. Since that's one of the strong points of PyTensor vs other tensor libraries, I would like to keep that around unless there's a strong objection? |
It's sort of in the same category as egg-log -- something we could use but don't currently. Maybe we need to discuss how/where/if it can be used in a future design meeting? I've asked @ricardoV94 about it in private a couple times and the response was always "idk, lol" We could remove it after that meeting if we decide it's not worth it, or keep it otherwise. |
Sure, no worries. I'll debug what kanren doesn't like with the frozendict commit then. |
Otherwise I checked the rest of the PR and changes look fine. Had some doubts about replacing frozendict in the elemwise pattern, but I see how the less readable tuple may still be a good trade-off vs needing a frozendict implementation (custom or via a dependency). Still a bit sad that it's not a thing in the Python standard lib |
If you find a bug in kanren, open an issue over there? |
44a1ce0
to
8fec4e9
Compare
@ricardoV94 I ended up reverting the removal of the custom
Presumably, a fix would be to have |
What test was failing specifically? |
|
The empty tuple should be something we or kanren can fix. But let's leave that for later. Can you open a draft PR and linked issue with the frozendict removed so it's easier to investigate when we have the time? We can get the rest merged in the meantime |
Sure, I will do that when this one is merged (it's easier on top of this branch). |
Description
Counter
anddefaultdict
where appropriateOrderedDict
becausedict
is ordered since Python 3.7OrderedSet
in terms of adict
Related Issue
Checklist
Type of change