2025-05-05 19:18:34.166514: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2025-05-05 19:18:35.615541: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libcudnn.so.8: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: :/home/gpu/NLP/.env/lib/python3.10/site-packages/tensorrt:/home/gpu/NLP/.env/lib/python3.10/site-packages/tensorrt 2025-05-05 19:18:35.615574: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly. HooshvareLab/bert-base-parsbert-ner-uncased ################################################## ################################################## 2025-05-05 19:18:37,522 Reading data from data 2025-05-05 19:18:37,522 Train: data/DATASET140402.txt 2025-05-05 19:18:37,522 Dev: None 2025-05-05 19:18:37,522 Test: None 2025-05-05 19:18:38,029 No test split found. Using 10% (i.e. 81 samples) of the train split as test data 2025-05-05 19:18:38,029 No dev split found. Using 10% (i.e. 73 samples) of the train split as dev data 2025-05-05 19:18:38,030 Computing label dictionary. Progress: 0it [00:00, ?it/s] 0it [00:00, ?it/s] 0it [00:00, ?it/s] 659it [00:00, 23673.90it/s] 2025-05-05 19:18:38,066 Dictionary created for label 'ner' with 9 values: AREF (seen 452 times), ORG (seen 424 times), ORG2 (seen 232 times), FAC (seen 197 times), LOC2 (seen 71 times), REF (seen 69 times), LOC (seen 54 times), EVENT (seen 17 times), PER (seen 15 times) 2025-05-05 19:18:40.452531: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudnn.so.8'; dlerror: libcudnn.so.8: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: :/home/gpu/NLP/.env/lib/python3.10/site-packages/tensorrt:/home/gpu/NLP/.env/lib/python3.10/site-packages/tensorrt 2025-05-05 19:18:40.452573: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1934] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... model read successfully ! ################################################## ################################################## 2025-05-05 19:18:44,200 SequenceTagger predicts: Dictionary with 37 tags: O, S-AREF, B-AREF, E-AREF, I-AREF, S-ORG, B-ORG, E-ORG, I-ORG, S-ORG2, B-ORG2, E-ORG2, I-ORG2, S-FAC, B-FAC, E-FAC, I-FAC, S-LOC2, B-LOC2, E-LOC2, I-LOC2, S-REF, B-REF, E-REF, I-REF, S-LOC, B-LOC, E-LOC, I-LOC, S-EVENT, B-EVENT, E-EVENT, I-EVENT, S-PER, B-PER, E-PER, I-PER /home/gpu/NLP/.env/lib/python3.10/site-packages/flair/trainers/trainer.py:499: FutureWarning: `torch.cuda.amp.GradScaler(args...)` is deprecated. Please use `torch.amp.GradScaler('cuda', args...)` instead. scaler = torch.cuda.amp.GradScaler(enabled=use_amp and flair.device.type != "cpu") 2025-05-05 19:18:44,206 ---------------------------------------------------------------------------------------------------- 2025-05-05 19:18:44,207 Model: "SequenceTagger( (embeddings): TransformerWordEmbeddings( (model): BertModel( (embeddings): BertEmbeddings( (word_embeddings): Embedding(100001, 768, padding_idx=0) (position_embeddings): Embedding(512, 768) (token_type_embeddings): Embedding(2, 768) (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True) (dropout): Dropout(p=0.1, inplace=False) ) (encoder): BertEncoder( (layer): ModuleList( (0-11): 12 x BertLayer( (attention): BertAttention( (self): BertSdpaSelfAttention( (query): Linear(in_features=768, out_features=768, bias=True) (key): Linear(in_features=768, out_features=768, bias=True) (value): Linear(in_features=768, out_features=768, bias=True) (dropout): Dropout(p=0.1, inplace=False) ) (output): BertSelfOutput( (dense): Linear(in_features=768, out_features=768, bias=True) (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True) (dropout): Dropout(p=0.1, inplace=False) ) ) (intermediate): BertIntermediate( (dense): Linear(in_features=768, out_features=3072, bias=True) (intermediate_act_fn): GELUActivation() ) (output): BertOutput( (dense): Linear(in_features=3072, out_features=768, bias=True) (LayerNorm): LayerNorm((768,), eps=1e-12, elementwise_affine=True) (dropout): Dropout(p=0.1, inplace=False) ) ) ) ) (pooler): BertPooler( (dense): Linear(in_features=768, out_features=768, bias=True) (activation): Tanh() ) ) ) (locked_dropout): LockedDropout(p=0.5) (linear): Linear(in_features=768, out_features=37, bias=True) (loss_function): CrossEntropyLoss() )" 2025-05-05 19:18:44,207 ---------------------------------------------------------------------------------------------------- 2025-05-05 19:18:44,207 Corpus: 659 train + 73 dev + 81 test sentences 2025-05-05 19:18:44,207 ---------------------------------------------------------------------------------------------------- 2025-05-05 19:18:44,207 Train: 659 sentences 2025-05-05 19:18:44,207 (train_with_dev=False, train_with_test=False) 2025-05-05 19:18:44,207 ---------------------------------------------------------------------------------------------------- 2025-05-05 19:18:44,207 Training Params: 2025-05-05 19:18:44,208 - learning_rate: "6.5e-05" 2025-05-05 19:18:44,208 - mini_batch_size: "8" 2025-05-05 19:18:44,208 - max_epochs: "200" 2025-05-05 19:18:44,208 - shuffle: "True" 2025-05-05 19:18:44,208 ---------------------------------------------------------------------------------------------------- 2025-05-05 19:18:44,208 Plugins: 2025-05-05 19:18:44,208 - LinearScheduler | warmup_fraction: '0.1' 2025-05-05 19:18:44,208 ---------------------------------------------------------------------------------------------------- 2025-05-05 19:18:44,208 Final evaluation on model after last epoch (final-model.pt) 2025-05-05 19:18:44,208 - metric: "('micro avg', 'f1-score')" 2025-05-05 19:18:44,208 ---------------------------------------------------------------------------------------------------- 2025-05-05 19:18:44,208 Computation: 2025-05-05 19:18:44,208 - compute on device: cuda:0 2025-05-05 19:18:44,208 - embedding storage: none 2025-05-05 19:18:44,208 ---------------------------------------------------------------------------------------------------- 2025-05-05 19:18:44,208 Model training base path: "taggers" 2025-05-05 19:18:44,208 ---------------------------------------------------------------------------------------------------- 2025-05-05 19:18:44,208 ---------------------------------------------------------------------------------------------------- 2025-05-05 19:18:45,964 epoch 1 - iter 8/83 - loss 4.88107231 - time (sec): 1.75 - samples/sec: 1594.56 - lr: 0.000000 - momentum: 0.000000 2025-05-05 19:18:46,795 epoch 1 - iter 16/83 - loss 4.96605820 - time (sec): 2.59 - samples/sec: 2030.53 - lr: 0.000001 - momentum: 0.000000 2025-05-05 19:18:47,617 epoch 1 - iter 24/83 - loss 4.90422556 - time (sec): 3.41 - samples/sec: 2394.29 - lr: 0.000001 - momentum: 0.000000 2025-05-05 19:18:48,494 epoch 1 - iter 32/83 - loss 4.81953241 - time (sec): 4.28 - samples/sec: 2485.25 - lr: 0.000001 - momentum: 0.000000 2025-05-05 19:18:49,285 epoch 1 - iter 40/83 - loss 4.73885822 - time (sec): 5.08 - samples/sec: 2568.59 - lr: 0.000002 - momentum: 0.000000 2025-05-05 19:18:50,212 epoch 1 - iter 48/83 - loss 4.58169460 - time (sec): 6.00 - samples/sec: 2700.05 - lr: 0.000002 - momentum: 0.000000 2025-05-05 19:18:51,128 epoch 1 - iter 56/83 - loss 4.48121854 - time (sec): 6.92 - samples/sec: 2780.99 - lr: 0.000002 - momentum: 0.000000 2025-05-05 19:18:52,016 epoch 1 - iter 64/83 - loss 4.37189533 - time (sec): 7.81 - samples/sec: 2834.94 - lr: 0.000002 - momentum: 0.000000 2025-05-05 19:18:52,849 epoch 1 - iter 72/83 - loss 4.24427416 - time (sec): 8.64 - samples/sec: 2865.31 - lr: 0.000003 - momentum: 0.000000 2025-05-05 19:18:53,664 epoch 1 - iter 80/83 - loss 4.11392041 - time (sec): 9.45 - samples/sec: 2881.71 - lr: 0.000003 - momentum: 0.000000 2025-05-05 19:18:54,039 ---------------------------------------------------------------------------------------------------- 2025-05-05 19:18:54,039 EPOCH 1 done: loss 4.0762 - lr: 0.000003 0%| | 0/5 [00:00-key by setting add_unk = True in the construction. 0%| | 0/1 [00:00 evaluate_result = do_evaluate() File "/home/gpu/tnlp/jokar/Flair_NER/evaluate_model.py", line 13, in do_evaluate result = tagger.evaluate(corpus.test, gold_label_type='ner', mini_batch_size=8) File "/home/gpu/NLP/.env/lib/python3.10/site-packages/flair/nn/model.py", line 297, in evaluate loss_and_count = self.predict( File "/home/gpu/NLP/.env/lib/python3.10/site-packages/flair/models/sequence_tagger_model.py", line 501, in predict gold_labels = self._prepare_label_tensor(batch) File "/home/gpu/NLP/.env/lib/python3.10/site-packages/flair/models/sequence_tagger_model.py", line 425, in _prepare_label_tensor [self.label_dictionary.get_idx_for_item(label) for label in gold_labels], File "/home/gpu/NLP/.env/lib/python3.10/site-packages/flair/models/sequence_tagger_model.py", line 425, in [self.label_dictionary.get_idx_for_item(label) for label in gold_labels], File "/home/gpu/NLP/.env/lib/python3.10/site-packages/flair/data.py", line 102, in get_idx_for_item raise IndexError IndexError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/gpu/tnlp/jokar/Flair_NER/train.py", line 167, in evaluate_result = f"do_evaluate function failed!\nerror massage:\n{str(e.args[0])}" IndexError: tuple index out of range