Giter Club home page Giter Club logo

Comments (10)

ledw avatar ledw commented on June 24, 2024

@disdi seems like some problem with the binary saved file in your version. Could you try first if the .tsv file works for you? You can try that by changing the first line to the following in ./starspace test (no need to change anything in ./starspace train):
./starspace test -model "${MODELDIR}"/ag_news.tsv

Please let me know if the .tsv format model works for you or not.

from starspace.

disdi avatar disdi commented on June 24, 2024

On running the below command -
./starspace test -model "${MODELDIR}"/ag_news.tsv, I get the below error -

Start to evaluate trained model:
Empty test file or model path.

"starspace train ..." or "starspace test ..."

The following arguments are mandatory for train:
-trainFile training file path
-model output model file path

The following arguments are mandatory for test:
-testFile test file path
-model model file path

However I ran the starspace with valgrind with below changes-

diff --git a/examples/classification_ag_news.sh b/examples/classification_ag_news.sh
index 49483cb..d7e5207 100755
--- a/examples/classification_ag_news.sh
+++ b/examples/classification_ag_news.sh
@@ -44,7 +44,7 @@ make

echo "Start to train on ag_news data:"

-./starspace train
+G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --log-file=valgrind_train.log ./starspace train
-trainFile "${DATADIR}"/ag_news.train
-model "${MODELDIR}"/ag_news
-initRandSd 0.01
@@ -63,7 +63,7 @@ echo "Start to train on ag_news data:"

echo "Start to evaluate trained model:"

-./starspace test
+G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --log-file=valgrind_test.log ./starspace test
-model "${MODELDIR}"/ag_news
-testFile "${DATADIR}"/ag_news.test
-ngrams 1
diff --git a/makefile b/makefile
index f36a01e..fd9f18a 100644

I do not get any crash, though both training and testing took long time to complete.
Attaching valgrind logs.
valgrind_logs.zip

from starspace.

ledw avatar ledw commented on June 24, 2024

@disdi sorry I did not specify the full command to you. For .tsv format model you should try:

./starspace test 
-model "${MODELDIR}"/ag_news.tsv
-testFile "${DATADIR}"/ag_news.test 
-ngrams 1 

I'll take a look at the logs. How long does it take to complete when you run it with valgrind?

from starspace.

disdi avatar disdi commented on June 24, 2024

Please find the result of below command
./starspace test -model "${MODELDIR}"/ag_news.tsv -testFile "${DATADIR}"/ag_news.test -ngrams 1

attached in the file.
tsv_format.TXT

Valgrind training alone took more than 6 hours. Running the full example script (both training and testing ) was an overnight thing (10-12 hours) with valgrind.

from starspace.

disdi avatar disdi commented on June 24, 2024

@ledw Any update on this ?

from starspace.

ledw avatar ledw commented on June 24, 2024

@disdi thanks. It looks like the tsv model works fine -- i.e. it gives you the evaluation metric. The problem occurs with the binary format with your version. I'll investigate on that, meanwhile you can still train model but only use the .tsv format model instead.

from starspace.

jaseweston avatar jaseweston commented on June 24, 2024

closing as no update for a while (can always reopen)

from starspace.

pkmital avatar pkmital commented on June 24, 2024

@ledw I believe this happens because ntokens_ is declared as a int32 but the read op tries to write into a int64.

from starspace.

ledw avatar ledw commented on June 24, 2024

@pkmital yes, I believe that is fixed in the current version.

from starspace.

pkmital avatar pkmital commented on June 24, 2024

Absolutely right thank you!

from starspace.

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.