You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that in some cases, importing NeuralPDE.jl before Interpolations.jl can lead to an error.
MWE
using Pkg
Pkg.activate(mktempdir())
Pkg.add([(; name ="Interpolations", version ="v0.14.7"),
(; name ="Lux", version ="v0.5.6"),
(; name ="NeuralPDE", version ="v5.9.0"),
(; name ="OptimizationOptimisers", version ="v0.1.6")])
using NeuralPDE
using Interpolations
using Lux, OptimizationOptimisers
itp =LinearInterpolation(0:1, 0:1)
@register_symbolic (itp::typeof(itp))(x)
NeuralPDE.dottable_(itp::typeof(itp)) =true@parameters x
@variablesf(..)
eq =f(x) ~itp(x)
bc =f(0) ~0@named pde_system =PDESystem(eq, [bc], [x ∈ (0, 1)], [x], [f(x)])
discretization =PhysicsInformedNN(Dense(1, 1), GridTraining(0.1))
prob =discretize(pde_system, discretization)
solve(prob, Adam(); maxiters =10)
Expected behavior
The import order should not matter, or if the import order matters it should be documented.
Actual behavior
If Interpolations.jl is imported before NeuralPDE.jl, the script works fine. However, if NeuralPDE.jl is imported before Interpolations.jl, like in the MWE, the script leads to the following error:
ERROR: Compiling Tuple{RuntimeGeneratedFunctions.generated_callfunc), …}:
MethodError: no method matching size(::Interpolations.Extrapolation{…})
The applicable method may be too new: running in world age 33677, while current world is 33837.
Hi,
I noticed that in some cases, importing NeuralPDE.jl before Interpolations.jl can lead to an error.
MWE
Expected behavior
The import order should not matter, or if the import order matters it should be documented.
Actual behavior
If Interpolations.jl is imported before NeuralPDE.jl, the script works fine. However, if NeuralPDE.jl is imported before Interpolations.jl, like in the MWE, the script leads to the following error:
Full error
Stacktrace
The text was updated successfully, but these errors were encountered: