"ClassCastException when setting integer value for σ in noise-data component."
Summary
When setting an integer value for σ in the noise-data component of the pipeline configuration, a ClassCastException is thrown. This issue does not occur when setting a double value for σ in the same component, but integer values work fine in other components like normal-distribution.
Component
generator.main
Steps to reproduce
Set integer value for σ when trying to set the normal-distribution in the noise-data step when generating data
A ClassCastException occurs when setting an integer value for σ.
Expected Behavior
The pipeline should execute successfully with an integer value for σ.
Relevant logs and/or screenshots
import "definitions" from de.evoal.core.math;
import "definitions" from de.evoal.generator.generator;
import "data" from ackley;
module ackley {
/**
* Introduce a simple pipeline that generates some test data using
* the ackley function.
*/
pipeline 'main-pipeline' [
/**
* First, we generate some normally distributed data.
*/
step {
component 'normal-distribution' {
'μ' := 0.0;
'σ' := 5.12;
}
writes [data 'x:0'];
}
step {
component 'ackley' {
}
reads [data 'x:0'];
writes [data 'y:0'];
}
step {
component 'noise-data' {
/* define distribution per data */
distributions := [
'normal-distribution' {
'μ' := 0.0;
'σ' := 5; // Integer value causing the issue
}
];
}
reads [data 'y:0'];
writes [data 'y:0'];
}
]
write "ackley.json" with 1000 samples from executing [ pipeline 'main-pipeline'];
}
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
Contact Person
(Link a person/ people, that can answer questions about this issue, e.g. yourself)
/cc @berber
Edited by Helge Friedrich