Add @showprogress macro #1120
Triggered via pull request
November 24, 2023 08:46
Status
Cancelled
Total duration
36m 19s
Artifacts
–
CI.yml
on: pull_request
Documentation
35m 53s
Matrix: test
Annotations
7 errors
Documentation:
../../../.julia/packages/Documenter/nQAq5/src/utilities/utilities.jl#L44
failed to run `@example` block in src/tutorials/L_shape.md:33-53
```@example L
chain = FullyConnected((2,16,16,16,1), tanh)
pinn = PINN(chain)
sampler = QuasiRandomSampler(300, 30)
strategy = NonAdaptiveTraining()
prob = Sophon.discretize(pde_system, pinn, sampler, strategy)
@showprogress res = Optimization.solve(prob, BFGS(); maxiters=1000)
using CairoMakie
xs = -1:0.01:1
ys = -1:0.01:1
u_pred = [ifelse(x>0.0 && y>0.0, NaN, pinn.phi([x,y], res.u)[1]) for x in xs, y in ys]
fig, ax, hm = heatmap(xs, ys, u_pred, colormap=:jet)
Colorbar(fig[:, end+1], hm)
fig
save("Lshape.png", fig); nothing # hide
```
exception =
UndefVarError: `ProgressBar` not defined
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
@ Base ./Base.jl:31
[2] top-level scope
@ ~/work/Sophon.jl/Sophon.jl/src/showprogress.jl:48
[3] eval
@ ./boot.jl:370 [inlined]
[4] #54
@ ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:738 [inlined]
[5] cd(f::Documenter.var"#54#56"{Module, Expr}, dir::String)
@ Base.Filesystem ./file.jl:112
[6] (::Documenter.var"#53#55"{Documenter.Page, Module, Expr})()
@ Documenter ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:737
[7] (::IOCapture.var"#3#5"{DataType, Documenter.var"#53#55"{Documenter.Page, Module, Expr}, Task, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}})()
@ IOCapture ~/.julia/packages/IOCapture/8Uj7o/src/IOCapture.jl:119
[8] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:514
[9] with_logger
@ ./logging.jl:626 [inlined]
[10] capture(f::Documenter.var"#53#55"{Documenter.Page, Module, Expr}; rethrow::Type, color::Bool)
@ IOCapture ~/.julia/packages/IOCapture/8Uj7o/src/IOCapture.jl:116
[11] runner(#unused#::Type{Documenter.Expanders.ExampleBlocks}, node::MarkdownAST.Node{Nothing}, page::Documenter.Page, doc::Documenter.Document)
@ Documenter ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:736
|
Documentation:
../../../.julia/packages/Documenter/nQAq5/src/utilities/utilities.jl#L44
failed to run `@example` block in src/tutorials/SchrödingerEquation.md:42-56
```@example Schrödinger
function train(pde_system, prob, sampler, strategy, resample_period = 500, n=10)
bfgs = BFGS()
res = Optimization.solve(prob, bfgs; maxiters=2000)
for i in 1:n
data = Sophon.sample(pde_system, sampler)
prob = remake(prob; u0=res.u, p=data)
res = Optimization.solve(prob, bfgs; maxiters=resample_period)
end
return res
end
@showprogress res = train(pde_system, prob, sampler, strategy)
```
exception =
LoadError: Unsupported expression format
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] var"@showprogress"(__source__::LineNumberNode, __module__::Module, expr::Any)
@ Sophon ~/work/Sophon.jl/Sophon.jl/src/showprogress.jl:6
[3] eval
@ ./boot.jl:370 [inlined]
[4] #54
@ ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:738 [inlined]
[5] cd(f::Documenter.var"#54#56"{Module, Expr}, dir::String)
@ Base.Filesystem ./file.jl:112
[6] (::Documenter.var"#53#55"{Documenter.Page, Module, Expr})()
@ Documenter ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:737
[7] (::IOCapture.var"#3#5"{DataType, Documenter.var"#53#55"{Documenter.Page, Module, Expr}, Task, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}})()
@ IOCapture ~/.julia/packages/IOCapture/8Uj7o/src/IOCapture.jl:119
[8] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:514
[9] with_logger
@ ./logging.jl:626 [inlined]
[10] capture(f::Documenter.var"#53#55"{Documenter.Page, Module, Expr}; rethrow::Type, color::Bool)
@ IOCapture ~/.julia/packages/IOCapture/8Uj7o/src/IOCapture.jl:116
[11] runner(#unused#::Type{Documenter.Expanders.ExampleBlocks}, node::MarkdownAST.Node{Nothing}, page::Documenter.Page, doc::Documenter.Document)
@ Documenter ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:736
in expression starting at SchrödingerEquation.md:55
|
Documentation:
../../../.julia/packages/Documenter/nQAq5/src/utilities/utilities.jl#L44
failed to run `@example` block in src/tutorials/SchrödingerEquation.md:58-73
```@example Schrödinger
phi = pinn.phi
ps = res.u
xs, ts= [infimum(d.domain):0.01:supremum(d.domain) for d in pde_system.domain]
u = [sum(phi.u(([x,t]), ps.u)) for x in xs, t in ts]
v = [sum(phi.v(([x,t]), ps.v)) for x in xs, t in ts]
ψ = @. sqrt(u^2+ v^2)
axis = (xlabel="t", ylabel="x", title="u")
fig, ax1, hm1 = heatmap(ts, xs, u', axis=axis)
ax2, hm2= heatmap(fig[1, end+1], ts, xs, v', axis= merge(axis, (; title="v")))
display(fig)
save("uv.png", fig); nothing # hide
```
exception =
UndefVarError: `res` not defined
Stacktrace:
[1] top-level scope
@ SchrödingerEquation.md:60
[2] eval
@ ./boot.jl:370 [inlined]
[3] #54
@ ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:738 [inlined]
[4] cd(f::Documenter.var"#54#56"{Module, Expr}, dir::String)
@ Base.Filesystem ./file.jl:112
[5] (::Documenter.var"#53#55"{Documenter.Page, Module, Expr})()
@ Documenter ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:737
[6] (::IOCapture.var"#3#5"{DataType, Documenter.var"#53#55"{Documenter.Page, Module, Expr}, Task, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}})()
@ IOCapture ~/.julia/packages/IOCapture/8Uj7o/src/IOCapture.jl:119
[7] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:514
[8] with_logger
@ ./logging.jl:626 [inlined]
[9] capture(f::Documenter.var"#53#55"{Documenter.Page, Module, Expr}; rethrow::Type, color::Bool)
@ IOCapture ~/.julia/packages/IOCapture/8Uj7o/src/IOCapture.jl:116
[10] runner(#unused#::Type{Documenter.Expanders.ExampleBlocks}, node::MarkdownAST.Node{Nothing}, page::Documenter.Page, doc::Documenter.Document)
@ Documenter ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:736
|
Documentation:
../../../.julia/packages/Documenter/nQAq5/src/utilities/utilities.jl#L44
failed to run `@example` block in src/tutorials/SchrödingerEquation.md:76-82
```@example Schrödinger
axis = (xlabel="t", ylabel="x", title="ψ")
fig, ax1, hm1 = heatmap(ts, xs, ψ', axis=axis, colormap=:jet)
Colorbar(fig[:, end+1], hm1)
display(fig)
save("phi.png", fig); nothing # hide
```
exception =
UndefVarError: `ψ` not defined
Stacktrace:
[1] top-level scope
@ SchrödingerEquation.md:78
[2] eval
@ ./boot.jl:370 [inlined]
[3] #54
@ ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:738 [inlined]
[4] cd(f::Documenter.var"#54#56"{Module, Expr}, dir::String)
@ Base.Filesystem ./file.jl:112
[5] (::Documenter.var"#53#55"{Documenter.Page, Module, Expr})()
@ Documenter ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:737
[6] (::IOCapture.var"#3#5"{DataType, Documenter.var"#53#55"{Documenter.Page, Module, Expr}, Task, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}})()
@ IOCapture ~/.julia/packages/IOCapture/8Uj7o/src/IOCapture.jl:119
[7] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:514
[8] with_logger
@ ./logging.jl:626 [inlined]
[9] capture(f::Documenter.var"#53#55"{Documenter.Page, Module, Expr}; rethrow::Type, color::Bool)
@ IOCapture ~/.julia/packages/IOCapture/8Uj7o/src/IOCapture.jl:116
[10] runner(#unused#::Type{Documenter.Expanders.ExampleBlocks}, node::MarkdownAST.Node{Nothing}, page::Documenter.Page, doc::Documenter.Document)
@ Documenter ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:736
|
Documentation:
../../../.julia/packages/Documenter/nQAq5/src/utilities/utilities.jl#L44
failed to run `@example` block in src/tutorials/SchrödingerEquation.md:90-99
```@example Schrödinger
using StatsBase
data = vec([[x, t] for x in xs, t in ts])
wv = vec(ψ)
new_data = wsample(data, wv, 500)
new_data = reduce(hcat, new_data)
fig, ax = scatter(new_data[2,:], new_data[1,:])
save("data.png", fig); nothing # hide
```
exception =
UndefVarError: `xs` not defined
Stacktrace:
[1] top-level scope
@ SchrödingerEquation.md:93
[2] eval
@ ./boot.jl:370 [inlined]
[3] #54
@ ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:738 [inlined]
[4] cd(f::Documenter.var"#54#56"{Module, Expr}, dir::String)
@ Base.Filesystem ./file.jl:112
[5] (::Documenter.var"#53#55"{Documenter.Page, Module, Expr})()
@ Documenter ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:737
[6] (::IOCapture.var"#3#5"{DataType, Documenter.var"#53#55"{Documenter.Page, Module, Expr}, Task, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}})()
@ IOCapture ~/.julia/packages/IOCapture/8Uj7o/src/IOCapture.jl:119
[7] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:514
[8] with_logger
@ ./logging.jl:626 [inlined]
[9] capture(f::Documenter.var"#53#55"{Documenter.Page, Module, Expr}; rethrow::Type, color::Bool)
@ IOCapture ~/.julia/packages/IOCapture/8Uj7o/src/IOCapture.jl:116
[10] runner(#unused#::Type{Documenter.Expanders.ExampleBlocks}, node::MarkdownAST.Node{Nothing}, page::Documenter.Page, doc::Documenter.Document)
@ Documenter ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:736
|
Documentation:
../../../.julia/packages/Documenter/nQAq5/src/utilities/utilities.jl#L44
failed to run `@example` block in src/tutorials/SchrödingerEquation.md:102-107
```@example Schrödinger
prob.p[1] = new_data
prob.p[2] = new_data
prob = remake(prob; u0 = res.u)
# res = Optimization.solve(prob, bfgs; maxiters=1000)
```
exception =
UndefVarError: `new_data` not defined
Stacktrace:
[1] top-level scope
@ SchrödingerEquation.md:103
[2] eval
@ ./boot.jl:370 [inlined]
[3] #54
@ ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:738 [inlined]
[4] cd(f::Documenter.var"#54#56"{Module, Expr}, dir::String)
@ Base.Filesystem ./file.jl:112
[5] (::Documenter.var"#53#55"{Documenter.Page, Module, Expr})()
@ Documenter ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:737
[6] (::IOCapture.var"#3#5"{DataType, Documenter.var"#53#55"{Documenter.Page, Module, Expr}, Task, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}})()
@ IOCapture ~/.julia/packages/IOCapture/8Uj7o/src/IOCapture.jl:119
[7] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:514
[8] with_logger
@ ./logging.jl:626 [inlined]
[9] capture(f::Documenter.var"#53#55"{Documenter.Page, Module, Expr}; rethrow::Type, color::Bool)
@ IOCapture ~/.julia/packages/IOCapture/8Uj7o/src/IOCapture.jl:116
[10] runner(#unused#::Type{Documenter.Expanders.ExampleBlocks}, node::MarkdownAST.Node{Nothing}, page::Documenter.Page, doc::Documenter.Document)
@ Documenter ~/.julia/packages/Documenter/nQAq5/src/expander_pipeline.jl:736
|
Documentation
The operation was canceled.
|