Skip to content

Loosen type rules for Mooncake#38

Merged
kshyatt merged 3 commits into
QuantumKitHub:mainfrom
kshyatt:ksh/mooncake_loosen
May 21, 2026
Merged

Loosen type rules for Mooncake#38
kshyatt merged 3 commits into
QuantumKitHub:mainfrom
kshyatt:ksh/mooncake_loosen

Conversation

@kshyatt
Copy link
Copy Markdown
Member

@kshyatt kshyatt commented May 21, 2026

Since AbstractTensorMap is not a subtype of AbstractArray, these rules won't be used for tensor maps without this loosening 😭

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.07%. Comparing base (b4acb15) to head (2b056ef).
⚠️ Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
ext/VectorInterfaceMooncakeExt.jl 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
+ Coverage   89.23%   93.07%   +3.84%     
==========================================
  Files           8       11       +3     
  Lines         325      491     +166     
==========================================
+ Hits          290      457     +167     
+ Misses         35       34       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kshyatt kshyatt requested a review from Jutho May 21, 2026 11:56
@lkdvos
Copy link
Copy Markdown
Member

lkdvos commented May 21, 2026

I might actually be in favor of defining the rrules but not marking everything as primitive. (I actually thought you did this on purpose in the last PR :))

The main reason is that these rules only work on things for which arrayify works, and in the cases where it doesn't it might be nicer to just have this fallback to actually using AD? For example I don't know what arrayify does with Tuples

@kshyatt
Copy link
Copy Markdown
Member Author

kshyatt commented May 21, 2026

Hm, could do indeed. I guess Mooncake secretly did that previously for MinimalVec

@kshyatt
Copy link
Copy Markdown
Member Author

kshyatt commented May 21, 2026

What do you think about keeping @is_primitive for the AbstractArray case then, and having people add their own @is_primitive as they need (and as they define arrayify)?

@lkdvos
Copy link
Copy Markdown
Member

lkdvos commented May 21, 2026

yes, I think that is what I also had in mind :) I feel like that strikes a reasonable balance between the two?

@kshyatt
Copy link
Copy Markdown
Member Author

kshyatt commented May 21, 2026

Yeah sounds good, let's go for it

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ext/VectorInterfaceMooncakeExt.jl 75.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
ext/VectorInterfaceMooncakeExt.jl 95.23% <75.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kshyatt
Copy link
Copy Markdown
Member Author

kshyatt commented May 21, 2026

Aight, good to go?

@kshyatt kshyatt merged commit f8bc27b into QuantumKitHub:main May 21, 2026
5 checks passed
@kshyatt kshyatt deleted the ksh/mooncake_loosen branch May 21, 2026 14:17
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