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

68 update readme for interface vector inputs #69

Merged
merged 7 commits into from
Nov 4, 2024
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,7 @@ examples/**/*.db
examples/**/*.nc

# Cmake generated files
CMakeUserPresets.json
CMakeUserPresets.json

# Generated FMUs
*.fmu
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e
* Added missing unit tests for the template data generated when building the FMU.
* Unit tests for the modelDescription.xml generation.
* Unit tests for the Interface JSON validation.
* Wind turbine power prediction model example is included in the mlfmu\examples\wind_to_power_pyspark directory.
* README.md : Interface.json is updated to show how to define vectors as inputs.
* Changed from `pip`/`tox` to `uv` as package manager
* README.md : Completely rewrote section "Development Setup", introducing `uv` as package manager.
* Added missing docstrings for py/cpp/h files with help of Github Copilot
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ Given that you have an ML model, you now need to:
"name": "input_1",
"description": "My input signal to the model at position 0",
"agentInputIndexes": ["0"]
},
{
"name": "input_2",
"description": "My input signal as a vector with four elements at position 1 to 5",
"agentInputIndexes": ["1:5"],
"type": "real",
"isArray": true,
"length": 4
}
],
"parameters": [
Expand All @@ -112,6 +120,8 @@ Given that you have an ML model, you now need to:
}
```

More information about the interface.json schema can be found in the mlfmu\docs\interface\schema.html

2. Compile the FMU:

```sh
Expand Down
2 changes: 1 addition & 1 deletion docs/source/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
```{include} ../../CHANGELOG.md
```{include} ../../CHANGELOG.md
StephanieKemna marked this conversation as resolved.
Show resolved Hide resolved
```
4 changes: 2 additions & 2 deletions docs/source/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# LICENSE
```{include} ../../LICENSE
# LICENSE
```{include} ../../LICENSE
```
2 changes: 1 addition & 1 deletion docs/source/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
```{include} ../../README.md
```{include} ../../README.md
```
2 changes: 1 addition & 1 deletion docs/source/STYLEGUIDE.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
```{include} ../../STYLEGUIDE.md
```{include} ../../STYLEGUIDE.md
```
14 changes: 7 additions & 7 deletions docs/source/cli.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CLI Documentation
=================
.. toctree::
:maxdepth: 2
cli.mlfmu
CLI Documentation
=================

.. toctree::
:maxdepth: 2

cli.mlfmu
Binary file added examples/wind_to_power/config/WindToPower.fmu
Binary file not shown.
23 changes: 23 additions & 0 deletions examples/wind_to_power_pyspark/config/interface.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "MLFMU_RF_Regressor",
"description": "A Random Forest Regressor based FMU",
"usesTime": false,
"inputs": [
{
"name": "features",
"description": "Inputs with four features: month, hour, wind_speed, wind_direction",
"agentInputIndexes": ["0:4"],
"type": "real",
"isArray": true,
"length": 4
}
],
"parameters": [],
"outputs": [
{
"name": "prediction",
"description": "The prediction generated by ML model",
"agentOutputIndexes": ["0"]
}
]
}
Binary file not shown.
50,531 changes: 50,531 additions & 0 deletions examples/wind_to_power_pyspark/ml_model/T1.csv

Large diffs are not rendered by default.

Binary file not shown.
Loading