generators issueshttps://git.rwth-aachen.de/groups/monticore/EmbeddedMontiArc/generators/-/issues2020-08-19T19:27:07+02:00https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAMOpt2Cpp/-/issues/2Problem classification2020-08-19T19:27:07+02:00Evgeny KusmenkoProblem classificationOptimization problems can be classified into different categories, cf. thesis of Christoph Richter, e.g. linear, quadratic, convex, etc.
EMAMOpt2CPP provides a [class](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMA...Optimization problems can be classified into different categories, cf. thesis of Christoph Richter, e.g. linear, quadratic, convex, etc.
EMAMOpt2CPP provides a [class](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAMOpt2Cpp/-/blob/master/src/main/java/de/monticore/lang/monticar/generator/cpp/optimizationSolver/problem/OptimizationProblemClassification.java
) detecting the problem class:
However, it seems to eb buggy. The corresponding [test](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAMOpt2Cpp/-/blob/master/src/test/java/de/monticore/lang/monticar/generator/cpp/optimizationSolver/problem/OptimizationProblemClassificationTest.java) has not been implemented.
Please investigate and try to fix this. We need a classification to enable an appropriate choice of solvers and also to possibly forbid some classes in safety critical systems.Jan Philipp HallerJan Philipp Haller2020-09-02https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/65MontiAnna Configuration Model2023-03-24T23:15:00+01:00Evgeny KusmenkoMontiAnna Configuration Model- [x] Please create a meta-model of a MontiAnna configuration as a class diagram
- [x] Please define the SA model transformation performed on the metal model , e.g. using pseudo-code
- [x] Please define the model transformation of other ...- [x] Please create a meta-model of a MontiAnna configuration as a class diagram
- [x] Please define the SA model transformation performed on the metal model , e.g. using pseudo-code
- [x] Please define the model transformation of other hyperparameter search algorithms performed on the configuration metal model , e.g. using pseudo-code
- [x] Please create object diagrams conforming to the meta-model for several steps of SA and other algorithms, cf. [OD ticket](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/63)Hiroshi HamanoAkashKumarDSHiroshi Hamano2023-03-10https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/43AutoML: Hyperparameter Search2023-03-04T10:41:15+01:00Evgeny KusmenkoAutoML: Hyperparameter Search- Please extend the framework to optimize the MontiAnna hyperparameters for a given learning problem
- extend the framework to automatically exchange pipeline components, e.g. exchange image preprocessing components
- create tests for yo...- Please extend the framework to optimize the MontiAnna hyperparameters for a given learning problem
- extend the framework to automatically exchange pipeline components, e.g. exchange image preprocessing components
- create tests for your framework
- create a model in the MNISTCalculator project X
- create a CI experiment in the MNISTCalculator projectHiroshi HamanoAkashKumarDSHiroshi Hamano2023-05-01https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/123Schema validation fails when root model is not called 'MnistClassifier' (PyTo...2024-02-05T12:17:13+01:00Jonas DjurevciSchema validation fails when root model is not called 'MnistClassifier' (PyTorch Backend)# Remark
The training configuration of a network must be named `<componentName>_<networkInstanceName>` (where `componentName` is the name of the component containing the network instance, and `networkInstanceName` is the name of the netw...# Remark
The training configuration of a network must be named `<componentName>_<networkInstanceName>` (where `componentName` is the name of the component containing the network instance, and `networkInstanceName` is the name of the network instance inside that component). For example, the training configuration of the network in 'adanet_experiment' must be named `mnistClassifier_net`, since the component containing the network is called 'MnistClassifier' and the instance name is 'net'. If the configuration name does not follow that pattern, executing the generated Python script will fail.
# Problem
During schema validation, the name of the configuration is checked for hardcoded values (see `de.monticore.mlpipelines.automl.helper.ConfigurationValidationHandler.getScmName()`). This means, that schema validation only succeeds if the name of the configuration is 'Supervised' or starts with 'mnistClassifier'. The first option is not viable, as the name must follow the pattern from above (see remark). Therefore, the configuration must be named `mnistClassifier_<networkInstanceName>`, which consequently means that the root emadl model must be called 'MnistClassifier' or 'mnistClassifier'. Executing the EMADL2CPP generator on other models will therefore fail.
# Steps to reproduce
Execute the generator on an architecture, whose root model is not called 'MnistClassifier' or 'mnistClassifier'. Example execution:
- Main class: `de.monticore.lang.monticar.emadl.generator.MontiAnnaCli`
- Program arguments: `-m src/main/resources/calculator_experiment/emadl -r calculator.Connector -o target -b PYTORCH`
# Workaround
Until this issue is fixed, the method `getScmName()` (see above) must be modified to allow schema validation for configurations with custom names. To allow the execution above, the method must be modified as follows:
```
private static String getScmName(ASTConfiguration configuration) {
String scmName = configuration.getName();
if (scmName.startsWith("mnistClassifier") || scmName.startsWith("connector")) {
scmName = "Supervised";
} else if (scmName.equals("AdaNet")) {
scmName = "NeuralArchitectureSearch";
}
return scmName;
}
```Antonio AntovskiAntonio Antovskihttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/122Network Tagging is ignored (PyTorch Backend)2024-02-05T12:17:01+01:00Jonas DjurevciNetwork Tagging is ignored (PyTorch Backend)# Problem
Multiple instances of the same network are trained separately instead of only once, even though a tagging file is present. While the tagging file is parsed and used to download the dataset, it is not used to determine, which ne...# Problem
Multiple instances of the same network are trained separately instead of only once, even though a tagging file is present. While the tagging file is parsed and used to download the dataset, it is not used to determine, which network instances have to be trained (see method `de.monticore.mlpipelines.workflow.AbstractWorkflow.getNetworkInstanceConfigs`). This requires the provision of one training and one pipeline configuration file per network instance.
# Steps to reproduce
Note: Getting far enough to trigger this problem requires implementing the workaround presented in issue #123, given that it is not yet solved.
Execute the EMADL2CPP generator on the MNISTCalculator example application located in `src/main/resources/calculator_experiment`.
For this purpose, use the following Run Configuration:
- Main class: `de.monticore.lang.monticar.emadl.generator.MontiAnnaCli`
- Program arguments: `-m src/main/resources/calculator_experiment/emadl -r calculator.Connector -o target -b PYTORCH`Antonio AntovskiAntonio Antovskihttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/121Training loss is NaN sometimes (PyTorch Backend)2024-02-05T12:16:44+01:00Jonas DjurevciTraining loss is NaN sometimes (PyTorch Backend)# Problem
When running certain experiments, the training loss calculation in src/main/resources/experiments/steps/MySupervisedTrainer.py (line 80) sometimes returns 'NaN'. This results in debug messages like:
`Epoch:1 Train Loss:nan Trai...# Problem
When running certain experiments, the training loss calculation in src/main/resources/experiments/steps/MySupervisedTrainer.py (line 80) sometimes returns 'NaN'. This results in debug messages like:
`Epoch:1 Train Loss:nan Train Accuracy:10.03%`
# Steps to reproduce
Note: Getting far enough to trigger this problem requires implementing the workaround presented in issue #123, given that it is not yet solved.
This issue is not deterministic. However, when executing the EMADL2CPP generator as follows, there is a high chance of encountering the problem.
- Main class: `de.monticore.lang.monticar.emadl.generator.MontiAnnaCli`
- Program arguments: `-m src/main/resources/calculator_experiment/emadl -r calculator.Connector -o target -b PYTORCH`
Out of the six runs generated by this execution, typically 2-4 runs exhibit this behavior.
I've never encountered this issue with other experiments like the 'adanet_experiment' or 'squaredigit_experiment', even though all mentioned experiments use the same loss metric (cross entropy).Antonio AntovskiAntonio Antovskihttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/112Saving checkpoints during the model training (PyTorch backend)2023-05-25T16:14:07+02:00Nazish QamarSaving checkpoints during the model training (PyTorch backend)Problem: The PyTorch backend allows saving the trained model only after the complete training.
Improvement: The training pipeline should save the model checkpoints after each epoch. If one tries to run the incomplete experiment later, t...Problem: The PyTorch backend allows saving the trained model only after the complete training.
Improvement: The training pipeline should save the model checkpoints after each epoch. If one tries to run the incomplete experiment later, there should be a provision in the training pipeline to load the latest checkpoint and continue the training from there.aixaiaixaihttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/109Open to-dos MA Mulhem2023-02-12T17:37:21+01:00Feras MulhemOpen to-dos MA MulhemOpen to-dos derived from Mulhem's Master thesis
- #108
- #107
- #106Open to-dos derived from Mulhem's Master thesis
- #108
- #107
- #106aixaiaixaihttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/108Workflow adjustment for multiple networks2023-02-12T17:37:21+01:00Feras MulhemWorkflow adjustment for multiple networks**Current situation**
The current workflow assumes one EMADL component representing a neural network. For applications like the MNISTCalculator we need to deal with multiple networks, possibly trained with different training configurati...**Current situation**
The current workflow assumes one EMADL component representing a neural network. For applications like the MNISTCalculator we need to deal with multiple networks, possibly trained with different training configurations.
**Tasks**
- [ ] When an EMADL model is given, iterate the model looking up all networks.
**Notes**
- The [EMADLGenerator] implemented (https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/blob/master/src/main/java/de/monticore/lang/monticar/emadl/generator/EMADLGenerator.java#L988) this functionality
- An example of how to resolve a neural network in an emadl model is given [here](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/blob/master/src/main/java/de/monticore/mlpipelines/workflow/AbstractWorkflow.java#L100)https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/107Naming conventions for emadl network components2023-02-12T17:37:21+01:00Feras MulhemNaming conventions for emadl network components**Current situation**
- A [naming convention](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/blob/master/src/main/java/de/monticore/mlpipelines/workflow/AbstractWorkflow.java#L67) is followed to resolve conf...**Current situation**
- A [naming convention](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/blob/master/src/main/java/de/monticore/mlpipelines/workflow/AbstractWorkflow.java#L67) is followed to resolve configuration such that these are assumed to have the _full name_ of a to-be-trained neural network.
**Tasks**
- [ ] Adjust the naming conventions to exclude the _package name_ from the network full name
- [ ] Adjust the names of the corresponding configurations accordingly. The configurations need also to have package information explicitly ( i.e. _package MyPackage_)https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/106Link pipeline configurations to their reference model2023-04-25T19:50:07+02:00Feras MulhemLink pipeline configurations to their reference modelThis issue aims to enable the toolchain to resolve the correct pipeline reference model based on the pipeline configuration. This mechanism is similar to resolving the training-time architectures using training configuration.
**Tasks**
...This issue aims to enable the toolchain to resolve the correct pipeline reference model based on the pipeline configuration. This mechanism is similar to resolving the training-time architectures using training configuration.
**Tasks**
- [ ] Add a schema definition that contains an entry for the desired reference model
- [ ] in the pipeline configuration add an entry that determines which schema shall be used ( for example _learning method_)
- [ ] Resolve the corresponding schema definitions for the given pipeline configuration
- [ ] Validate the pipeline configuration (similar to [training configurations](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/blob/master/src/main/java/de/monticore/mlpipelines/workflow/AbstractWorkflow.java#L139))
**Notes**
- The above-mentioneed steps shall be added as part of the commen [workflow ](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/blob/master/src/main/java/de/monticore/mlpipelines/workflow/AbstractWorkflow.java#L139 ) for ML pipelines.
- Currently, the workflow resolves a default pipeline reference modelTobias HörnschemeyerNazish QamarHiroshi HamanoAkashKumarDSTobias Hörnschemeyerhttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMAM2Middleware/-/issues/34Extend ROS topics to accept integer arrays for state representation2022-11-11T19:39:14+01:00Anis Abdollahi-SissanExtend ROS topics to accept integer arrays for state representationWhen using the EMAM2Middleware to generate a reinforcement learning agent, which is connected via ros-gym to python, defining the state as an integer array in python leads to an error, because the middleware initializes the state topic i...When using the EMAM2Middleware to generate a reinforcement learning agent, which is connected via ros-gym to python, defining the state as an integer array in python leads to an error, because the middleware initializes the state topic in ROS as Float32MultiArray, regardless of the definition in the python files.
[This](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/applications/reinforcement_learning/topologyoptimizer/-/blob/main/additional_files/Middleware/Environment.ftl) file implements Int32MultiArray as the default topic type for the state.
To resolve this issue, it would be necessary to automatically switch between the Float- and Integer-representation for the ROS state topic.
This can be implemented in the template file for the environment of the agent.Lukas BramThilo MetzlaffLukas Bramhttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/45Explicit input and output shape required2022-09-02T17:30:04+02:00Luis LaasExplicit input and output shape requiredA component currently requires explicit input and output shapes to be successfully parsed.
This works:
package rangePrediction;
component MLPL{
ports in Q(0:100)^{1} data,
out Q(-oo:+oo)^{1} prediction;
...A component currently requires explicit input and output shapes to be successfully parsed.
This works:
package rangePrediction;
component MLPL{
ports in Q(0:100)^{1} data,
out Q(-oo:+oo)^{1} prediction;
implementation CNN {
data -> prediction;
}
}
However this does not work:
package rangePrediction;
component MLPL{
ports in Q(0:100) data,
out Q(-oo:+oo) prediction;
implementation CNN {
data -> prediction;
}
}
Generating code terminates with this Exception:
Exception in thread "main" java.lang.IllegalStateException: Unknown port type
The expected behavior is that both versions work.
generator-version: 0.5.3
environment: registry.git.rwth-aachen.de/monticore/embeddedmontiarc/generators/emadl2cpp/mxnet/190https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/CNNArch2Caffe2/-/issues/7move train routine to a dedicated trainer2022-05-04T14:01:28+02:00Jonas Ritzmove train routine to a dedicated trainerin the other backends, the train(...) routine is implemented in specific trainers, e.g. CNNSupervisedTrainer, while here, it is implemented in the CNNCreator, but does not really belong therein the other backends, the train(...) routine is implemented in specific trainers, e.g. CNNSupervisedTrainer, while here, it is implemented in the CNNCreator, but does not really belong therehttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/CNNArch2Caffe2/-/issues/6Data Loading of hdf5 files2022-05-04T13:59:48+02:00Jonas RitzData Loading of hdf5 filesright now, this backend just supports loading lmdb files, there is no such thin as an extra dedicated dataloader compared to the other backends where one could implement cleaningright now, this backend just supports loading lmdb files, there is no such thin as an extra dedicated dataloader compared to the other backends where one could implement cleaninghttps://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/CNNArch2Gluon/-/issues/9Generate Network execution based on Training and Test data2022-02-15T11:16:06+01:00Jonas RitzGenerate Network execution based on Training and Test dataSometimes you want to execute your network with some training or test data examples and e.g. visualize how it performs. Therefore there is yet C++ Code generated which enables an execution of the network.
Unfortunately, the loading of th...Sometimes you want to execute your network with some training or test data examples and e.g. visualize how it performs. Therefore there is yet C++ Code generated which enables an execution of the network.
Unfortunately, the loading of the data has to be done by hand, even if you want to execute the network with training data, for example when loading images or importing hdf5 data.
Therefore, the plan is to let the execution be generated (aditionally in python) and let the user of the framework only insert an index of the training or test data point which he wants to be executed, in order to then receive the prediciton and the label and compare in help of his code. In this context the DataLoader can be reused in the execution, but for that it must be available in the execution.https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/36Reference models not copied to generation target path2022-03-31T09:44:03+02:00Ghost UserReference models not copied to generation target pathThe method `EMADLGenerator.copySchemaFilesFromResource` (https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/blob/master/src/main/java/de/monticore/lang/monticar/emadl/generator/EMADLGenerator.java#L1104) copies ...The method `EMADLGenerator.copySchemaFilesFromResource` (https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/blob/master/src/main/java/de/monticore/lang/monticar/emadl/generator/EMADLGenerator.java#L1104) copies the schema files (`*.scm`) to the generation target path, however, it does not copy the reference models (`*.ema`), leading to exceptions when running the generator with the reinforcement learning and GAN pipelines.
This method must be changed such that along with the schema files, also the reference models are copied to the generation target path.https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/33Generation of execute code fails for similar component names2021-12-07T12:45:51+01:00Evgeny KusmenkoGeneration of execute code fails for similar component namesSometimes the generator confuses similar component names, e.g. `number1_ones` and `number1` in
[this model](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/applications/mnistcalculator/-/blob/1718997f3019e4efe3da4fa853f1df460406400...Sometimes the generator confuses similar component names, e.g. `number1_ones` and `number1` in
[this model](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/applications/mnistcalculator/-/blob/1718997f3019e4efe3da4fa853f1df4604064009/gluon-cpp/src/emadl/models/cNNCalculator/Calculator.emadl)
here the `number1 ` component gets executed instead of `number1_ones`, `number1_tens`, `number1_hundreds`. Same happens for `number2` and the respective ArgMax components.
Please fix this and rename the Argmax components back to `number1_ones`, `number1_tens`, `number1_hundreds`, etc. in the master branch.https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/32Failing tests2021-11-22T12:08:50+01:00Ghost UserFailing testsThe following test cases were not executed by the pipeline due to a process termination caused by a wrong initializing of the global logger. After fixing the issue, the following tests are now failing and must be fixed.
- CMakeGeneratio...The following test cases were not executed by the pipeline due to a process termination caused by a wrong initializing of the global logger. After fixing the issue, the following tests are now failing and must be fixed.
- CMakeGenerationTest.testModelWithIpopt()
- IntegrationGluonTest.testEpisodicMemorySimple()
- IntegrationGluonTest.testGluonPreprocessingWithSupervised()
- IntegrationGluonTest.testGluonPreprocessingWithGAN()https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/EMADL2CPP/-/issues/31Order of input port names2021-12-07T16:21:14+01:00Evgeny KusmenkoOrder of input port namesthere is a bug concerning usage of input port names / layer names. order seems to override namesthere is a bug concerning usage of input port names / layer names. order seems to override namesNils BaumannNils Baumann