Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
More Strange (and Dangerous!) Notebook Behavior

Someone really needs to look at the research notebooks. There is very odd behavior happening and has been for a week now.

  • Notebooks "mysteriously" can't reference variables or functions periodically, sometimes even in the same code block. This shows up as "blah blah is undefined" when you're staring right at it.
  • Similarly, notebooks that run fine and have been used many times will suddenly "not work" for odd reasons. This takes numerous forms but the one I've seen most recently was that "estimate /= num" is improper syntax. A few reloads of the kernel does not fix it. Changing the line, eg. to "estimate = estimate / num" fixes it and magically I can change it right back to "estimate /= num" and it suddenly works again.
  • Memory measurement seems off. I can run a notebook that uses ~60% of the memory, rerun a simple plotting cell and it will reload as being out of memory. I don't know what is causing this but it's incredibly irritating to lose hours or days of results to something like this.
  • When the second item happens, I will sometimes get inconsistent numerical results. I have started double calculating certain things (once with numpy, once with straight python) so I can detect when this is happening and reload the kernel.

If people are experiencing any of the above behavior, be very careful about the last item and put some sanity checks in. Until this is resolved, I would be highly suspicious of any results in the research notebooks unless you have triple checked everything and can validate the results across multiple kernel restarts.

My suspicion is these are all related. Is anyone else experiencing anything like this?

5 responses

Some search results on notebook memory. I'd try a test in-house at Q comparing latest Python in case it handles things better since a post I read said that worked for them. Previous 2.7 was a problem.

Hey Quantopian folks, I realize I raised this flag over the weekend...can we anticipate this being a priority for the week?

Hi Rob, we are currently unaware of these issues, and will look into them today.

Can you provide code samples that reproduce the results you are referencing? This will help us diagnose the root cause more quickly.

Disclaimer

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 Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian 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.

Cal, thanks for the quick response! I wish I could reproduce it but I don't think this is a code line bug (at least not within the notebook server). The symptoms are too strange, frankly, it feels like the machine or the OS or the packages are haywire. As you can see above, even simple division of one FP by another was doing it (and the fix makes no sense either!).

It's currently working normally. I can try to take some screenshots when it does it again maybe? I was hoping someone would just see fire in the notebook server logs :D.

Hi Rob,

The team peaked into the server logs, and it seems like things were normal on our side.

The scenario you described is concerning to us. We care that your code is deterministic and produces logical results - something that every programmer should care about! Unfortunately, we haven't seen reports of this type of behavior from others. If you can either reproduce the errors in question, or provide us with the exact time that an error like that happens (give or take a few minutes), that would help us hone in on the root cause.