Comments (10)
@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.
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.
@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.
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.
@ledw Any update on this ?
from starspace.
@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.
closing as no update for a while (can always reopen)
from starspace.
@ledw I believe this happens because ntokens_
is declared as a int32 but the read op tries to write into a int64.
from starspace.
@pkmital yes, I believe that is fixed in the current version.
from starspace.
Absolutely right thank you!
from starspace.
Related Issues (20)
- How to run starspace to train the model under Windows envrionment? HOT 1
- Is development stopped for starspace? HOT 1
- Starspace in Colab HOT 1
- Doc2Vec w/ Starspace
- Training on texts with different lengths
- basedoc argument for embed_doc
- Potential bugs in model.cpp?
- Getting embedding for test file
- Segmentation Fault when training after "initFromTsv"
- Example results do not agree with those published HOT 1
- loadBaseDocs() is called twice in query_predict utility
- label is printed twice in printArgs
- Must provide base labels when label is featured. on query_nn on trainDoc=1
- error load sample.txt HOT 1
- Incremental embedding
- fb
- fb
- my Facebook account was disabled for enable my disable account profile
- How is a single feature obtained from "bag of features" for tag prediction
- how to structure the labels for training
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 starspace.