-
Notifications
You must be signed in to change notification settings - Fork 144
Description
Thank you for the defect report
- I am using the latest version of
RAVEN. - I have read the Wiki.
- I have created a minimum, reproducible example
that demonstrates the defect.
Defect Description
Traceback (most recent call last): File "/Users/aalfonsi/projects/raven/raven_framework.py", line 25, in <module> sys.exit(main(True)) ^^^^^^^^^^ File "/Users/aalfonsi/projects/raven/ravenframework/Driver.py", line 207, in main raven() File "/Users/aalfonsi/projects/raven/ravenframework/Driver.py", line 160, in raven simulation.run() File "/Users/aalfonsi/projects/raven/ravenframework/Simulation.py", line 909, in run self.executeStep(stepInputDict, stepInstance) File "/Users/aalfonsi/projects/raven/ravenframework/Simulation.py", line 842, in executeStep stepInstance.takeAstep(stepInputDict) File "/Users/aalfonsi/projects/raven/ravenframework/Steps/Step.py", line 320, in takeAstep self._localTakeAstepRun(inDictionary) File "/Users/aalfonsi/projects/raven/ravenframework/Steps/MultiRun.py", line 224, in _localTakeAstepRun sampler.finalizeActualSampling(finishedJobList[0],model,inputs) File "/Users/aalfonsi/projects/raven/ravenframework/Samplers/Sampler.py", line 1134, in finalizeActualSampling self.localFinalizeActualSampling(jobObject, model, myInput) File "/Users/aalfonsi/projects/raven/ravenframework/Optimizers/RavenSampled.py", line 325, in localFinalizeActualSampling self._useRealization(info, rlz) File "/Users/aalfonsi/projects/raven/ravenframework/Optimizers/GeneticAlgorithm.py", line 853, in _useRealization self._resolveNewGeneration(traj, rlz, info) File "/Users/aalfonsi/projects/raven/ravenframework/Optimizers/GeneticAlgorithm.py", line 976, in _resolveNewGeneration converged = self._updateConvergence(traj, rlz, old, acceptable) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/aalfonsi/projects/raven/ravenframework/Optimizers/GeneticAlgorithm.py", line 1324, in _updateConvergence converged, convDict = self.checkConvergence(traj, new, old) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/aalfonsi/projects/raven/ravenframework/Optimizers/GeneticAlgorithm.py", line 1120, in checkConvergence okay = f(traj, new=new, old=old) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/aalfonsi/projects/raven/ravenframework/Optimizers/GeneticAlgorithm.py", line 1146, in _checkConvObjective converged = (currentObj == self._convergenceCriteria['objective'][i]) and converged ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^ TypeError: 'float' object is not subscriptable
By default, the convergence criteria on the objective (self._convergenceCriteria['objective']'') is float. The multi-objective always expects a list of convergence criteria self._convergenceCriteria['objective'][I]''). This causes another crash.
Steps to Reproduce
simply don't specify a convergence criteria for the genetic, and this error will pop up .
Expected Behavior
No crash?
Screenshots and Input Files
No response
OS
Linux
OS Version
No response
Dependency Manager
PIP
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?