Giter Club home page Giter Club logo

Comments (15)

thomasahle avatar thomasahle commented on June 2, 2024

Sorry, it seems the readme and the code was not in sync. Are things better now?

from sunfish.

tissatussa avatar tissatussa commented on June 2, 2024

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.

thomasahle avatar thomasahle commented on June 2, 2024

What do you get if you just run "./sunfish_nnue.py nnue/models/tanh.pickle"?

from sunfish.

tissatussa avatar tissatussa commented on June 2, 2024

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.

tissatussa avatar tissatussa commented on June 2, 2024

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.

tissatussa avatar tissatussa commented on June 2, 2024

this way also ./tools/fancy.py -cmd "./sunfish_nnue.py nnue/models/tanh.pickle" works .. so i guess it's solved!

from sunfish.

thomasahle avatar thomasahle commented on June 2, 2024

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.

tissatussa avatar tissatussa commented on June 2, 2024

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.

thomasahle avatar thomasahle commented on June 2, 2024

You mean use python3 as default and have the user switch to pypy manually?

from sunfish.

tissatussa avatar tissatussa commented on June 2, 2024

You mean use python3 as default and have the user switch to pypy manually?

yes, and write a short note about it.

from sunfish.

thomasahle avatar thomasahle commented on June 2, 2024

Why use python3 as the default over pypy3?

from sunfish.

tissatussa avatar tissatussa commented on June 2, 2024

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.

BlueCannonBall avatar BlueCannonBall commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.