0

The R code I have is as following, it results an error as below. However, this works fine on my windows local machine. Just error on ubuntu server as below.The generated model.bin file is about 229 MB on my windows local machine. Not sure why I cannot train the model on Ubuntu server, any help would be appreciated!

library(fastrtext)

model_file <- build_supervised(documents = data1[["V5"]],
                               targets = data1[["V3"]],
                               model_path = '/srv/shiny-server/text_cls/voc_single/mymodel',
                               dim = 30, lr = 0.1, epoch = 30, wordNgrams = 2)



Prepare and write tempfile at ... /tmp/RtmpLMf0uE/file9083d9d7650
Starting supervised training with following commands: 
$ supervised -input /tmp/RtmpLMf0uE/file9083d9d7650 -output /srv/shiny-server/text_cls/voc_single/mymodel -lr 0.1 -dim 30 -ws 5 -epoch 30 -minCount 5 -minCountLabel 0 -neg 5 -wordNgrams 2 -loss ns -bucket 2000000 -minn 3 -maxn 6 -thread 12 -lrUpdateRate 100 -t 0.0001 -label __label__ -verbose 2


Error in model$execute(c("fasttext", commands)) : 
  /srv/shiny-server/text_cls/voc_single/mymodel.bin cannot be opened for saving.
1

1 Answer 1

0

can you show us the authorization settings with the following command

sudo ls -l /srv/shiny-server/text_cls/voc_single/mymodel.bin

You can fix the authorization issues by authorizing your user to edit that file

sudo chown yourusername /srv/shiny-server/text_cls/voc_single/mymodel.bin
sudo chmod 700 /srv/shiny-server/text_cls/voc_single/mymodel.bin
2
  • 1
    Thanks for the answer. I just put the mymodel.bin file in R working directory which permits the edit authorization and everything works after that.
    – Jason
    Apr 28, 2019 at 7:40
  • @Jason thanks a lot. I remain available for assistance Apr 28, 2019 at 11:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .