Urban-Analytics / RAMP-UA

https://urban-analytics.github.io/RAMP-UA/
MIT License
15 stars 10 forks source link

OpenCL model doesn't save (a default) output when in GUI mode #264

Open ciupava opened 3 years ago

ciupava commented 3 years ago

Probably this is a wanted behaviour from the model, but I wanted to double check this with you, plus maybe ask the reason for it and if we shall modify it. What I refer to is the lines of code https://github.com/Urban-Analytics/RAMP-UA/blob/445649fa018e1348e423e3945b74054864752f97/microsim/opencl/ramp/run.py#L28-L32 within microsim/opencl/ramp/run.py. It makes sense to me that if you run the model with the gui (ie it launches the dashboard) you can then save your image/results depending on how you change the parameters in the dashboard (that is the general idea right?), though if one only runs the model in gui doesn't get any default output, which is instead the case with the no-gui option. I think this feature might be more customisable, or at least make clearer to the user that this is what happens.

github-actions[bot] commented 3 years ago

Branch Sparrow0hawk-issue-264 created!

github-actions[bot] commented 3 years ago

Branch nickmalleson-issue-264 created!

nickmalleson commented 3 years ago

Sorry @ciupava I'm slightly confused, what did you mean by 'though if one only runs the model in gui doesn't get any default output' could you rephrase slightly? I'm not sure what the specific question is

ciupava commented 3 years ago

Hi @nickmalleson! Fair enough, I will try to reformulate: the function store_summary_data (that saves the outputs, see few line below in the file) runs only if use-gui is set to False (see the if constructor at line 28).

nickmalleson commented 3 years ago

Ah OK thanks @ciupava . I'm not sure why that would be. I don't see any harm in removing that conditional and seeing what happens. If it breaks then we can ask Rory about it.

ciupava commented 3 years ago

My guess is that the reason for this is that you keep the option of saving the output from the dashboard directly (there is in fact an option there), so maybe the output would differ from the default one if you change some parameters when in the dashboard. The else in the conditional runs also the function run_headless and that would still be needed if running without gui, so removing the conditional with remove this possibility in general. So I wouldn't remove the conditional, because one can still decide if to run the model with gui or not, but would consider if adding the store_summary_data in the gui option as well, assuming that what I wrote above makes sense (ie do you really want to save the output before running the dashboard?). So my real question maybe is: when one uses the dashboard, how does he/she affect the results?