huggingface / hmtl

🌊HMTL: Hierarchical Multi-Task Learning - A State-of-the-Art neural network model for several NLP tasks based on PyTorch and AllenNLP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NER and RE only

Mahmedturk opened this issue · comments

Hi,

I want to experiment with this architecture for NER and RE only. What changes do I need to make?

Hi @Mahmedturk ,
If you want to experiment with only two tasks (NER and RE), the fastest way (and the easiest way) would be to modify the training configuration file (https://github.com/huggingface/hmtl/blob/master/configs/emd_relation.json) and make sure that the EMD task is replaced by NER.
Victor

Closing it since there doesn't seem to be any activity.
Feel free to re-open it if necessary!
Victor

Hi there - I'm trying to do the same thing and so followed your advice. I also changed the model type to ner_relation but hit the following error "ner_relation not in acceptable choices for model.type: ['bcn', 'constituency_parser', 'biaffine_parser', 'coref', 'crf_tagger', 'decomposable_attention', 'event2mind', 'simple_seq2seq', 'bidaf', 'bidaf-ensemble', 'dialog_qa', 'nlvr_coverage_parser', 'nlvr_direct_parser', 'quarel_parser', 'wikitables_mml_parser', 'wikitables_erm_parser', 'atis_parser', 'srl', 'simple_tagger', 'esim', 'bimpm', 'graph_parser', 'relation_extractor', 'ner', 'relation', 'coref_custom', 'ner_emd', 'emd_relation', 'emd_coref', 'ner_emd_coref', 'ner_emd_relation', 'hmtl']" - I've just kicked off my training again using "emd_relation" in the hope that magically works, but if not do you have any suggestions?

Hey @syramarshall
Yes, you should keep "type": "emd_relation" in the training config file. It just means that the EMD layer will be composed of a BiLSTM+CRF, but it is agnostic to whether you are actually doing MD with this layer. So just change the data in data_params for your NER dataset and the other model hyper-parameters if you need.
Victor