Hi,
The Python library named Ray (https://www.ray.io/) was added to LEAN in 2021:
Since then, it seems that it's been broken. When calling ray.init(), this is the error thrown:
[ERROR] FATAL UNHANDLED EXCEPTION:2022-05-11 03:27:48,039 WARNING utils.py:535 -- Detecting docker specified CPUs. In previous versions of Ray, CPU detection in containers was incorrect. Please ensure that Ray has enough CPUs allocated. As a temporary workaround to revert to the prior behavior, set `RAY_USE_MULTIPROCESSING_CPU_COUNT=1` as an env var before starting Ray. Set the env var: `RAY_DISABLE_DOCKER_CPU_WARNING=1` to mute this warning.,2022-05-11 03:27:49,368 WARNING services.py:1826 -- WARNING: The object store is using /tmp instead of /dev/shm because /dev/shm has only 67108864 bytes available. This will harm performance! You may be able to free up space by deleting files in /dev/shm. If you are inside a Docker container, you can increase /dev/shm size by passing '--shm-size=2.77gb' to 'docker run' (or add it to the run_options list in a Ray cluster config). Make sure to set this to more than 30% of available RAM.,2022-05-11 03:28:36,237 ERROR worker.py:478 -- print_logs: Connection closed by server.,2022-05-11 03:28:36,237 ERROR worker.py:1247 -- listen_error_messages_raylet: Connection closed by server.,2022-05-11 03:28:36,237 ERROR import_thread.py:89 -- ImportThread: Connection closed by server.,terminate called without an active exception,runLauncher.sh: line 15: 7 Aborted (core dumped) dotnet QuantConnect.Lean.Launcher.dll --data-folder /Data --config /QuantConnect/backtesting/airlock/config.json --results-destination-folder /QuantConnect/backtesting/airlock/
Ray being a fantastic library for Python, I believe it is worth the time to fix it and make it running again in LEAN.
Thanks,
Fred
Varad Kabade
Hi Fred,
Would you mind providing us with a minimum example to reproduce the issue?
Best,
Varad Kabade
Fred Painchaud
Hi Varad,
Sure.
Fred
Varad Kabade
Hi Fred,
Thank you for reporting the issue.
We have created a GH issue to have it resolved. Subscribe to the following for updates:
https://github.com/QuantConnect/Lean/issues/6338
Best,
Varad Kabade
Fred Painchaud
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!