Closed mr-martian closed 1 year ago
@mr-martian Hi, did you modify the code after installation? This shouldn't happen if you try to train a model with -b
specified.
I did
module load anaconda
conda create -n error-analysis
source activate error-analysis
conda install pip
pip install torch transformers supar udapi
and then ran the posted command. I have a modified copy, but it's in a separate virtual environment.
@mr-martian Can you install the pkg from source code and check it again?
pip install -U git+https://github.com/yzhangcs/parser
I'm still not sure what exactly happened.
I'm wondering If you can walk through the entire prediction process to make predictions with the pretrained model -p biaffine-dep-en
?
So it turns out that the attempt to download is actually from this command:
python -m supar.cmds.biaffine_dep predict \
--tree -d 0 -c baseline.ini \
--path "$lang.model" \
--data "$data_dir/$lang.test.conllu" \
--pred "$data_dir/$lang.pred.conllu"
The first traceback (ending in IndexError: min(): Expected reduction dim 1 to have non-zero size.
) is the training command crashing on ... something.
This explains the downloading, since when the prediction command runs, the model file doesn't exist.
@mr-martian Yeah, if the local file does not exist, the parser would regard it as an url and seek to download it from the remote.
Do you know what would be causing that first error though?
@mr-martian Sorry, I don't know yet. The above exception happened during prediction is expected because the model indeed does not exist, but is weird during training as the parser would seek to create new files with -b
.
If you wish, you can share a colab project or your running files with me so that I can reproduce the errors.
As it turns out, there was something wrong with my corpus-splitting script such that it sometimes generated empty dev and test files. After more carefully verifying that the split files were what they should be, training ran just fine.
I have the following command and my intent is for it to train a model from scratch and save it to
hbo.model
:However, when I run it on a fresh install from pip, I get the following traceback:
Am I doing something wrong with the command?