Comments (15)
Sorry, it seems the readme and the code was not in sync. Are things better now?
from sunfish.
i see you changed the folder structure and file name(s), but now i have this error :
$ tools/fancy.py -cmd "./sunfish_nnue.py nnue/models/tanh.pickle"
Traceback (most recent call last):
File "/home/roelof/Compiled/sunfish/tools/fancy.py", line 284, in <module>
asyncio.run(main())
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/home/roelof/Compiled/sunfish/tools/fancy.py", line 234, in main
engine = await load_engine_from_cmd(args.cmd, debug=args.debug)
File "/home/roelof/Compiled/sunfish/tools/fancy.py", line 40, in load_engine_from_cmd
_, engine = await chess.engine.popen_uci(cmd.split())
File "/home/roelof/Compiled/sunfish/venv/lib/python3.10/site-packages/chess/engine.py", line 2681, in popen_uci
await protocol.initialize()
File "/home/roelof/Compiled/sunfish/venv/lib/python3.10/site-packages/chess/engine.py", line 1429, in initialize
return await self.communicate(UciInitializeCommand)
File "/home/roelof/Compiled/sunfish/venv/lib/python3.10/site-packages/chess/engine.py", line 1094, in communicate
return await command.result
chess.engine.EngineTerminatedError: engine process died unexpectedly (exit code: 1)
from sunfish.
What do you get if you just run "./sunfish_nnue.py nnue/models/tanh.pickle"?
from sunfish.
that's a good test .. now i get this error :
$ ./sunfish_nnue.py nnue/models/tanh.pickle
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/numpy/core/__init__.py", line 22, in <module>
from . import multiarray
File "/usr/lib/python3/dist-packages/numpy/core/multiarray.py", line 12, in <module>
from . import overrides
File "/usr/lib/python3/dist-packages/numpy/core/overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./sunfish_nnue.py", line 6, in <module>
import numpy as np
File "/usr/lib/python3/dist-packages/numpy/__init__.py", line 150, in <module>
from . import core
File "/usr/lib/python3/dist-packages/numpy/core/__init__.py", line 48, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.8 from "/usr/bin/pypy3"
* The NumPy version is: "1.21.5"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: No module named 'numpy.core._multiarray_umath'
btw. this terminal command, and also the previous one, was done using an env with python3 .. must i install some required modules ?
from sunfish.
i think i solved it .. i changed the top line :
#!/usr/bin/env pypy3
into
#!/usr/bin/env python3
and then it runs :
$ ./sunfish_nnue.py nnue/models/tanh.pickle
uci
id name sunfish nnue
option name EVAL_ROUGHNESS type spin default 13 min 0 max 50
uciok
from sunfish.
this way also ./tools/fancy.py -cmd "./sunfish_nnue.py nnue/models/tanh.pickle"
works .. so i guess it's solved!
from sunfish.
What did you change? Just adding "./" before "tools"? That shouldn't make a difference...
Ah, you changed it to use python3 instead of pypy3.
I wish there was a way to automatically detect which version of python was available and use that.
from sunfish.
I wish there was a way to automatically detect which version of python was available and use that.
i don't know, and i never had the need to do such. You can put some info on this in the README ? To make Sunfish faster / stronger the user can do a few code changes ? I don't mind that and i think most users will (then) be able to.
from sunfish.
You mean use python3 as default and have the user switch to pypy manually?
from sunfish.
You mean use python3 as default and have the user switch to pypy manually?
yes, and write a short note about it.
from sunfish.
Why use python3 as the default over pypy3?
from sunfish.
Why use python3 as the default over pypy3 ?
i guess you know more about this .. for me Python is the mother and pypy a child - other speed increasing methods also exist. But i don't mind, as long as it's clear in the README for everyone.
from sunfish.
Why use python3 as the default over pypy3?
Pypy is quite obscure compared to good old cpython. I wouldn't expect your average python-capable system to have pypy3.
from sunfish.
Related Issues (20)
- Support pondering
- ℹ SAINTGERMAIN
- chess.engine.EngineTerminatedError: engine process died unexpectedly (exit code: 127) HOT 12
- 111
- sunfish
- removed
- Can we change the rules a bit and then run the engine. How well would it work?
- Three Check Chess variant HOT 2
- TCEC version ?
- CPU % remains after game ended
- Does not run on my iMac HOT 2
- Interest in Sunfish... HOT 1
- How to Run Sunfish... HOT 2
- illegal move and a potential solution HOT 2
- sunfish can't play white? HOT 6
- How much of the UCI protocol is implemented? HOT 1
- Sunfish severely slows down my PC HOT 9
- about using pypy HOT 1
- Lichess - I'm not accepting challenges with this time control. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sunfish.