AMIT-HSBI / NonLinearSystemNeuralNetworkFMU.jl

Automatically generate Neural Networks replacing non-linear equation systems inside OpenModelica FMUs.
GNU Affero General Public License v3.0
2 stars 1 forks source link

Error when instantiating SimpleLoop #115

Closed FelixSchloms closed 4 months ago

FelixSchloms commented 5 months ago

I tried to run the SimpleLoop example. By following the described procedure and instantiate the SimpleLoop folder, I get several dependencies errors. So I tried to add the required packages manually, without the .toml files.

If I try to add the NaiveONNX.jl I get the following error: ERROR: Unsatisfiable requirements detected for package NNlib [872c559c]:

If I try to add the NonLinearSystemneuralNetworkFMU.jl I get the following error: ERROR: GitError(Code:ERROR, Class:Submodule, cannot get submodules without a working tree)

Am I missing something?

olivleno commented 5 months ago

Having the same problem I like to add to this. Following the instructions in the symbolicRegression/ReadMe.md

  1. Open a Julia console and run:

     julia> using Pkg
     julia> Pkg.add("DrWatson") # install globally, for using `quickactivate`
     julia> Pkg.activate(".")
     julia> Pkg.develop(path="path/to/NonLinearSystemNeuralNetwork.jl")
     julia> Pkg.instantiate()

I tried: (JetPump) pkg> dev C:/Users/leo2rng/Work/PHyMoS/NonLinearSystemNeuralNetworkFMU.jl

which leads to the error message below. Could it be that the compat restrictions in the toml are unsatisfiable?

