BrooksLabUCSC / flair

Full-Length Alternative Isoform analysis of RNA
Other
205 stars 71 forks source link

list index out of range while retraining TARSClassifier #201

Closed zeos closed 2 years ago

zeos commented 2 years ago

while training a few shots tars classifier on a news dataset, I get this:

trainer.train(base_path='models/tars-base-refined.multilingual/',  # path to store the model artifacts
  File "../.local/lib/python3.8/site-packages/flair/trainers/trainer.py", line 516, in train
    dynamic_embeddings = identify_dynamic_embeddings(batch[0])
  File "../.local/lib/python3.8/site-packages/flair/training_utils.py", line 399, in identify_dynamic_embeddings
    first_token = data_point[0]
  File "../.local/lib/python3.8/site-packages/flair/data.py", line 975, in __getitem__
    return self.tokens[subscript]
IndexError: list index out of range

my corpus: Corpus: "Corpus: 95775 train + 10642 dev + 39152 test sentences" I have 15 labels, some have more documents associated, other less

I am using cuda, Ubuntu 20.04, Python 3.8

how can I avoid the error " list index out of range" in this case?

thanks for any feedback

Jeltje commented 2 years ago

I think you are referring to a different flair, probably this one: https://github.com/muellerzr/flair