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

remove ParameterSchedulers #240

Merged
merged 7 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
version:
- '1.8'
- "~1.9.0-0"
- "1.9"
os:
- ubuntu-latest
arch:
Expand Down
4 changes: 1 addition & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ NNlibCUDA = "a00861dc-f156-4864-bf3c-e6376f28a68d"
Optimisers = "3bd65402-5787-11e9-1adc-39752487f4e2"
Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba"
OptimizationOptimisers = "42dfb2eb-d2b4-4451-abcd-913932933ac1"
ParameterSchedulers = "d7d3b36b-41b8-4d0d-a2bf-768c6151755e"
QuasiMonteCarlo = "8a4e6c94-4038-4cdc-81c3-7e6ffdb2a71b"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
Expand Down Expand Up @@ -64,12 +63,11 @@ NNlibCUDA = "0.2"
Optimisers = "0.2"
Optimization = "3"
OptimizationOptimisers = "0.1"
ParameterSchedulers = "0.3"
QuasiMonteCarlo = "0.2, 0.3"
Requires = "1"
RuntimeGeneratedFunctions = "0.5"
SciMLBase = "1"
Sobol = "1"
Sobol = "1, 2"
StaticArrays = "1.5"
StaticArraysCore = "1"
StatsBase = "0.33, 0.34"
Expand Down
12 changes: 3 additions & 9 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,13 @@ bib = CitationBibliography(joinpath(@__DIR__, "bibliography.bib"))

DocMeta.setdocmeta!(Sophon, :DocTestSetup, :(using Sophon); recursive=true)

makedocs(bib; modules=[Sophon], sitename="Sophon.jl",
makedocs(; plugins=[bib], modules=[Sophon], sitename="Sophon.jl",
repo="https://github.com/YichengDWu/Sophon.jl/blob/{commit}{path}#{line}",
format=Documenter.HTML(; prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://YichengDWu.github.io/Sophon.jl",
edit_link="main", assets=String[indigo]),
strict=[
:doctest,
:linkcheck,
:parse_error,
:example_block,
# Other available options are
# :autodocs_block, :cross_references, :docs_block, :eval_block, :example_block, :footnote, :meta_block, :missing_docs, :setup_block
], authors="Yicheng Wu",
authors="Yicheng Wu",
warnonly = Documenter.except(:missing_docs)
pages=[
"Home" => "index.md",
"Tutorials" => [
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/L_shape.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The example is taken from [here](https://arxiv.org/pdf/1907.04502.pdf). We showcase define a PDE on an L-shaped domain

```@example L
using ModelingToolkit, DomainSets, Optimization, OptimizationOptimJL
using ModelingToolkit, DomainSets, Optimization, OptimizationOptimJL, Zygote
using DomainSets: ×
using Sophon

Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/SchrödingerEquation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $\mathrm{i} \partial_t \psi=-\frac{1}{2} \sigma \partial_{x x} \psi-\beta|\psi|^
Let $\sigma=\beta=1, \psi=u+v i$, the equation can be transformed into a system of partial differential equations
```@example Schrödinger
using ModelingToolkit, IntervalSets, Sophon, CairoMakie
using Optimization, OptimizationOptimJL
using Optimization, OptimizationOptimJL, Zygote

@parameters x,t
@variables u(..), v(..)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/convection.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ First we define the PDE.

```@example convection
using ModelingToolkit, Sophon, IntervalSets, CairoMakie
using Optimization, OptimizationOptimJL
using Optimization, OptimizationOptimJL, Zygote

@parameters x, t
@variables u(..)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/discontinuous.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ savefig("result2.svg"); nothing # hide

## Quadratic activation function

[`quadratic`](@ref) is much cheaper to compute compared to the Gaussian activation function.
`quadratic` is much cheaper to compute compared to the Gaussian activation function.


```@example ds
Expand Down
4 changes: 2 additions & 2 deletions docs/src/tutorials/helmholtz.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ where
```math
q(x, y)=-\left(a_{1} \pi\right)^{2} \sin \left(a_{1} \pi x\right) \sin \left(a_{2} \pi y\right)-\left(a_{2} \pi\right)^{2} \sin \left(a_{1} \pi x\right) \sin \left(a_{2} \pi y\right)+k^{2} \sin \left(a_{1} \pi x\right) \sin \left(a_{2} \pi y\right).
```
The excat solution is ``u(x,y)=\sin{a_1\pi x}\sin{a_2\pi y}``. We chose ``k=1, a_1 = 1`` and ``a_2 = 4``.
The exact solution is ``u(x,y)=\sin{a_1\pi x}\sin{a_2\pi y}``. We chose ``k=1, a_1 = 1`` and ``a_2 = 4``.

```@example helmholtz
using ModelingToolkit, IntervalSets, Sophon, Lux
using ModelingToolkit, IntervalSets, Sophon, Lux, Zygote
using Optimization, OptimizationOptimJL

@parameters x,y
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/hole.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

using ModelingToolkit, Sophon
using Optimization, OptimizationOptimJL
using Optimization, OptimizationOptimJL, Zygote
using DomainSets
using DomainSets: ×

Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/inverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $\frac{\mathrm{d} z}{\mathrm{~d} t}=x y-\beta z$,

```julia
using ModelingToolkit, Sophon, OrdinaryDiffEq
using Optimization, OptimizationOptimJL
using Optimization, OptimizationOptimJL, Zygote
using ModelingToolkit, IntervalSets
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/ode.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This tutorial provides a step-by-step guide to solve the Lotka-Volterra system o
```@example ODE
using ModelingToolkit
using Sophon, IntervalSets
using Optimization, OptimizationOptimJL
using Optimization, OptimizationOptimJL, Zygote
using Plots

# Defining parameters and variables
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/poisson.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ u(x)=\sin (2 \pi x)+0.1 \sin (50 \pi x)

```@example poisson
using ModelingToolkit, IntervalSets, Sophon
using Optimization, OptimizationOptimJL
using Optimization, OptimizationOptimJL, Zygote
using CairoMakie

@parameters x
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/sod.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This example showcases how to use adaptive weights in `Sophon`.

```@example SOD
using Optimization, OptimizationOptimJL, Plots
using Optimization, OptimizationOptimJL, Plots, Zygote
using ModelingToolkit, IntervalSets
using Sophon
using ChainRulesCore
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorials/waveinverse2.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ We are going to sovle the wave equation.

```@example wave
using Sophon, ModelingToolkit, IntervalSets
using Optimization, OptimizationOptimJL
using Optimization, OptimizationOptimJL, Zygote

@parameters x, t
@variables u(..), c(..)
Expand Down
4 changes: 0 additions & 4 deletions src/Sophon.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ using Lux.WeightInitializers: _nfan
import ModelingToolkit
import ModelingToolkit: Differential
using Optimization
import ParameterSchedulers: Step, Exp, Poly, Inv, Triangle, TriangleDecay2, TriangleExp,
Sin, SinDecay2, SinExp, CosAnneal, Sequence, Loop, Interpolator,
Shifted, ComposedSchedule, Constant
using ParameterSchedulers: AbstractSchedule
using ComponentArrays
import SciMLBase
import SciMLBase: parameterless_type, __solve, build_solution, NullParameters
Expand Down
Loading