ERROR: Unsatisfiable requirements detected for package Flux [587475ba]:
 Flux [587475ba] log:
 ├─possible versions are: 0.4.1-0.14.15 or uninstalled
 ├─restricted to versions * by NonLinearSystemNeuralNetworkFMU [cef0780c], leaving only versions: 0.4.1-0.14.15
 │ └─NonLinearSystemNeuralNetworkFMU [cef0780c] log:
 │   ├─possible versions are: 0.5.5 or uninstalled
 │   └─NonLinearSystemNeuralNetworkFMU [cef0780c] is fixed to version 0.5.5
 ├─restricted by compatibility requirements with Requires [ae029012] to versions: 0.8.3-0.14.15 or uninstalled, leaving only versions: 0.8.3-0.14.15
 │ └─Requires [ae029012] log:
 │   ├─possible versions are: 0.5.0-1.3.0 or uninstalled
 │   ├─restricted to versions 1.0.0-* by NonLinearSystemNeuralNetworkFMU [cef0780c], leaving only versions: 1.0.0-1.3.0
 │   │ └─NonLinearSystemNeuralNetworkFMU [cef0780c] log: see above
 │   └─restricted by compatibility requirements with FMI [14a09403] to versions: 1.3.0
 │     └─FMI [14a09403] log:
 │       ├─possible versions are: 0.1.0-0.13.3 or uninstalled
 │       └─restricted to versions 0.13.0-* by NonLinearSystemNeuralNetworkFMU [cef0780c], leaving only versions: 0.13.0-0.13.3
 │         └─NonLinearSystemNeuralNetworkFMU [cef0780c] log: see above
 ├─restricted by compatibility requirements with CUDA [052768ef] to versions: [0.4.1-0.10.4, 0.11.2-0.14.15] or uninstalled, leaving only versions: [0.8.3-0.10.4, 0.11.2-0.14.15]
 │ └─CUDA [052768ef] log:
 │   ├─possible versions are: 0.1.0-5.3.4 or uninstalled
 │   ├─restricted by julia compatibility requirements to versions: [2.3.0, 2.5.0-5.3.4] or uninstalled
 │   ├─restricted by compatibility requirements with NNlib [872c559c] to versions: [0.1.0-2.2.1, 3.0.0-5.3.4] or uninstalled, leaving only versions: 3.0.0-5.3.4 or uninstalled
 │   │ └─NNlib [872c559c] log:
 │   │   ├─possible versions are: 0.3.2-0.9.17 or uninstalled
 │   │   ├─restricted by compatibility requirements with Flux [587475ba] to versions: [0.3.2-0.8.21, 0.9.1-0.9.17]
 │   │   │ └─Flux [587475ba] log: see above
 │   │   ├─restricted by compatibility requirements with Requires [ae029012] to versions: 0.6.0-0.9.17 or uninstalled, leaving only versions: [0.6.0-0.8.21, 0.9.1-0.9.17]
 │   │   │ └─Requires [ae029012] log: see above
 │   │   ├─restricted by compatibility requirements with ChainRulesCore [d360d2e6] to versions: [0.3.2-0.7.9, 0.7.27-0.9.17] or uninstalled, leaving only versions: [0.6.0-0.7.9, 0.7.27-0.8.21, 0.9.1-0.9.17]
 │   │   │ └─ChainRulesCore [d360d2e6] log:
 │   │   │   ├─possible versions are: 0.1.0-1.23.0 or uninstalled
 │   │   │   └─restricted by compatibility requirements with FMICore [8af89139] to versions: 1.16.0-1.23.0
 │   │   │     └─FMICore [8af89139] log:
 │   │   │       ├─possible versions are: 0.5.0-1.0.1 or uninstalled
 │   │   │       ├─restricted to versions * by NonLinearSystemNeuralNetworkFMU [cef0780c], leaving only versions: 0.5.0-1.0.1
 │   │   │       │ └─NonLinearSystemNeuralNetworkFMU [cef0780c] log: see above
 │   │   │       └─restricted by compatibility requirements with FMIImport [9fcbc62e] to versions: 0.18.0-0.20.1
 │   │   │         └─FMIImport [9fcbc62e] log:
 │   │   │           ├─possible versions are: 0.5.0-0.16.4 or uninstalled
 │   │   │           └─restricted to versions 0.16.0-* by NonLinearSystemNeuralNetworkFMU [cef0780c], leaving only versions: 0.16.0-0.16.4
 │   │   │             └─NonLinearSystemNeuralNetworkFMU [cef0780c] log: see above
 │   │   ├─restricted by compatibility requirements with Compat [34da2185] to versions: [0.3.2-0.7.6, 0.7.10-0.7.11, 0.8.7-0.9.17] or uninstalled, leaving only versions: [0.6.0-0.7.6, 0.8.7-0.8.21, 0.9.1-0.9.17]
 │   │   │ └─Compat [34da2185] log:
 │   │   │   ├─possible versions are: 1.0.0-4.15.0 or uninstalled
 │   │   │   └─restricted by compatibility requirements with SymbolicRegression [8254be44] to versions: 4.2.0-4.15.0
 │   │   │     └─SymbolicRegression [8254be44] log:
 │   │   │       ├─possible versions are: 0.1.0-0.24.4 or uninstalled
 │   │   │       └─restricted to versions 0.22.4-0.22 by an explicit requirement, leaving only versions: 0.22.4-0.22.5
 │   │   ├─restricted by compatibility requirements with Flux [587475ba] to versions: [0.8.2-0.8.21, 0.9.1-0.9.17], leaving only versions: [0.8.7-0.8.21, 0.9.1-0.9.17]
 │   │   │ └─Flux [587475ba] log: see above
 │   │   └─restricted by compatibility requirements with ONNX [d0dd6a25] to versions: 0.8.0-0.8.21, leaving only versions: 0.8.7-0.8.21
 │   │     └─ONNX [d0dd6a25] log:
 │   │       ├─possible versions are: 0.1.0-0.2.7 or uninstalled
 │   │       ├─restricted to versions * by NonLinearSystemNeuralNetworkFMU [cef0780c], leaving only versions: 0.1.0-0.2.7
 │   │       │ └─NonLinearSystemNeuralNetworkFMU [cef0780c] log: see above
 │   │       ├─restricted by compatibility requirements with Compat [34da2185] to versions: 0.2.0-0.2.7 or uninstalled, leaving only versions: 0.2.0-0.2.7
 │   │       │ └─Compat [34da2185] log: see above
 │   │       └─restricted by compatibility requirements with ProtoBuf [3349acd9] to versions: 0.2.0 or uninstalled, leaving only versions: 0.2.0
 │   │         └─ProtoBuf [3349acd9] log:
 │   │           ├─possible versions are: 0.6.1-1.0.15 or uninstalled
 │   │           └─restricted by compatibility requirements with ONNXNaiveNASflux [2e935253] to versions: 0.11.1
 │   │             └─ONNXNaiveNASflux [2e935253] log:
 │   │               ├─possible versions are: 0.1.0-0.2.11 or uninstalled
 │   │               ├─restricted to versions * by NonLinearSystemNeuralNetworkFMU [cef0780c], leaving only versions: 0.1.0-0.2.11
 │   │               │ └─NonLinearSystemNeuralNetworkFMU [cef0780c] log: see above
 │   │               ├─restricted by compatibility requirements with NaiveNASflux [85610aed] to versions: 0.2.0-0.2.11 or uninstalled, leaving only versions: 0.2.0-0.2.11
 │   │               │ └─NaiveNASflux [85610aed] log:
 │   │               │   ├─possible versions are: 1.0.0-2.0.11 or uninstalled
 │   │               │   ├─restricted by compatibility requirements with ONNXNaiveNASflux [2e935253] to versions: 1.6.0-2.0.11
 │   │               │   │ └─ONNXNaiveNASflux [2e935253] log: see above
 │   │               │   ├─restricted by compatibility requirements with NaiveNASlib [bd45eb3e] to versions: 2.0.0-2.0.11 or uninstalled, leaving only versions: 2.0.0-2.0.11
 │   │               │   │ └─NaiveNASlib [bd45eb3e] log:
 │   │               │   │   ├─possible versions are: 1.0.0-2.0.11 or uninstalled
 │   │               │   │   ├─restricted by compatibility requirements with Cbc [9961bab8] to versions: 2.0.4-2.0.11 or uninstalled
 │   │               │   │   │ └─Cbc [9961bab8] log:
 │   │               │   │   │   ├─possible versions are: 0.4.0-1.2.0 or uninstalled
 │   │               │   │   │   └─restricted to versions 1.0.3-1 by NonLinearSystemNeuralNetworkFMU [cef0780c], leaving only versions: 1.0.3-1.2.0
 │   │               │   │   │     └─NonLinearSystemNeuralNetworkFMU [cef0780c] log: see above
 │   │               │   │   └─restricted by compatibility requirements with NaiveNASflux [85610aed] to versions: 2.0.0-2.0.11, leaving only versions: 2.0.4-2.0.11
 │   │               │   │     └─NaiveNASflux [85610aed] log: see above
 │   │               │   ├─restricted by compatibility requirements with JuMP [4076af6c] to versions: 2.0.3-2.0.11 or uninstalled, leaving only versions: 2.0.3-2.0.11
 │   │               │   │ └─JuMP [4076af6c] log:
 │   │               │   │   ├─possible versions are: 0.18.3-1.22.1 or uninstalled
 │   │               │   │   ├─restricted by compatibility requirements with ONNXNaiveNASflux [2e935253] to versions: 0.21.0-1.22.1
 │   │               │   │   │ └─ONNXNaiveNASflux [2e935253] log: see above
 │   │               │   │   └─restricted by compatibility requirements with MathOptInterface [b8f27783] to versions: [0.18.3-0.18.6, 0.23.0-1.22.1] or uninstalled, leaving only versions: 0.23.0-1.22.1
 │   │               │   │     └─MathOptInterface [b8f27783] log:
 │   │               │   │       ├─possible versions are: 0.5.0-1.30.0 or uninstalled
 │   │               │   │       └─restricted by compatibility requirements with Cbc [9961bab8] to versions: 1.0.0-1.30.0
 │   │               │   │         └─Cbc [9961bab8] log: see above
 │   │               │   └─restricted by compatibility requirements with Flux [587475ba] to versions: 2.0.5-2.0.11 or uninstalled, leaving only versions: 2.0.5-2.0.11
 │   │               │     └─Flux [587475ba] log: see above
 │   │               ├─restricted by compatibility requirements with JuMP [4076af6c] to versions: 0.2.3-0.2.11 or uninstalled, leaving only versions: 0.2.3-0.2.11
 │   │               │ └─JuMP [4076af6c] log: see above
 │   │               └─restricted by compatibility requirements with Flux [587475ba] to versions: [0.1.0, 0.2.4-0.2.11] or uninstalled, leaving only versions: 0.2.4-0.2.11
 │   │                 └─Flux [587475ba] log: see above
 │   └─restricted by compatibility requirements with GPUCompiler [61eb1bfa] to versions: 5.0.0-5.3.4 or uninstalled
 │     └─GPUCompiler [61eb1bfa] log:
 │       ├─possible versions are: 0.1.0-0.26.5 or uninstalled
 │       └─restricted by julia compatibility requirements to versions: 0.22.0-0.26.5 or uninstalled
 ├─restricted by compatibility requirements with NNlib [872c559c] to versions: [0.8.3-0.11.3, 0.12.9-0.14.15] or uninstalled, leaving only versions: [0.8.3-0.10.4, 0.11.2-0.11.3, 0.12.9-0.14.15]     
 │ └─NNlib [872c559c] log: see above
 ├─restricted by compatibility requirements with ArrayInterface [4fba245c] to versions: [0.4.1-0.12.4, 0.13.2-0.14.15] or uninstalled, leaving only versions: [0.8.3-0.10.4, 0.11.2-0.11.3, 0.13.2-0.14.15]
 │ └─ArrayInterface [4fba245c] log:
 │   ├─possible versions are: 0.0.1-7.10.0 or uninstalled
 │   ├─restricted by compatibility requirements with Requires [ae029012] to versions: 2.1.0-7.10.0 or uninstalled
 │   │ └─Requires [ae029012] log: see above
 │   ├─restricted by compatibility requirements with Compat [34da2185] to versions: [0.0.1-3.1.32, 6.0.2-7.10.0] or uninstalled, leaving only versions: [2.1.0-3.1.32, 6.0.2-7.10.0] or uninstalled    
 │   │ └─Compat [34da2185] log: see above
 │   ├─restricted by compatibility requirements with OrdinaryDiffEq [1dea7af3] to versions: 6.0.0-7.10.0, leaving only versions: 6.0.2-7.10.0
 │   │ └─OrdinaryDiffEq [1dea7af3] log:
 │   │   ├─possible versions are: 4.0.0-6.79.0 or uninstalled
 │   │   ├─restricted by compatibility requirements with RecursiveArrayTools [731186ca] to versions: 5.6.1-6.79.0 or uninstalled
 │   │   │ └─RecursiveArrayTools [731186ca] log:
 │   │   │   ├─possible versions are: 0.16.0-3.19.0 or uninstalled
 │   │   │   ├─restricted by compatibility requirements with Requires [ae029012] to versions: 1.2.1-3.19.0 or uninstalled
 │   │   │   │ └─Requires [ae029012] log: see above
 │   │   │   ├─restricted by compatibility requirements with ChainRulesCore [d360d2e6] to versions: [0.16.0-2.11.4, 2.15.0-2.15.2, 2.17.0-3.19.0] or uninstalled, leaving only versions: [1.2.1-2.11.4, 2.15.0-2.15.2, 2.17.0-3.19.0] or uninstalled
 │   │   │   │ └─ChainRulesCore [d360d2e6] log: see above
 │   │   │   └─restricted by compatibility requirements with DifferentialEquations [0c46a032] to versions: 2.32.0-3.19.0
 │   │   │     └─DifferentialEquations [0c46a032] log:
 │   │   │       ├─possible versions are: 5.0.0-7.13.0 or uninstalled
 │   │   │       └─restricted by compatibility requirements with FMI [14a09403] to versions: 7.7.0-7.13.0
 │   │   │         └─FMI [14a09403] log: see above
 │   │   ├─restricted by compatibility requirements with DifferentialEquations [0c46a032] to versions: 6.27.2-6.79.0
 │   │   │ └─DifferentialEquations [0c46a032] log: see above
 │   │   └─restricted by compatibility requirements with DiffEqBase [2b5f629d] to versions: 6.35.0-6.79.0 or uninstalled, leaving only versions: 6.35.0-6.79.0
 │   │     └─DiffEqBase [2b5f629d] log:
 │   │       ├─possible versions are: 3.13.2-6.151.1 or uninstalled
 │   │       ├─restricted by compatibility requirements with Requires [ae029012] to versions: 6.8.0-6.151.1 or uninstalled
 │   │       │ └─Requires [ae029012] log: see above
 │   │       ├─restricted by compatibility requirements with ChainRulesCore [d360d2e6] to versions: [3.13.2-6.10.0, 6.59.1, 6.69.0-6.151.1] or uninstalled, leaving only versions: [6.8.0-6.10.0, 6.59.1, 6.69.0-6.151.1] or uninstalled
 │   │       │ └─ChainRulesCore [d360d2e6] log: see above
 │   │       ├─restricted by compatibility requirements with Compat [34da2185] to versions: [6.18.0-6.22.2, 6.24.0-6.151.1] or uninstalled, leaving only versions: [6.59.1, 6.69.0-6.151.1] or uninstalled
 │   │       │ └─Compat [34da2185] log: see above
 │   │       └─restricted by compatibility requirements with DifferentialEquations [0c46a032] to versions: 6.116.0-6.151.1
 │   │         └─DifferentialEquations [0c46a032] log: see above
 │   └─restricted by compatibility requirements with Static [aedffcd0] to versions: [0.0.1-3.1.1, 6.0.18-7.10.0] or uninstalled, leaving only versions: 6.0.18-7.10.0
 │     └─Static [aedffcd0] log:
 │       ├─possible versions are: 0.1.0-0.8.10 or uninstalled
 │       └─restricted by compatibility requirements with DiffEqBase [2b5f629d] to versions: 0.7.0-0.8.10
 │         └─DiffEqBase [2b5f629d] log: see above
 ├─restricted by compatibility requirements with Adapt [79e6a3ab] to versions: 0.11.5-0.14.15 or uninstalled, leaving only versions: 0.13.2-0.14.15
 │ └─Adapt [79e6a3ab] log:
 │   ├─possible versions are: 0.3.0-4.0.4 or uninstalled
 │   ├─restricted by compatibility requirements with OrdinaryDiffEq [1dea7af3] to versions: 1.1.0-4.0.4
 │   │ └─OrdinaryDiffEq [1dea7af3] log: see above
 │   └─restricted by compatibility requirements with PreallocationTools [d236fae5] to versions: 3.0.0-4.0.4
 │     └─PreallocationTools [d236fae5] log:
 │       ├─possible versions are: 0.1.0-0.4.21 or uninstalled
 │       ├─restricted by compatibility requirements with OrdinaryDiffEq [1dea7af3] to versions: 0.2.0-0.4.21
 │       │ └─OrdinaryDiffEq [1dea7af3] log: see above
 │       ├─restricted by compatibility requirements with ArrayInterface [4fba245c] to versions: 0.3.1-0.4.21 or uninstalled, leaving only versions: 0.3.1-0.4.21
 │       │ └─ArrayInterface [4fba245c] log: see above
 │       └─restricted by compatibility requirements with DiffEqBase [2b5f629d] to versions: 0.4.0-0.4.21
 │         └─DiffEqBase [2b5f629d] log: see above
 ├─restricted by compatibility requirements with CUDA [052768ef] to versions: [0.4.1-0.10.4, 0.14.0-0.14.15] or uninstalled, leaving only versions: 0.14.0-0.14.15
 │ └─CUDA [052768ef] log: see above
 └─restricted by compatibility requirements with NNlib [872c559c] to versions: 0.12.9-0.13.17 or uninstalled — no versions left
   └─NNlib [872c559c] log: see above
