Giter VIP home page Giter VIP logo

Comments (13)

soumith avatar soumith commented on May 22, 2024 1

@mdasadul you can do this:

cd ~/torch
./clean.sh
TORCH_LUA_VERSION=LUA52 ./install.sh

And then everything shoudl work

from opennmt.

jsenellart avatar jsenellart commented on May 22, 2024

it is probably the same than #20. can you check?

from opennmt.

mdasadul avatar mdasadul commented on May 22, 2024

Yes it's looks like they are same although he was getting it during saving the model but I am getting it middle of preprocessing

from opennmt.

guillaumekln avatar guillaumekln commented on May 22, 2024

Fixed by #29.

from opennmt.

mdasadul avatar mdasadul commented on May 22, 2024

Sorry to reopen the issue once again. I am trying to preprocess 20Millions sentences and i ended up getting the same error
PANIC: unprotected error in call to Lua API (not enough memory)

from opennmt.

srush avatar srush commented on May 22, 2024

Just to check though, did you get this error with the latest code? We switched to use tds instead of lua tables to avoid this problem.

from opennmt.

mdasadul avatar mdasadul commented on May 22, 2024

@Rush yes I checked out the code this morning. I was having the issue previously with 10 Million sentences and after the tds fix it was resolved but when I increased the training data to 20 million I can see that error again.

@soumith Thanks for pointing out but right now I am middle of training another Seq2seq-attn model and If I reinstall torch it will interrupt current training

from opennmt.

jsenellart avatar jsenellart commented on May 22, 2024

(you can easily install another instance of torch in another directory, there won't be any interference with your current runs - keep us updated!)

from opennmt.

guillaumekln avatar guillaumekln commented on May 22, 2024

I'm interested to know when this error occurs. Can you share the full preprocessing logs and the command line you ran?

Switching to Lua 5.2 is indeed a definitive fix for this issue but we would like to push the memory limit as far as possible for other Lua versions. #29 already fixes the issue for most use cases though.

from opennmt.

mdasadul avatar mdasadul commented on May 22, 2024

I am using following command line
th preprocess.lua -train_src data/src-train.txt.tok -train_tgt data/targ-train.txt.tok -valid_src data/src-test.txt.tok -valid_tgt data/targ-test.txt.tok -save_data model/28dec

Also I am getting the error when it trying to process line 18349687. So your preprocess script can handle 18349686 sentences

from opennmt.

jsenellart avatar jsenellart commented on May 22, 2024

closing the issue for now. use LUA 5.2 is a fix.

from opennmt.

rajeshrd-techm avatar rajeshrd-techm commented on May 22, 2024

Seeing same issue with 8 GB, 32 GB & 256 GB RAM. must be something other than memory issue.

from opennmt.

guillaumekln avatar guillaumekln commented on May 22, 2024

This is a LuaJIT memory issue. The total memory of Lua objects (tables, strings) is limited to about 2GB.

See https://stackoverflow.com/questions/35155444/why-is-luajits-memory-limited-to-1-2-gb-on-64-bit-platforms

from opennmt.

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.