opendilab / LightZero

[NeurIPS 2023 Spotlight] LightZero: A Unified Benchmark for Monte Carlo Tree Search in General Sequential Decision Scenarios (awesome MCTS)
https://huggingface.co/spaces/OpenDILabCommunity/ZeroPal
Apache License 2.0
1.13k stars 117 forks source link

Configs are unrunnable due to ImportError of smz_tree #270

Closed TianrenWang closed 2 months ago

TianrenWang commented 2 months ago

Some configs I am able to run in version 0.0.3 (https://github.com/opendilab/LightZero/commit/3cb7fff41f65bb21463418f8a161818ed6a33f93) cannot be run in the latest main branch.

For example, zoo/board_games/connect4/config/connect4_alphazero_sp_mode_config.py encounters the error ImportError: cannot import name 'smz_tree' from 'lzero.mcts.ctree.ctree_sampled_muzero' (/Users/frankie/Desktop/LightZero/lzero/mcts/ctree/ctree_sampled_muzero/__init__.py) in latest main but was runnable in the release commit for version 0.0.3. At the very least, every config that I had the time to test in Gomoku and Connect4 encounters the same error.

puyuan1996 commented 2 months ago

Hello, the error you encountered may be due to the C++ code in the ctree_sampled_muzero directory failing to compile correctly, or it could be that the version of the code you are using lacks the relevant ctree_sampled_muzero code. We recommend that you use the latest code from the main branch and ensure that after executing the pip install -e . command, the installation is successful without any other error messages. This should resolve your issue. For similar problems, you can refer to this issue.

TianrenWang commented 2 months ago

Thank you for the reply! I must not have installed it properly earlier....reinstalling everything and making sure nothing failed resolved the issue.