diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index fc333e71..e401e491 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -14,4 +14,3 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }} # Deploy key to trigger other actions - diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 22d4e996..afcc915a 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -24,13 +24,11 @@ jobs: steps: - name: "Check out repository" uses: actions/checkout@v4 - with: - ref: '' - name: "Set up Julia" uses: julia-actions/setup-julia@v2 with: - version: '1' # 1.6 + version: '1' arch: x64 - name: "Copy examples, readme" @@ -47,7 +45,7 @@ jobs: cp ./README.md ./docs/src/index.md - name: "Install dependencies" - run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate(); Pkg.update()' + run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - name: "Build and deploy" env: diff --git a/.github/workflows/Example.yml b/.github/workflows/Example.yml index ee8f8938..ae19d78d 100644 --- a/.github/workflows/Example.yml +++ b/.github/workflows/Example.yml @@ -11,19 +11,19 @@ on: - 'examples/**' - '.github/workflows/Example.yml' - 'Project.toml' - + jobs: jupyter: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [windows-latest] # , ubuntu-latest] + os: [windows-latest] # ubuntu-latest] file-name: [simple_hybrid_CS, simple_hybrid_ME, juliacon_2023, modelica_conference_2021] - julia-version: ['1.10'] + julia-version: ['1.10'] julia-arch: [x64] experimental: [false] - + steps: - name: "Check out repository" uses: actions/checkout@v4 @@ -33,13 +33,13 @@ jobs: with: version: ${{ matrix.julia-version }} arch: ${{ matrix.julia-arch }} - + - name: "Install dependencies" run: julia --project=examples/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - name: "Install packages" run: pip install jupyter nbconvert - + - name: "Execute notebook" env: FILE: examples/jupyter-src/${{ matrix.file-name }}.ipynb @@ -105,7 +105,7 @@ jobs: with: version: '1.10' - - run: julia -e 'using Pkg; Pkg.add("PlutoSliderServer"); Pkg.add("FMIFlux")' + - run: julia -e 'using Pkg; Pkg.add("PlutoSliderServer");' - run: julia -e 'using PlutoSliderServer; PlutoSliderServer.export_directory("examples/pluto-src")' - name: "auto-commit (retry on merge)" @@ -141,7 +141,7 @@ jobs: git add ${{ env.EXAMPLES_PATH }} git commit -m "${{ env.CI_COMMIT_MESSAGE }}" git push origin examples || (git reset --soft HEAD~1 && (exit 1)) - + call-docu: needs: [jupyter, pluto] if: github.event_name != 'pull_request' && github.ref_name == 'main' diff --git a/.github/workflows/Formatter.yml b/.github/workflows/Formatter.yml index c3789309..14659356 100644 --- a/.github/workflows/Formatter.yml +++ b/.github/workflows/Formatter.yml @@ -4,7 +4,7 @@ on: # this argument is not required if you don't use the `suggestion-label` input types: [ opened, reopened, synchronize, labeled, unlabeled ] workflow_dispatch: - + jobs: code-style: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 59e681db..1c6b8552 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,3 @@ LocalPreferences.toml tmp/ build/ .vscode/ -examples/jupyter-src/.ipynb_checkpoints/ diff --git a/docs/make.jl b/docs/make.jl index 6b19b4b1..d39ed296 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -58,7 +58,7 @@ for (x, md) in deepcopy(example_pages) string( "::warning title=SVG-Warning::example-page \"", md, - "\" has svg-xml text in it. Most likely, linking of support-files generated by jupyter is broken\"\r\n", + "\" has svg-xml text in it. Most likely, linking of support-files generated by jupyter is broken. The svg-xml text has been removed for the doc-manual, but also no plot will be displayed\r\n", ), ) # regex replace exeeds stack limit: s = replace(s, r"\<\?xml(?!<\/svg>)(.|\n)*?<\/svg>" => "") diff --git a/docs/src/examples/overview.md b/docs/src/examples/overview.md index 8d6175cc..90b69e44 100644 --- a/docs/src/examples/overview.md +++ b/docs/src/examples/overview.md @@ -16,10 +16,10 @@ The examples show how to combine FMUs with machine learning ("NeuralFMU") and il - [__Modelica Conference 2021: NeuralFMUs__](https://thummeto.github.io/FMIFlux.jl/dev/examples/modelica_conference_2021/): Showing basics on how to train a NeuralFMU (Contribution for the *Modelica Conference 2021*). ## Workshops -[Pluto](https://plutojl.org/) based notebooks, that can easily be executed on your own Pluto-Setup. -- [__Scientific Machine Learning using Functional Mock-up Units__](../pluto-src/SciMLUsingFMUs/SciMLUsingFMUs.html): Workshop at JuliaCon 2024 (Eindhoven University, Netherlands) +[__Pluto workshops__](https://thummeto.github.io/FMI.jl/dev/examples/workshops/): [Pluto](https://plutojl.org/) based notebooks, that can easily be executed on your own Pluto-Setup. +- [__Scientific Machine Learning using Functional Mock-up Units__](https://thummeto.github.io/FMI.jl/dev/examples/pluto-src/SciMLUsingFMUs/SciMLUsingFMUs.html): Workshop at JuliaCon 2024 (Eindhoven University, Netherlands) +- [__Hands-on: Hybrid Modeling using FMI__](https://thummeto.github.io/FMI.jl/dev/examples/pluto-src/HybridModelingUsingFMI/HybridModelingUsingFMI.html): Workshop at MODPROD 2024 (Linköping University, Sweden) ## Archived - [__MDPI 2022: Physics-enhanced NeuralODEs in real-world applications__](https://thummeto.github.io/FMIFlux.jl/dev/examples/mdpi_2022/): An example for a NeuralODE in a real world modeling scenario (Contribution in *MDPI Electronics 2022*). - [__Growing Horizon ME-NeuralFMU__](https://thummeto.github.io/FMIFlux.jl/dev/examples/growing_horizon_ME/): Growing horizon training technique for a ME-NeuralFMU. -- [__HybridModelingUsingFMI__](../pluto-src/HybridModelingUsingFMI/HybridModelingUsingFMI.html): Workshop at MODPROD 2024 (Linköping University, Sweden) diff --git a/docs/src/library.md b/docs/src/library.md index cf121108..8afcc7fb 100644 --- a/docs/src/library.md +++ b/docs/src/library.md @@ -14,7 +14,7 @@ NeuralFMU ## FMI 2 version dependent functions ```@docs -fmi2DoStepCS +fmiDoStepCS fmi2EvaluateME fmi2InputDoStepCSOutput ``` @@ -22,7 +22,6 @@ fmi2InputDoStepCSOutput ## FMI version independent functions ```@docs -fmiDoStepCS fmiEvaluateME fmiInputDoStepCSOutput ``` @@ -31,5 +30,22 @@ fmiInputDoStepCSOutput ```@docs mse_interpolate +``` transferParams! + +## TODO: Sort docs + +```@docs +LossAccumulationScheduler +FMIFlux.transferFlatParams! +FMIFlux.WorstElementScheduler +FMIFlux.FMUParameterRegistrator +FMIFlux.SimultaniousZeroCrossing +FMIFlux.ParameterRegistrator +FMIFlux.ScaleShift +FMIFlux.WorstGrowScheduler +FMIFlux.SequentialScheduler +FMIFlux.FMUTimeLayer +FMIFlux.ShiftScale +FMIFlux.RandomScheduler ``` \ No newline at end of file diff --git a/examples/jupyter-src/.gitignore b/examples/jupyter-src/.gitignore index 6adb310c..670f8b8f 100644 --- a/examples/jupyter-src/.gitignore +++ b/examples/jupyter-src/.gitignore @@ -1,3 +1,4 @@ +.ipynb_checkpoints/ params/ *.png ./*.gif \ No newline at end of file diff --git a/test/.gitignore b/test/.gitignore index 07a25449..f0a471af 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -1,3 +1,6 @@ *.svg *.pdf -*.gif \ No newline at end of file +*.gif +*.jld2 +*.csv +*.mat \ No newline at end of file