Some problems with data display
Closed this issue · 5 comments
Hello,sir. I'm sorry to trouble you. I re-run the wdm2 file, but I interrupted during the optimization process. And then I used the method called Option 1: Using a monitor specification file
to plot the data. At this moment, an error called Keyerror:event:stage
prompted. Is this error happened because the data that has not been completely optimized overwrites the previous data in the file "monitor_spec.yml"? Is this error caused by incomplete data? For each kind of simulation, do monitor_spec.yml
need to be created manually and the content corresponds to the monitors of the simulation??
I have no wide understanding of SPINS, but I just want to make some points clear as I had many problems earlier, too.
To the extent I know, SPINS data inspection code draw data from .pkl files, which are the outputs of one SPINS run.
In order to get no error, you may want to look for these:
-
Check your monitor_spec.yml file for monitor names, which should be the same as the monitors in wdm2.py
-
Make sure the outputs (stepX.pkl) are in the same folder as your "monitor_processing_example.ipynb" file. (it does not matter how many pkl you have, but make sure they belong to one specific simulation and starting from step1.pkl) Also, check "monitor_spec.yml" is also in the same folder.
-
Make sure "monitor_processing_example.ipynb" is default file that you downloaded from GitHub. You need to make sure the monitors you want to draw by this example processing file are all within "monitor_spec.yml" and the monitors are produced with right names (matching names from wdm2.py - monitor_spec.yml) as a result of the design process (which are embedded in stepX.pkl files, as I understand)
Can it be understood like this,the file monitor_processing_example.ipynb
is used to teach us how to plot data(no other function). The filemonitor_spec.yml
must be created and editored manually. But when i run other optimization that I design by myself, a txt file called spins in the wdm2 file record the optimization information rather than the folder where the current optimization program is located. Thank you for your help!
Again, no professional comment here, just my observations...
Basically, monitor_spec.yml is for configuration of monitors, which are to be examined by calling specific functions in SPINS. The example file (monitor_processing_example.ipynb) is there as an example of how one simulation result is processed.
spins.log file (which I assume what you call as "txt file called spins") just saves the progress of the simulation. It is just a log file for later processing. So, as far as I understand, it works for continuation of a simulation, where a simulation is broken during progress. (check solver.py functions)
The results, in fact, are stored in stepX.pkl files, where X indicates the iteration number.
Hi, When I run the example called bend90, raise a problem `
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.`
I try to find the problem on the Internet, and someone say that is a problem about multiprocess. So I want to ask how I can solve this operational problem。Thanks
Hi, is this still an issue?