AnHeuermann commented 5 months ago

Could it be that the compat restrictions in the toml are unsatisfiable?

I guess you aren't using Julia 1.8, so yes.

To reproduce the example you'll need to use Julia 1.8 and NonLinearSystemNeuralNetworkFMU.jl v0.4 , so that the specified versions of the dependencies can be installed. That's what DrWatson is used for. Unfortunately I didn't tagged the main branch, so it's a bit difficult to find the correct version of NonLinearSystemNeuralNetworkFMU .jl. And I only tested the example on Ubuntu 22.04.

But you can probably update the dependencies to Julia v1.10 and the latest versions of the used Julia packages.

AnHeuermann commented 5 months ago

Oh deer, looks like ONNX.jl or some other package introduces unsatisfiable requirements for newer Flux.jl versions / Julia v1.10. So we can't easily update the Manifest.toml. For Julia v1.9 I had to nuke my complete .julia directory, because some random segmentation fault in ZMQ and it's still not running.

olivleno commented 4 months ago

I heard that Julia 1.10 caused a lot of hick ups in other projects as well. Should we stick to Julia 1.9 for now? What is the current status of fixes? Should we give it another try on Windows?

AnHeuermann commented 4 months ago

See https://github.com/AnHeuermann/NonLinearSystemNeuralNetworkFMU.jl/pull/117. I won't test on Windows. It's a huge jump in complexity, so Linux it is for now.