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

Fix reshape #20

Merged
merged 9 commits into from
Feb 25, 2025
Merged

Fix reshape #20

merged 9 commits into from
Feb 25, 2025

Conversation

benedict-96
Copy link
Collaborator

@benedict-96 benedict-96 commented Dec 8, 2024

Fixes #19
Fixes #18
Introduces a keyword argument reduce that specifies which operation should be used to perform mapreduce in build_nn_function (and similar functions).

But introduces type pyracy! Maybe Fixes #18 should be fixed by doing a pr in SymbolicUtils.

Copy link

codecov bot commented Dec 8, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 77.32%. Comparing base (5343bae) to head (81c7135).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
src/build_function/build_function_double_input.jl 72.72% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #20      +/-   ##
==========================================
+ Coverage   74.21%   77.32%   +3.10%     
==========================================
  Files          11       12       +1     
  Lines         256      269      +13     
==========================================
+ Hits          190      208      +18     
+ Misses         66       61       -5     

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

…s of neural network parameters or other expressions.
@benedict-96 benedict-96 marked this pull request as draft December 9, 2024 09:55
@benedict-96
Copy link
Collaborator Author

NOTE: This pr is set to "draft" until JuliaSymbolics/SymbolicUtils.jl#644 is fixed.

@benedict-96
Copy link
Collaborator Author

The issue mentioned above JuliaSymbolics/SymbolicUtils.jl#644 still hasn't been fixed since JuliaSymbolics/SymbolicUtils.jl#679 has not been merged. I will solve that problem for now by introducing the slight type piracy via:

function Symbolics.SymbolicUtils.Code.create_array(::Type{<:Base.ReshapedArray{T, N, P}}, S, nd::Val, d::Val, elems...) where {T, N, P}
    Symbolics.SymbolicUtils.Code.create_array(P, S, nd, d, elems...)
end

@benedict-96 benedict-96 marked this pull request as ready for review February 24, 2025 15:29
@benedict-96 benedict-96 marked this pull request as draft February 24, 2025 15:48
@benedict-96 benedict-96 marked this pull request as ready for review February 24, 2025 17:48
@michakraus michakraus merged commit ff8c6ee into main Feb 25, 2025
12 checks passed
@michakraus michakraus deleted the fix-reshape branch February 25, 2025 10:07
@benedict-96 benedict-96 mentioned this pull request Mar 11, 2025
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.

reshape used in the wrong way create_array for ReshapedArray not defined
2 participants