Franck-Dernoncourt / NeuroNER

Named-entity recognition using neural networks. Easy-to-use and state-of-the-art results.
http://neuroner.com
MIT License
1.7k stars 475 forks source link

ValueError: evaluation_mode must be either 'bio', 'token', or 'binary'. #121

Open iamabhaykmr opened 6 years ago

iamabhaykmr commented 6 years ago

I am getting following error while training epoch 0 itself.

Load dataset... done (64.64 seconds)
Load token embeddings... done (0.25 seconds)
number_of_token_original_case_found: 17512
number_of_token_lowercase_found: 3045
number_of_token_digits_replaced_with_zeros_found: 657
number_of_token_lowercase_and_digits_replaced_with_zeros_found: 0
number_of_loaded_word_vectors: 21214
dataset.vocabulary_size: 46385

Starting epoch 0
Training completed in 0.00 seconds
Evaluate model on the train set
Traceback (most recent call last):
  File "main.py", line 249, in <module>
    main()
  File "main.py", line 245, in main
    nn.fit()
  File "/root/analytics/ner-api/neuroNER/src/neuroner.py", line 391, in fit
    y_pred, y_true, output_filepaths = train.predict_labels(sess, model, transition_params_trained, parameters, dataset, epoch_number, stats_graph_folder, dataset_filepaths)
  File "/root/analytics/ner-api/neuroNER/src/train.py", line 111, in predict_labels
    prediction_output = prediction_step(sess, dataset, dataset_type, model, transition_params_trained, stats_graph_folder, epoch_number, parameters, dataset_filepaths)
  File "/root/analytics/ner-api/neuroNER/src/train.py", line 97, in prediction_step
    new_y_pred, new_y_true, new_label_indices, new_label_names, _, _ = remap_labels(all_predictions, all_y_true, dataset, parameters['main_evaluation_mode'])
  File "/root/analytics/ner-api/neuroNER/src/evaluate.py", line 211, in remap_labels
    raise ValueError("evaluation_mode must be either 'bio', 'token', or 'binary'.")
ValueError: evaluation_mode must be either 'bio', 'token', or 'binary'.

Could you help me with this, Thanks

tompollard commented 5 years ago

Please could you post your parameter file?