Build_function returning an Expr, which is not callable. How do I make it callable?

No, please use the recommended keyword arguments in build_function. There’s expression = Val{true}, change it to expression = Val{false} and you’ll get a RuntimeGeneratedFunction that won’t have world-age issues. I.e.:

f_expr = build_function(loss, lossvars, expression = Val{false})
3 Likes