Hello Community!
We are excited to announce that starting from version 16312, we have updated the Lean engine to use Python 3.11.7, along with updating our supported libraries to their latest versions and adding a few new libraries.
The library updates include pandas 2.1.4, TensorFlow 2.16.1, OpenAI 1.14.3, LangChain 0.1.12, among others. Some of the new library additions are TPOT 0.12.2, llama-index 0.10.19, PyCaret 3.3.0.
Pandas 2 comes with some API changes and removals, some we can mention are:
- ‘iteritems’ is not longer available, ‘items’ can be used instead
- ‘tshift/slice_shift’ have been removed, ‘shift’ can be use instead
- ‘mean/sum’ now require in some cases to specify ‘numeric_only=True’
We have also added the ‘Foundation-Autokeras’ environment, a backward compatibility environment for compatibility with Keras < 3, and TF 2.14.1, and Pydantic<2, which include libraries like keras-tcn 3.5.0, nixtlats 0.2.0, scikeras 0.12.0.
Our documentation has been updated to reflect these changes: QuantConnect Docs - Package Environments. For more details, you can visit the Lean PR here.
Please let us know if you encounter any related issues. Thank you!
Shaohua Lu
Hi,
Thank you very much for informing us the change.
I found that after update, the custom library cannot be found even you add it to your project.
For example, after you run the command lean library add “My Project” pymssql, and then you run lean backtest “My Project”, the system still report that it cannot find module pymssql.
A solution to this is that, every time you need to clear the volume first and then download the lean volume to let the system download the pymssql.
I would like to ask is it possible to add pymssql to supported libraries?
Thank you very much
.ekz.
Thanks for the update!
I got tripped up by one of the changes, so I'm sharing here in case it helps others.
Historically, the Pandas DataFrame object has had an ‘append’ method, which I use fairly often. It's gone now.
All dataframe calls to append() should be replaced with concat(). Here's the relevant line from the Pandas v2 release notes.
Cheers.
Martin Molinero
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!