Whenever I close my browser and return to an active Research project, all the plotly graphs stop working - only show blank (shown below). Any way of fixing it/restarting plotly without killing the kernel? This is particularly useful when the kernel needs hours to complete and I need to walk away and come back later...
Jared Broad
Hey Gregory, saving the outputs of research cells is huge so we only save the inputs and when needed you can regenerate them. After a notebook is idle for several hours the content is saved and the machine is shut down.Â
You might be able to work around your challenge by serializing the work you've spent hours generating and saving it to the object store, then downloading the serialized data from the object-store.Â
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Gregory Szczeszynski
Thanks, so there's really 2 issues here:
1) When you close the browser and reload it before machine is shut-down, the plotly graphs show blank results - to be clear they show a rectangle the size of the graph except it's blank. I found a solution that works online to be as follows:
import plotly.io as pio pio.renderers.default='notebook' .... # and when you're ready to show graph do the following: myplot.show("notebook")
2) When the machine is auto shutdown, you lose all data. For that I will need to export the dataframe to json (e.g. df.to_json) and save to objectstore (e.g. self.ObjectStore.Save("MyObject", <json_string>). Thanks for this, was unaware!
Greg
Gregory Szczeszynski
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!