-
Notifications
You must be signed in to change notification settings - Fork 17
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
Overflow turns the whole batch to NaN
s
#87
Comments
Thanks, glad you are enjoying it! Yes, this is expected. The evaluation returns early whenever any element of any step in the evaluation is NaN or Inf: DynamicExpressions.jl/src/Evaluate.jl Line 178 in 9e95f05
DynamicExpressions.jl/src/Evaluate.jl Lines 22 to 28 in 9e95f05
DynamicExpressions.jl/src/Utils.jl Lines 15 to 17 in 9e95f05
This behavior is done with symbolic regression in mind, so that expressions with singularities don't waste more cycles than they have to. Within SymbolicRegression, the result, completed = eval_tree_array(tree, X, operators)
if !completed
# evaluation quit early, so return infinite loss value
end |
Thanks for the quick reply! that makes sense. Is there a way to get |
At the moment, no, but it might be nice to have that behavior. If you are interested and have some time I can help point out what needs to be edited for this to work? |
That sounds great, I'd be happy to take a look at it if you give me some pointers!:) |
I think DynamicExpressions.jl/src/Evaluate.jl Lines 66 to 72 in 9e95f05
needs to have a new parameter early_exit::Union{Bool,Val}=Val(true) similar to turbo . Then, @return_on_nonfinite_array DynamicExpressions.jl/src/Evaluate.jl Lines 22 to 28 in 9e95f05
early_exit which basically toggles the behavior on/off. Similar for @return_on_check . Then, other checks like DynamicExpressions.jl/src/Evaluate.jl Line 87 in 9e95f05
In other words, if Note that most of the DynamicExpressions.jl/ext/DynamicExpressionsLoopVectorizationExt.jl Lines 20 to 28 in 9e95f05
LoopVectorization.@turbo on the loops.)
For With this implemented you would be able to call Sorry this was a bit convoluted – ask any questions needed! |
Hey! Thanks a lot for this, I really like the package!:)
I seems like an overflow in one of the samples causes the whole batch to be turned into
NaN
s:The text was updated successfully, but these errors were encountered: