GithubHelp home page GithubHelp logo

scatterAdd not working about deepholdem HOT 14 OPEN

happypepper avatar happypepper commented on July 18, 2024
scatterAdd not working

from deepholdem.

Comments (14)

happypepper avatar happypepper commented on July 18, 2024

@matthiasanderer I realized that the readme doesn't say you have to modify the TensorMath.lua for cutorch as well if you want to use GPU. I will update the readme.md when I have time

from deepholdem.

lorrp1 avatar lorrp1 commented on July 18, 2024

same error:

./Game/card_tools.lua:30: attempt to call method 'scatterAdd' (a nil value)
stack traceback:
./Game/card_tools.lua:30: in function 'get_possible_hands_mask'
./Game/Evaluation/evaluator.lua:137: in function <./Game/Evaluation/evaluator.lua:132>
(...tail calls...)
./TerminalEquity/terminal_equity.lua:74: in function 'get_last_round_call_matrix'
./TerminalEquity/terminal_equity.lua:179: in function '_set_call_matrix'
./TerminalEquity/terminal_equity.lua:217: in function 'set_board'
./DataGeneration/data_generation.lua:58: in function 'generate_data_file'
./DataGeneration/data_generation.lua:24: in function 'generate_data'
DataGeneration/main_data_generation.lua:14: in main chunk
[C]: in function 'dofile'
...errr/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: in ?

from deepholdem.

happypepper avatar happypepper commented on July 18, 2024

I've updated the readme, let me know if you are still seeing the issue.

from deepholdem.

lorrp1 avatar lorrp1 commented on July 18, 2024

this is what i get now:
cd Source && th DataGeneration/main_data_generation.lua 4
/home/painkillerrr/torch/install/bin/luajit: .../painkillerrr/torch/install/share/lua/5.1/trepl/init.lua:389: .../painkillerrr/torch/install/share/lua/5.1/trepl/init.lua:389: .../painkillerrr/torch/install/share/lua/5.1/trepl/init.lua:389: .../painkillerrr/torch/install/share/lua/5.1/trepl/init.lua:389: .../painkillerrr/torch/install/share/lua/5.1/trepl/init.lua:389: not enough memory
stack traceback:
[C]: in function 'error'
.../painkillerrr/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
DataGeneration/main_data_generation.lua:12: in main chunk
[C]: in function 'dofile'
...errr/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x004057a0

in torch/install/share/ there is 5.1 while i have installed 5.2:
$ lua
Lua 5.2.4 Copyright (C) 1994-2015 Lua.org, PUC-Rio

im going to reinstall lua, torch and cuda toolkit

from deepholdem.

lorrp1 avatar lorrp1 commented on July 18, 2024

i reinstalled everything, i copyed the file it gave me the same error ./Game/card_tools.lua:30: attempt to call method 'scatterAdd' (a nil value), then i run: TORCH_LUA_VERSION=LUA52 ./install.sh
Prefix set to /home/painkillerrr/torch/install, another time and i get: /lua/5.1/trepl/init.lua:389: not enough memory

from deepholdem.

happypepper avatar happypepper commented on July 18, 2024

If you are seeing not enough memory, it means you are using luajit.

make sure to run ./clean.sh before ./install.sh

Also, when you run the install.sh command, make sure you see this line:
Installing Lua version: LUA52

from deepholdem.

lorrp1 avatar lorrp1 commented on July 18, 2024

still the same error

very sad since its the only stuff id like to try

from deepholdem.

lorrp1 avatar lorrp1 commented on July 18, 2024

do you have lua 5.2.4?

ok i really dont know what i have done ( i have reinstalled torch and run lua install 5.3 instead of 5.2) but know i have managed to go through the error to get stuck on another one:

Generating data ...
...
resolve time: 48.398242950439
/home/painkillerrr/torch/install/bin/lua: cannot open <../Data/TrainSamples/NoLimit/1529964083-7h3cThKcKd-1.inputs> in mode w at /home/painkillerrr/torch/pkg/torch/lib/TH/THDiskFile.c:673
...

from deepholdem.

happypepper avatar happypepper commented on July 18, 2024

No, I'm using lua 5.2.3 but 5.2.4 should work also.

Can you paste what error you got after re-installing torch with the new tensormath.lua files?

from deepholdem.

lorrp1 avatar lorrp1 commented on July 18, 2024

ok i really dont know what i have done ( i have reinstalled torch and run lua install 5.3 instead of 5.2) but know i have managed to go through the error to get stuck on another one:

Generating data ...
...
resolve time: 48.398242950439
/home/painkillerrr/torch/install/bin/lua: cannot open <../Data/TrainSamples/NoLimit/1529964083-7h3cThKcKd-1.inputs> in mode w at /home/painkillerrr/torch/pkg/torch/lib/TH/THDiskFile.c:673
...

the is no folder in data callaed trainsample

from deepholdem.

happypepper avatar happypepper commented on July 18, 2024

That is good news, it means it succeeded in generating the data.

There is a problem in writing the data file.
You need to create a NoLimit folder inside TrainSamples otherwise it will fail to write to any files.

from deepholdem.

lorrp1 avatar lorrp1 commented on July 18, 2024

im pretty sure: TORCH_LUA_VERSION=LUA52 ./install.sh
fixed even this issue.

@happypepper

how did you you managed to make deepholdem play vs "Slumbot 2017"??

from deepholdem.

lh14576 avatar lh14576 commented on July 18, 2024

I can't get around this scatterAdd issue.
Generating data ... /root/torch/install/bin/lua: ./Game/card_tools.lua:30: attempt to call a nil value (method 'scatterAdd') stack traceback: ./Game/card_tools.lua:30: in function 'Game.card_tools.get_possible_hands_mask' ./Game/Evaluation/evaluator.lua:137: in function 'Game.Evaluation.evaluator.evaluate_fast' (...tail calls...) ./TerminalEquity/terminal_equity.lua:74: in method 'get_last_round_call_matrix' ./TerminalEquity/terminal_equity.lua:179: in method '_set_call_matrix' ./TerminalEquity/terminal_equity.lua:217: in method 'set_board' ./DataGeneration/data_generation.lua:58: in function 'DataGeneration.data_generation.generate_data_file' ./DataGeneration/data_generation.lua:24: in function 'DataGeneration.data_generation.generate_data' DataGeneration/main_data_generation.lua:14: in main chunk [C]: in function 'dofile' /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: in ?

I got it running on a google compute engine. But it just doesn't work locally. I have reinstalled torch a couple of times (5.2 and 5.3) and made sure the modified TensorMath.lua files were in place beforehand. I am out of ideas now.
It's working with CPU though.

EDIT: just solved the issue. Running install.sh as sudo helped.

from deepholdem.

dcarnino avatar dcarnino commented on July 18, 2024

@lh14576 I have the exact same error. With the modified TensorMath.lua files, it works on CPU but not on GPU.
Any specific thing you did apart from running install.sh as sudo? (I ran everything as root)

from deepholdem.

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.