New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors when performing tests #13
Comments
Hi, |
The scikit-learn version was 0.21.3. After reinstalling the environment, the above issue was resolved. thanks for support. However, another problem arises: what's the reason? home/jhj/anaconda3/envs/jerex/lib/python3.7/site-packages/sklearn/utils/validation.py:179: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.0 [00:45<03:03, 1.16it/s] During handling of the above exception, another exception occurred: Traceback (most recent call last): |
This was also a scikit-learn version issue.... |
Testing: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 700/700 [05:24<00:00, 2.27it/s]Evaluation
--- Entity Mentions ---
Traceback (most recent call last):
File "./jerex_test.py", line 20, in test
model.test(cfg)
File "/home/jhj/jerex/jerex/model.py", line 389, in test
trainer.test(model, datamodule=data_module)
File "/home/jhj/anaconda3/envs/New_Env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 910, in test
results = self.__test_given_model(model, test_dataloaders)
File "/home/jhj/anaconda3/envs/New_Env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 970, in __test_given_model
results = self.fit(model)
File "/home/jhj/anaconda3/envs/New_Env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 499, in fit
self.dispatch()
File "/home/jhj/anaconda3/envs/New_Env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 540, in dispatch
self.accelerator.start_testing(self)
File "/home/jhj/anaconda3/envs/New_Env/lib/python3.8/site-packages/pytorch_lightning/accelerators/accelerator.py", line 76, in start_testing
self.training_type_plugin.start_testing(trainer)
File "/home/jhj/anaconda3/envs/New_Env/lib/python3.8/site-packages/pytorch_lightning/plugins/training_type/training_type_plugin.py", line 118, in start_testing
self._results = trainer.run_test()
File "/home/jhj/anaconda3/envs/New_Env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 786, in run_test
eval_loop_results, _ = self.run_evaluation()
File "/home/jhj/anaconda3/envs/New_Env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 741, in run_evaluation
deprecated_eval_results = self.evaluation_loop.evaluation_epoch_end()
File "/home/jhj/anaconda3/envs/New_Env/lib/python3.8/site-packages/pytorch_lightning/trainer/evaluation_loop.py", line 189, in evaluation_epoch_end
deprecated_results = self.__run_eval_epoch_end(self.num_dataloaders)
File "/home/jhj/anaconda3/envs/New_Env/lib/python3.8/site-packages/pytorch_lightning/trainer/evaluation_loop.py", line 221, in __run_eval_epoch_end
eval_results = model.test_epoch_end(eval_results)
File "/home/jhj/jerex/jerex/model.py", line 155, in test_epoch_end
metrics = self._evaluator.compute_metrics(self._eval_test_gt, predictions)
File "/home/jhj/jerex/jerex/evaluation/joint_evaluator.py", line 76, in compute_metrics
mention_eval = scoring.score(gt_mentions, pred_mentions, print_results=True)
File "/home/jhj/jerex/jerex/evaluation/scoring.py", line 55, in score
metrics = _compute_metrics(gt_flat, pred_flat, labels, labels_str, print_results)
File "/home/jhj/jerex/jerex/evaluation/scoring.py", line 64, in _compute_metrics
per_type = prfs(gt_all, pred_all, labels=labels, average=None, zero_division=0)
TypeError: precision_recall_fscore_support() got an unexpected keyword argument 'zero_division'
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Testing: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 700/700 [05:24<00:00, 2.16it/s]
Hi.
When testing, an error like that occurs and the result value is not saved.
Any ideas?
thanks
The text was updated successfully, but these errors were encountered: