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

Improve Parsing with Symbolics #678

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
043d429
begin symbolics overhaul
xtalax Apr 12, 2023
867ed37
include
xtalax Apr 12, 2023
9d52d56
further progress
xtalax Apr 13, 2023
5e27b18
start new loss
xtalax Apr 27, 2023
1947fb8
cardinalize eqs
xtalax May 16, 2023
27fc8bc
add todos
xtalax May 17, 2023
1fcd390
polish loss and refactor
xtalax May 25, 2023
b85eaa8
fix
xtalax May 25, 2023
8e39ede
"final" parsing updates
xtalax May 26, 2023
0f99811
oops
xtalax May 26, 2023
60aaa6b
Merge branch 'SciML:master' into parsing
xtalax May 30, 2023
3806caf
test fixes
xtalax May 30, 2023
c23df24
more fixes
xtalax May 30, 2023
5fdc7a5
move to varmap, deprecate old parsing
xtalax May 31, 2023
5891313
more fixes
xtalax Jun 5, 2023
18c3449
fix the tests a bit more
xtalax Jun 7, 2023
82191e7
remove transform expression
xtalax Jun 7, 2023
70f1ce3
reinstate dot, closer
xtalax Jun 8, 2023
b3967aa
last confusing errors?
xtalax Jun 15, 2023
17d0150
fix test
xtalax Jun 16, 2023
0011392
add multioutput
xtalax Jun 19, 2023
8c3ad76
ignore ds_store
xtalax Jun 19, 2023
a949169
change to x(0)
xtalax Jul 31, 2023
edb83d3
Merge branch 'parsing' into rel
xtalax Jan 3, 2024
8704b2e
Merge pull request #3 from SciML/rel
xtalax Jan 3, 2024
6df392a
fix deved package
xtalax Jan 4, 2024
a7d61ec
ditto
xtalax Jan 4, 2024
1cd8076
last ditch fix symbolic error
xtalax Jan 4, 2024
1299565
fix switch
xtalax Jan 4, 2024
aa12321
undo stupidity
xtalax Jan 4, 2024
cd0052e
fix switch
xtalax Jan 4, 2024
2e57081
"
xtalax Jan 4, 2024
39bd9c7
rerun tests
xtalax Jan 7, 2024
aafd11d
"
xtalax Jan 7, 2024
cf17091
test
xtalax Jan 8, 2024
4a0ee8a
Merge branch 'master' into parsing
xtalax Jan 8, 2024
765c047
try other method
xtalax Jan 12, 2024
8406bed
rvcat
xtalax Jan 18, 2024
82bd6bd
Merge branch 'master' into parsing
xtalax Jan 18, 2024
60e2c8c
try something
xtalax Jan 18, 2024
492c2df
test
xtalax Jan 18, 2024
fa988ad
remove show
xtalax Jan 18, 2024
da31f19
Merge branch 'parsing' into tmp
xtalax Feb 9, 2024
e2460f6
Merge pull request #4 from SciML/tmp
xtalax Feb 9, 2024
a49b1b7
arrayop wrap
xtalax Feb 13, 2024
5fa91f3
fix
xtalax Feb 13, 2024
89ad740
Merge branch 'parsing' into tmp1
xtalax Feb 13, 2024
143367c
Merge pull request #5 from SciML/tmp1
xtalax Feb 13, 2024
4f0c9b5
almost
xtalax Feb 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Manifest.toml
docs/build/*
scratch
scratch/*
.DS_store
.DS_store
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba"
OptimizationOptimisers = "42dfb2eb-d2b4-4451-abcd-913932933ac1"
PDEBase = "a7812802-0625-4b9e-961c-d332478797e5"
QuasiMonteCarlo = "8a4e6c94-4038-4cdc-81c3-7e6ffdb2a71b"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Expand Down Expand Up @@ -77,6 +78,7 @@ Reexport = "1.0"
RuntimeGeneratedFunctions = "0.5"
SafeTestsets = "0.1"
SciMLBase = "2"
PDEBase = "0.1.7"
Statistics = "1"
StochasticDiffEq = "6.13"
SymbolicUtils = "1"
Expand Down
27 changes: 18 additions & 9 deletions src/NeuralPDE.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,44 @@ using QuasiMonteCarlo: LatinHypercubeSample
import QuasiMonteCarlo
using RuntimeGeneratedFunctions
using SciMLBase
using PDEBase
using PDEBase: cardinalize_eqs!, get_depvars, get_indvars, differential_order
using Statistics
using ArrayInterface
import Optim
using Symbolics: wrap, unwrap, arguments, operation
using DomainSets
using Symbolics
using Symbolics: wrap, unwrap, arguments, operation, symtype, @arrayop, Arr
using SymbolicUtils
using AdvancedHMC, LogDensityProblems, LinearAlgebra, Functors, MCMCChains
using MonteCarloMeasurements: Particles
using ModelingToolkit: value, nameof, toexpr, build_expr, expand_derivatives, Interval, infimum, supremum
import DomainSets
using DomainSets: Domain, ClosedInterval, AbstractInterval, leftendpoint, rightendpoint, ProductDomain
using SciMLBase: @add_kwonly, parameterless_type
using UnPack: @unpack
using MonteCarloMeasurements
using SymbolicUtils.Code
using SymbolicUtils: Prewalk, Postwalk, Chain
import ModelingToolkit: value, nameof, toexpr, build_expr, expand_derivatives
import DomainSets: Domain, ClosedInterval
import ModelingToolkit: Interval, infimum, supremum #,Ball
import SciMLBase: @add_kwonly, parameterless_type
import UnPack: @unpack
import ChainRulesCore, Lux, ComponentArrays
using ChainRulesCore: @non_differentiable
import ChainRulesCore: @non_differentiable, @ignore_derivatives

RuntimeGeneratedFunctions.init(@__MODULE__)

abstract type AbstractPINN end
abstract type AbstractPINN <: SciMLBase.AbstractDiscretization end

abstract type AbstractTrainingStrategy end
abstract type AbstractGridfreeStrategy <: AbstractTrainingStrategy end

include("pinn_types.jl")
include("eq_data.jl")
include("symbolic_utilities.jl")
include("training_strategies.jl")
include("adaptive_losses.jl")
include("ode_solve.jl")
# include("rode_solve.jl")
include("dae_solve.jl")
include("transform_inf_integral.jl")
include("loss_function_generation.jl")
include("discretize.jl")
include("neural_adapter.jl")
include("advancedHMC_MCMC.jl")
Expand Down
Loading
Loading