-
Notifications
You must be signed in to change notification settings - Fork 53
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
Freeze arguments to pick_calculator #2695
Freeze arguments to pick_calculator #2695
Conversation
…uacc into mlp_calculator_freeze_args
@zulissimeta: Interesting. Thank you for the PR here. A question: what is the benefit in using d = {"cow": "moo", "cat": "meow"}
d_frozen = frozenset(d.items()) # frozen now!
d_unfrozen = dict(d_frozen) # same as d again! You would still need a decorator, but I haven't quite figured out yet the value-add for |
Ah, While not particularly elegant, I am okay with the proposed approach if there's no other option since |
Thanks, think it should be good to go now. |
@zulissimeta: Thanks! There were a number of issues left unresolved with this one; I have solved most but ask if you can resolve one remaining issue. For future PRs, if you can confirm that the CI suite runs and passes (or discuss any points where trouble remains), that would be a big help in ensuring I can merge things efficiently. The following issues have since been resolved:
The following issue remains:
Additionally:
|
Thanks, think I got the test. Would be good to confirm that the fairchem test did run in the HPC test too. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2695 +/- ##
==========================================
- Coverage 97.48% 97.43% -0.05%
==========================================
Files 90 90
Lines 3850 3859 +9
==========================================
+ Hits 3753 3760 +7
- Misses 97 99 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Thanks, @zulissimeta! I will go ahead and merge this. As a head's up, I have not implemented the |
875e93d
into
Quantum-Accelerators:main
Summary of Changes
lru_cache
is used to make sure that each MLP calculator is only instantiated once (great!). However, if you want to pass dictionaries through to the underlying calculator (say, config overrides to the fairchem calculator), you will get errors because dictionaries are mutable and lru_cache is unhappy. We can patch this by converting any dictionary kwargs to a frozendict.Requirements
main
).Note: If you are an external contributor, you will see a comment from @buildbot-princeton. This is solely for the maintainers.