Issue with optuna 3rd party plugin. This code is straight from their website. It does NOT work. Works on my local machine fine.
Some reason it is saying create_study does not exist but look at images below and it obviously does. I cant view the version but I can see that it has a __ file ___, and I can access dir(optuna)… what the heck !?
Mia Alissi
It seems there isn't specific documentation or examples directly related to using Optuna with QuantConnect. However, let's address the issue you're facing with the
create_study
function not being recognized.Here are some steps you can take to troubleshoot and resolve the issue:
Check Optuna Installation: Ensure that Optuna is installed correctly in your QuantConnect environment. You can do this by running a simple import test in your algorithm:
Verify Optuna Version: Since you can't directly view the version, try checking for any version-specific features or changes in the Optuna documentation that might affect the
create_study
function.Function Usage: Ensure that you are using the
create_study
function correctly. Here's a basic example of how it should be used:Check for Compatibility Issues: There might be compatibility issues between the version of Optuna you are using locally and the one available on QuantConnect. If possible, align the versions or check for any breaking changes in the newer versions.
Reach Out for Support: If the issue persists, consider reaching out to QuantConnect support with detailed information about the error and the context in which it occurs.
If you continue to face issues, you might want to explore alternative optimization libraries that are confirmed to work on QuantConnect.
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.
Kurtis
I also tried implementing a strategy with optuna. Same issue, seems to not being exported into the environment correctly with ‘create_study’ failing first and so need to use a brute force approach which is BRUTALLY slow.
Kurtis
I am reaching out… here? Thank you
Louis Szeto
Hi Kurtis
I cannot reproduce your issue, are you using the latest build of lean?
BTW I believe you should refer to v3.5.0 docs for optuna.
Best
Louis
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.
Kurtis
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!