RAVEN is a flexible and multi-purpose probabilistic risk analysis, validation and uncertainty quantification, parameter optimization, model reduction and data knowledge-discovering framework.
The initializeFromDict from the UniformDiscrete distribution is not fully (correctly) implemented.
It crashes even if the parameters that distribution takes are passed in (i.e. lowerBound, upperBound, nPoints, strategy).
 File "/Users/aalfonsi/projects/raven/ravenframework/SupervisedLearning/FeatureSelection/RFE.py", line 220, in _handleInput
discrete.initializeFromDict({'strategy': "withReplacement",'lowerBound': 0, 'upperBound': 1, 'nPoints': 2,})
 File "/Users/aalfonsi/projects/raven/ravenframework/Distributions.py", line 1925, in initializeFromDict
self.categoricalDist.initializeFromDict(inputDict)
 File "/Users/aalfonsi/projects/raven/ravenframework/Distributions.py", line 1698, in initializeFromDict
for idx, val in enumerate(inputDict['outcome']):
builtins.KeyError: 'outcome'
In addition, the manual in the example the is set as orderedWithReplacement that it does not exist (it should be withReplacement
Steps to Reproduce
from .Distributions import factory as distFactory
discrete = distFactory.returnInstance("UniformDiscrete")
discrete.initializeFromDict({'strategy': "withReplacement",'lowerBound': 0, 'upperBound': 1, 'nPoints': 2,})
Expected Behavior
The method to be used in the distribution creation (also from input file) to make sure the method is actually implemented correctly (And does not crash)
Screenshots and Input Files
 File "/Users/aalfonsi/projects/raven/ravenframework/SupervisedLearning/FeatureSelection/RFE.py", line 220, in _handleInput
discrete.initializeFromDict({'strategy': "withReplacement",'lowerBound': 0, 'upperBound': 1, 'nPoints': 2,})
 File "/Users/aalfonsi/projects/raven/ravenframework/Distributions.py", line 1925, in initializeFromDict
self.categoricalDist.initializeFromDict(inputDict)
 File "/Users/aalfonsi/projects/raven/ravenframework/Distributions.py", line 1698, in initializeFromDict
for idx, val in enumerate(inputDict['outcome']):
builtins.KeyError: 'outcome'
OS
MacOS
OS Version
No response
Dependency Manager
CONDA
For Change Control Board: Issue Review
[ ] Is it tagged with a type: defect or task?
[ ] Is it tagged with a priority: critical, normal or minor?
[ ] If it will impact requirements or requirements tests, is it tagged with requirements?
[ ] If it is a defect, can it cause wrong results for users? If so an email needs to be sent to the users.
[ ] Is a rationale provided? (Such as explaining why the improvement is needed or why current code is wrong.)
For Change Control Board: Issue Closure
[ ] If the issue is a defect, is the defect fixed?
[ ] If the issue is a defect, is the defect tested for in the regression test system? (If not explain why not.)
[ ] If the issue can impact users, has an email to the users group been written (the email should specify if the defect impacts stable or master)?
[ ] If the issue is a defect, does it impact the latest release branch? If yes, is there any issue tagged with release (create if needed)?
[ ] If the issue is being closed without a pull request, has an explanation of why it is being closed been provided?
Thank you for the defect report
RAVEN
.Defect Description
The
initializeFromDict
from theUniformDiscrete
distribution is not fully (correctly) implemented. It crashes even if the parameters that distribution takes are passed in (i.e. lowerBound, upperBound, nPoints, strategy).In addition, the manual in the example the is set as
orderedWithReplacement
that it does not exist (it should bewithReplacement
Steps to Reproduce
Expected Behavior
The method to be used in the distribution creation (also from input file) to make sure the method is actually implemented correctly (And does not crash)
Screenshots and Input Files
OS
MacOS
OS Version
No response
Dependency Manager
CONDA
For Change Control Board: Issue Review
For Change Control Board: Issue Closure