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

DataDrivenProblem takes a very long time #487

Open
PaioPaio opened this issue Oct 3, 2023 · 2 comments
Open

DataDrivenProblem takes a very long time #487

PaioPaio opened this issue Oct 3, 2023 · 2 comments

Comments

@PaioPaio
Copy link

PaioPaio commented Oct 3, 2023

Hello, I'm trying to run the example of eDMD used on a Nonlinear Time Continuous System, found here https://docs.sciml.ai/DataDrivenDiffEq/stable/libs/datadrivendmd/examples/example_04/#nonlinear_continuos , but the copy-pasteable code now takes about 15 minutes to run. I've tried to run the example on two different computers (one Windows 10, the other Manjaro stable) on VSCode.
The code seems to get stuck on the line

prob = DataDrivenProblem(solution)

Since a week ago or so the example worked, I thought that the problem may have been caused by SciML/NonlinearSolve.jl#223 , but this issue seems to be solved and the example still takes a very long time to compute.

P.S. Thank you for the very nice package :)

@christianhvejsel
Copy link

christianhvejsel commented Nov 30, 2023

Hi @PaioPaio
Unfortunately, I am not able to help. I can confirm that DataDrivenProblem/ContinuousDataDrivenProblem takes very long time for the call to DataDrivenProblem and ContinuousDataDrivenProblem effectively making it non-functional on all problems I have tried from the docs:
the quick start example: https://docs.sciml.ai/DataDrivenDiffEq/stable/
And all the continuous DMD examples from the docs:
https://docs.sciml.ai/DataDrivenDiffEq/stable/libs/datadrivendmd/examples/example_02/
https://docs.sciml.ai/DataDrivenDiffEq/stable/libs/datadrivendmd/examples/example_03/
https://docs.sciml.ai/DataDrivenDiffEq/stable/libs/datadrivendmd/examples/example_04/

versioninfo()
Julia Version 1.9.4
Commit 8e5136fa29 (2023-11-14 08:46 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 8 × 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, tigerlake)
Threads: 1 on 8 virtual cores
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS =

[b0b7db55] ComponentArrays v0.15.5
[3c9adf31] DataDrivenDMD v0.1.1
[2445eb08] DataDrivenDiffEq v1.3.0
[5b588203] DataDrivenSparse v0.1.2
[0c46a032] DifferentialEquations v7.11.0
[b2108857] Lux v0.5.10
[961ee093] ModelingToolkit v8.73.1
[7f7a1694] Optimization v3.19.3
[36348300] OptimizationOptimJL v0.1.14
[42dfb2eb] OptimizationOptimisers v0.1.6
[1dea7af3] OrdinaryDiffEq v6.59.3
[91a5bcdd] Plots v1.39.0
[c3e4b0f8] Pluto v0.19.32
[7f904dfe] PlutoUI v0.7.54
[1ed8b502] SciMLSensitivity v7.47.0
[860ef19b] StableRNGs v1.0.0
[e88e6eb3] Zygote v0.6.67

@christianhvejsel
Copy link

@AlCap23 suggested this workaround adding the Differentials to the call (and not let DataDrivenProblem/ContinuousDataDrivenProblem calculate them).

E.g. for example_02:

X = Array(sol)
t = sol.t
DX = Array(sol(sol.t, Val{1}))
prob = ContinuousDataDrivenProblem(X, t, DX)

The way DX is calculated is from here: https://github.com/SciML/DataDrivenDiffEq.jl/blob/a4471dfafc1adadb79a7c060139915430286f86a/src/problem/type.jl#L486

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants