Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization <SolutionExport> error #1474

Closed
10 tasks done
SamKerber opened this issue Mar 12, 2021 · 2 comments · Fixed by #1616
Closed
10 tasks done

Optimization <SolutionExport> error #1474

SamKerber opened this issue Mar 12, 2021 · 2 comments · Fixed by #1616
Assignees
Labels
defect priority_normal RAVENv2.1 All tasks and defects that will go in RAVEN v2.1

Comments

@SamKerber
Copy link

SamKerber commented Mar 12, 2021


When running an optimization, if is not provided in the code will run the optimization but then fail at the end

Describe the defect

What did you expect to see happen?

No errors

What did you see instead?

"AttributeError: 'NoneType' object has no attribute 'addRealization'"

Do you have a suggested fix for the development team?

Describe how to Reproduce
Steps to reproduce the behavior:

  1. Run optimization without node in the section

Screenshots and Input Files
Please attach the input file(s) that generate this error. The simpler the input, the faster we can find the issue.
Screen Shot 2021-03-12 at 2 34 13 PM

ErrorReport.zip

Platform (please complete the following information):

  • OS: [e.g. iOS] Catalina
  • Version: [e.g. 22] 10.15.7
  • Dependencies Installation: [CONDA or PIP] Conda

For Change Control Board: Issue Review

This review should occur before any development is performed as a response to this issue.

  • 1. Is it tagged with a type: defect or task?
  • 2. Is it tagged with a priority: critical, normal or minor?
  • 3. If it will impact requirements or requirements tests, is it tagged with requirements?
  • 4. If it is a defect, can it cause wrong results for users? If so an email needs to be sent to the users.
  • 5. Is a rationale provided? (Such as explaining why the improvement is needed or why current code is wrong.)

For Change Control Board: Issue Closure

This review should occur when the issue is imminently going to be closed.

  • 1. If the issue is a defect, is the defect fixed?
  • 2. If the issue is a defect, is the defect tested for in the regression test system? (If not explain why not.)
  • 3. 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)?
  • 4. 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)?
  • 5. If the issue is being closed without a pull request, has an explanation of why it is being closed been provided?
@PaulTalbot-INL
Copy link
Collaborator

I see the real issue here being that the user was allowed to make an Optimizer without a SolutionExport node, perhaps?

@joshua-cogliati-inl
Copy link
Contributor

joshua-cogliati-inl commented Jul 20, 2021

If someone wants to replicate the problem with one of our test cases, here are the changes needed:

diff --git a/tests/framework/Optimizers/GradientDescent/central_diff.xml b/tests/framework/Optimizers/GradientDescent/central_diff.xml
index ab5093669..ac1b01a8d 100644
--- a/tests/framework/Optimizers/GradientDescent/central_diff.xml
+++ b/tests/framework/Optimizers/GradientDescent/central_diff.xml
@@ -24,14 +24,14 @@
       <Input class="DataObjects" type="PointSet">placeholder</Input>
       <Model class="Models" type="ExternalModel">beale</Model>
       <Optimizer class="Optimizers" type="SPSA">opter</Optimizer>
-      <SolutionExport class="DataObjects" type="PointSet">opt_export</SolutionExport>
+      <!-- <SolutionExport class="DataObjects" type="PointSet">opt_export</SolutionExport> -->
       <Output class="DataObjects" type="PointSet">optOut</Output>
-      <Output class="OutStreams" type="Print">opt_export</Output>
+      <!-- <Output class="OutStreams" type="Print">opt_export</Output> -->
     </MultiRun>
     <IOStep name="print">
       <Output class="DataObjects" type="PointSet">optOut</Output>
-      <Output class="OutStreams" type="Print">opt_export</Output>
+      <!-- <Output class="OutStreams" type="Print">opt_export</Output> -->
     </MultiRun>
     <IOStep name="print">
-      <Input class="DataObjects" type="PointSet">opt_export</Input>
+      <!-- <Input class="DataObjects" type="PointSet">opt_export</Input> -->
       <Input class="DataObjects" type="PointSet">optOut</Input>
-      <Output class="OutStreams" type="Print">opt_export</Output>
+      <!-- <Output class="OutStreams" type="Print">opt_export</Output> -->
       <Output class="OutStreams" type="Print">optOut</Output>
     </IOStep>
   </Steps>

This basically needed to have a better error message, so no extra test in the regression system is needed.

@wangcj05 wangcj05 added the RAVENv2.1 All tasks and defects that will go in RAVEN v2.1 label Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect priority_normal RAVENv2.1 All tasks and defects that will go in RAVEN v2.1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants