question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

scripts don't work.

See original GitHub issue

issue#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:closed
  • Created 4 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
henleincommented, Aug 28, 2019

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.

0reactions
abhinandansrivastavacommented, Nov 18, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Script doesnt work even though there is no errors at all
Script doesnt work even though there is no errors at all - Scripting Support - DevForum | Roblox.
Read more >
Why Your Sales Scripts DO NOT Work | Sandler Training
There are four key reasons why scripts don't work – ... Scripts do not allow for you to create an environment where the...
Read more >
Troubleshooting | Apps Script - Google Developers
Try debugging your script and see if you can isolate the problem. There is a bug in Google Apps Script that is causing...
Read more >
Scripts don't works how to fix? - Blizzard Forums
So after prepatch lots of my macros don't works anymore because I get lua error every time when I type /script. Any one...
Read more >
Scripts doesn't work with the latest versions - WordPress.org
Script-tags in html sections will be replaced with ” in 3.2.3 and 3.2.4. All my sites are broken now, because scripts don't work...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found