-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python bindings for Lc0 backend. #1261
Conversation
Example session:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't build with python 3.7 with some link error, but this may be an issue with my setup. However python 3.8 seems to work fine. Also I get a few warnings when compiling.
cpython = dependency('python3') | ||
python.extension_module('backends', | ||
[py_files + files], | ||
include_directories: [includes], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding cpp_args: cc.get_supported_arguments(['-Wno-c99-extensions', '-Wno-pedantic', '-Wno-missing-field-initializers']),
here silences a lot of the warnings, but probably not a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c99-extension that I use will appear in C++20, so I'd ignore that. Other ones probably worth fixing, but I'll do it later (clang also emits some set of warnings).
How to use run MCTS simulations in the backends? |
Is there a way I can retrieve centipawn scores from the binding? |
How do I know the winner of the game? |
Can you guys please work a bit more with documentation and tutorials? I'm a big fan of Lc0 and there are so many great things in this repo, but there is no more or less full tutorial & explanation how and what to use here. I suppose, your solution far exceeded the amount of work that should be documented. |
@Hidancloud not sure if you already saw this but just in case looks like there's a more up-to-date solution here: #1856 If all you want to do is install the python bindings, looks like you just need to |
Hi there, I get the following error while installing bindings with
I have Win64 platform with no CUDA or cuDNN, perform the installation in a virtual env. |
Building:
backends.cpython-38-x86_64-linux-gnu.so
will appear in the build directory (in Windows, the extension should be .pyd).import lczero.backends
and it should all work!