mlfmu - CLI interface¶
mlfmu is a command line tool to build FMUs from ONNX ML models.
Check the README and docs for more info.
You can also run `mlfmu <command> --help` for more info on a specific command.
mlfmu [-h] command ...
mlfmu options¶
mlfmu build¶
Build FMU from interface and model files
mlfmu build [-h] [-q | -v] [-l LOG] [-ll {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
[-i INTERFACE_FILE] [-m MODEL_FILE] [-f FMU_PATH]
mlfmu build options¶
-l
LOG
,--log
LOG
- name of log file. If specified, this will activate logging to file. If not, it does not log to file, only console. (default:None
)-ll
LOG_LEVEL
,--log-level
LOG_LEVEL
- log level applied to logging to file. Default: WARNING. (default:WARNING
)-i
INTERFACE_FILE
,--interface-file
INTERFACE_FILE
- JSON file describing the FMU following schema (default:None
)-m
MODEL_FILE
,--model-file
MODEL_FILE
- ONNX file containing the ML Model (default:None
)-f
FMU_PATH
,--fmu-path
FMU_PATH
- Path to where the built FMU should be saved (default:None
)
mlfmu codegen¶
Generate FMU source code from interface and model files
mlfmu codegen [-h] [-q | -v] [-l LOG] [-ll {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
[--interface-file INTERFACE_FILE] [--model-file MODEL_FILE]
[--fmu-source-path FMU_SOURCE_PATH]
mlfmu codegen options¶
-l
LOG
,--log
LOG
- name of log file. If specified, this will activate logging to file. If not, it does not log to file, only console. (default:None
)-ll
LOG_LEVEL
,--log-level
LOG_LEVEL
- log level applied to logging to file. Default: WARNING. (default:WARNING
)--interface-file
INTERFACE_FILE
- json file describing the FMU following schema (e.g. interface.json). (default:None
)--model-file
MODEL_FILE
- onnx file containing the ML Model (e.g. example.onnx). (default:None
)--fmu-source-path
FMU_SOURCE_PATH
- Path to where the generated FMU source code should be saved. Given path/to/folder the files can be found in path/to/folder/[FmuName] (default:None
)
mlfmu compile¶
Build FMU from FMU source code
mlfmu compile [-h] [-q | -v] [-l LOG] [-ll {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
[--fmu-source-path FMU_SOURCE_PATH] [--fmu-path FMU_PATH]
mlfmu compile options¶
-l
LOG
,--log
LOG
- name of log file. If specified, this will activate logging to file. If not, it does not log to file, only console. (default:None
)-ll
LOG_LEVEL
,--log-level
LOG_LEVEL
- log level applied to logging to file. Default: WARNING. (default:WARNING
)--fmu-source-path
FMU_SOURCE_PATH
- Path to the folder where the FMU source code is located. The folder needs to have the same name as the FMU. E.g. path/to/folder/[FmuName] (default:None
)--fmu-path
FMU_PATH
- Path to where the built FMU should be saved. (default:None
)
This tool utilizes cppfmu, source code is available at: https://github.com/viproma/cppfmu
_________________mlfmu___________________