scripts don't work.
See original GitHub issueissue#1
command : ./download_pretrained.sh bert-base error : HTTP request sent, awaiting response… 404 Not Found
issue#2
command : GPU=0 python train.py best error : Traceback (most recent call last): File “train.py”, line 22, in <module> model = util.get_model(config) File “/data/BERT-coref/coref/util.py”, line 21, in get_model return independent.CorefModel(config) File “/data/BERT-coref/coref/independent.py”, line 32, in init self.bert_config = modeling.BertConfig.from_json_file(config[“bert_config_file”]) File “/home/fairy_of_9/anaconda3/envs/bert/lib/python3.6/site-packages/pyhocon/config_tree.py”, line 366, in getitem val = self.get(item) File “/home/fairy_of_9/anaconda3/envs/bert/lib/python3.6/site-packages/pyhocon/config_tree.py”, line 209, in get return self._get(ConfigTree.parse_key(key), 0, default) File “/home/fairy_of_9/anaconda3/envs/bert/lib/python3.6/site-packages/pyhocon/config_tree.py”, line 151, in _get raise ConfigMissingException(u"No configuration setting found for key {key}".format(key=‘.’.join(key_path[:key_index + 1]))) pyhocon.exceptions.ConfigMissingException: ‘No configuration setting found for key bert_config_file’
experiments.conf
best {
# Edit this
data_dir = data_set
model_type = independent
# Computation limits.
max_top_antecedents = 50
max_training_sentences = 5
top_span_ratio = 0.4
max_num_speakers = 20
max_segment_len = 64 #256
# Learning
bert_learning_rate = 1e-5
task_learning_rate = 2e-4
num_docs = 2802
# Model hyperparameters.
dropout_rate = 0.3
ffnn_size = 500 #1000
ffnn_depth = 1
num_epochs = 20
feature_size = 20
max_span_width = 30
use_metadata = true
use_features = true
use_segment_distance = true
model_heads = false #true
coref_depth = 2
coarse_to_fine = true
fine_grained = true
use_prior = true
# Other.
train_path = data_set/train.english.jsonlines
eval_path = data_set/dev.english.jsonlines
conll_eval_path = data_set/dev.english.v4_gold_conll
single_example = true
genres = ["bc", "bn", "mz", "nw", "pt", "tc", "wb"]
eval_frequency = 1000
report_frequency = 100
log_root = logs
adam_eps = 1e-6
task_optimizer = adam
}
bert_base = ${best}{
num_docs = 2802
bert_learning_rate = 1e-05
task_learning_rate = 0.0002
max_segment_len = 128
ffnn_size = 3000
train_path = data_set/train.english.128.jsonlines
eval_path = data_set/dev.english.128.jsonlines
conll_eval_path = data_set/dev.english.v4_gold_conll
max_training_sentences = 11
bert_config_file = ${best.log_root}/bert_base/bert_config.json
vocab_file = ${best.log_root}/bert_base/vocab.txt
tf_checkpoint = ${best.log_root}/bert_base/model.max.ckpt
init_checkpoint = ${best.log_root}/bert_base/model.max.ckpt
}
...
Is there anything I missed?
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (5 by maintainers)
Top GitHub Comments
Thank you for publishing the code. Is the correct general input format for predict.py like the above input or like in the readme? You also need the jsonkey: sentence_map. How is this input structured? Many thanks in advance.
Hey @mandarjoshi90 ,
Thanks for reply.
I tried making file in the format, still predict.py is still giving me error.
ValueError: setting an array element with a sequence.
i ran below code:
python predict.py bert_base cased_config_vocab/TestingFile.jsonlines cased_config_vocab/15.jsonlines
{“doc_key”: “wb”, “sentences”: [“[CLS]”, “who”, “was”, “jim”, “henson”, “?”, “jim”, “henson”, “was”, “a”, “puppet”, “##eer”, “.”, “[SEP]”], “speakers”: [“[SPL]”, “-”, “-”, “-”, “-”, “-”, “-”, “-”, “-”, “-”, “-”, “-”, “-”, “[SPL]”], “clusters”: [[]], “sentence_map”: [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2], “subtoken_map”: [0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10, 10]} {“doc_key”: “wb”, “sentences”: [“[CLS]”, “i”, “am”, “going”, “to”, “goa”, “and”, “love”, “biology”, “.”, “[SEP]”], “speakers”: [“[SPL]”, “-”, “-”, “-”, “-”, “-”, “-”, “-”, “-”, “-”, “[SPL]”], “clusters”: [[]], “sentence_map”: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], “subtoken_map”: [0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 8]} TestingFile.zip