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

NSGA Optimization: Analysis Web page crashes when optimization variable is a string. #539

Closed
phylroy opened this issue Dec 12, 2019 · 0 comments · Fixed by #658
Closed

Comments

@phylroy
Copy link

phylroy commented Dec 12, 2019

General Issue / Feature Information

Description

When issuing a analysis using a measure variable as a optimization function. If the variable is a string the analysis web page with issue a message saying "We're Sorry but an error has occurred"

Reproduction steps:

  1. Create a report measure with a runner.registerValue("variable", "a_string")
  2. In PAT set up an NSGA run and used the "variable" in one of the objective functions.
  3. Send analysis to AWS and watch it fail when the first generation is complete.
  4. Click on the analysis page link on the OS Server.

Actual outcome:
Error 500 Page "We're Sorry but an error has occurred"

Expected outcome:
Analysis page should show.

Client operating system version:

Windows 10 -> AWS

Error on Remote Server Details

[23:54:18.261819 INFO]   Rendered analyses/_table.html.erb (162.3ms)
[23:54:18.261983 INFO]   Rendered analyses/show.html.erb within layouts/application (190.3ms)
[23:54:18.262211 INFO] Completed 500 Internal Server Error in 232ms
[23:54:18.263603 FATAL]
[23:54:18.263668 FATAL] ActionView::Template::Error (undefined method `round' for "491.57060411612804":String):
[23:54:18.263896 FATAL]     119:                 <td class="<%= class_var %>">
    120:                   <% if dp.results[ov['name'].split(".")[0]] && dp.results[ov['name'].split(".")[0]][ov['name'].split(".")[1]] %>
    121:                     <% if dp.results[ov['name'].split(".")[0]][ov['name'].split(".")[1]] =~ /\A[-+]?[0-9]*\.?[0-9]+\Z/ %>
    122:                       <%= dp.results[ov['name'].split(".")[0]][ov['name'].split(".")[1]].round(2) %>
    123:                     <% else %>
    124:                       <%= dp.results[ov['name'].split(".")[0]][ov['name'].split(".")[1]] %>
    125:                     <% end %>
[23:54:18.263949 FATAL]
[23:54:18.263997 FATAL] app/views/analyses/_table.html.erb:122:in `block (2 levels) in _app_views_analyses__table_html_erb__1715034422678640100_62526840'
app/views/analyses/_table.html.erb:117:in `block in _app_views_analyses__table_html_erb__1715034422678640100_62526840'
app/views/analyses/_table.html.erb:112:in `_app_views_analyses__table_html_erb__1715034422678640100_62526840'
app/views/analyses/show.html.erb:165:in `_app_views_analyses_show_html_erb__811259909670415614_63508020'

AMI version being used

2.8.1-x

tijcolem added a commit that referenced this issue May 24, 2022
fix #539 and add significant digit toggle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant