Can anyone help me find what error is this?

2019-09-03 16:35:07.303211: W tensorflow/core/framework/op_kernel.cc:1502] OP_REQUIRES failed at gather_nd_op.cc:47 : Invalid argument: Requested more than 0 entries, but params is empty. Params shape: [1,9,0]
Traceback (most recent call last):
File “/home/conversight/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/tensorflow/python/client/session.py”, line 1356, in _do_call
return fn(*args)
File “/home/conversight/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/tensorflow/python/client/session.py”, line 1341, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File “/home/conversight/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/tensorflow/python/client/session.py”, line 1429, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Requested more than 0 entries, but params is empty. Params shape: [1,9,0]
[[{{node ner/GatherNd}}]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/conversight/workspace/prasanth/libro/libro-Demo/deepavlovSupport.py”, line 13, in
resultArr = deep.parse(“is the iowa state library open now”)
File “/home/conversight/workspace/prasanth/libro/libro-Demo/deepavlovSupport.py”, line 9, in parse
return self.ner_model([text])
File “/home/conversight/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/deeppavlov/core/common/chainer.py”, line 205, in call
return self._compute(*args, param_names=self.in_x, pipe=self.pipe, targets=self.out_params)
File “/home/conversight/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/deeppavlov/core/common/chainer.py”, line 228, in _compute
res = component(*x)
File “/home/conversight/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/deeppavlov/models/bert/bert_ner.py”, line 515, in call
pred = self._decode_crf(feed_dict)
File “/home/conversight/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/deeppavlov/core/models/tf_backend.py”, line 27, in _wrapped
return func(*args, **kwargs)
File “/home/conversight/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/deeppavlov/models/bert/bert_ner.py”, line 442, in _decode_crf
feed_dict=feed_dict)
File “/home/conversight/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/tensorflow/python/client/session.py”, line 950, in run
run_metadata_ptr)
File “/home/conversight/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/tensorflow/python/client/session.py”, line 1173, in _run
feed_dict_tensor, options, run_metadata)
File “/home/conversight/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/tensorflow/python/client/session.py”, line 1350, in _do_run
run_metadata)
File “/home/conversight/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/tensorflow/python/client/session.py”, line 1370, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Requested more than 0 entries, but params is empty. Params shape: [1,9,0]
[[node ner/GatherNd (defined at home/conversight/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/deeppavlov/models/bert/bert_ner.py:420) ]]

Errors may have originated from an input operation.
Input Source operations connected to node ner/GatherNd:
ner/Where (defined at home/conversight/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/deeppavlov/models/bert/bert_ner.py:350)
ner/output_dense/BiasAdd (defined at tmp/tmpzm_qnt1v.py:74)

Original stack trace for ‘ner/GatherNd’:
File “/workspace/prasanth/libro/libro-Demo/deepavlovSupport.py”, line 12, in
deep = DeeppavlovSupport()
File “/workspace/prasanth/libro/libro-Demo/deepavlovSupport.py”, line 5, in init
self.ner_model = build_model(‘fiction.json’, download=False)
File “/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/deeppavlov/core/commands/infer.py”, line 61, in build_model
component = from_params(component_config, mode=mode, serialized=component_serialized)
File “/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/deeppavlov/core/common/params.py”, line 104, in from_params
component = cls(**dict(config_params, **kwargs))
File “/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/deeppavlov/core/models/tf_backend.py”, line 74, in call
obj.init(*args, **kwargs)
File “/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/deeppavlov/core/models/tf_backend.py”, line 27, in _wrapped
return func(*args, **kwargs)
File “/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/deeppavlov/models/bert/bert_ner.py”, line 130, in init
self._init_graph()
File “/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/deeppavlov/core/models/tf_backend.py”, line 27, in _wrapped
return func(*args, **kwargs)
File “/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/deeppavlov/models/bert/bert_ner.py”, line 188, in _init_graph
self.logits = self.token_from_subtoken(logits, self.y_masks_ph)
File “/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/deeppavlov/core/models/tf_backend.py”, line 27, in _wrapped
return func(*args, **kwargs)
File “/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/deeppavlov/models/bert/bert_ner.py”, line 420, in token_from_subtoken
els = tf.gather_nd(units, idxs)
File “/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/tensorflow/python/util/dispatch.py”, line 180, in wrapper
return target(*args, **kwargs)
File “/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py”, line 3796, in gather_nd
return gen_array_ops.gather_nd(params, indices, name=name)
File “/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py”, line 3991, in gather_nd
“GatherNd”, params=params, indices=indices, name=name)
File “/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py”, line 788, in _apply_op_helper
op_def=op_def)
File “/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py”, line 507, in new_func
return func(*args, **kwargs)
File “/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/tensorflow/python/framework/ops.py”, line 3616, in create_op
op_def=op_def)
File “/anaconda3/envs/rasaNlu/lib/python3.6/site-packages/tensorflow/python/framework/ops.py”, line 2005, in init
self._traceback = tf_stack.extract_stack()

Process finished with exit code 1

Hi @prasanth55555,
Can you show us the code that you tried to run?

@yoptar thanks for the reply the json i used to build ner model is

{
“dataset_reader”: {
“class_name”: “conll2003_reader”,
“data_path”: “{DOWNLOADS_PATH}/ontonotes/”,
“dataset_name”: “ontonotes”,
“provide_pos”: false
},
“dataset_iterator”: {
“class_name”: “data_learning_iterator”
},
“chainer”: {
“in”: [“x”],
“in_y”: [“y”],
“pipe”: [
{
“class_name”: “bert_ner_preprocessor”,
“vocab_file”: “{BERT_PATH}/vocab.txt”,
“do_lower_case”: false,
“max_seq_length”: 512,
“max_subword_length”: 15,
“token_maksing_prob”: 0.0,
“in”: [“x”],
“out”: [“x_tokens”, “x_subword_tokens”, “x_subword_tok_ids”, “pred_subword_mask”]
},
{
“class_name”: “mask”,
“in”: [“x_subword_tokens”],
“out”: [“x_subword_mask”]
},
{
“id”: “tag_vocab”,
“class_name”: “simple_vocab”,
“unk_token”: [“O”],
“pad_with_zeros”: true,
“save_path”: “{NER_PATH}/tag.dict”,
“load_path”: “{NER_PATH}/tag.dict”,
“fit_on”: [“y”],
“in”: [“y”],
“out”: [“y_ind”]
},
{
“class_name”: “bert_ner”,
“n_tags”: “#tag_vocab.len”,
“keep_prob”: 0.1,
“bert_config_file”: “{BERT_PATH}/bert_config.json”,
“pretrained_bert”: “{BERT_PATH}/bert_model.ckpt”,
“attention_probs_keep_prob”: 0.5,
“use_crf”: true,
“return_probas”: false,
“ema_decay”: 0.9,
“encoder_layer_ids”: [-1],
“weight_decay_rate”: 1e-6,
“learning_rate”: 1e-2,
“bert_learning_rate”: 2e-5,
“min_learning_rate”: 1e-7,
“learning_rate_drop_patience”: 30,
“learning_rate_drop_div”: 1.5,
“load_before_drop”: false,
“clip_norm”: 1.0,
“save_path”: “{NER_PATH}/model”,
“load_path”: “{NER_PATH}/model”,
“in”: [“x_subword_tok_ids”, “x_subword_mask”, “pred_subword_mask”],
“in_y”: [“y_ind”],
“out”: [“y_pred_ind”]
},
{
“ref”: “tag_vocab”,
“in”: [“y_pred_ind”],
“out”: [“y_pred”]
}
],
“out”: [“x_tokens”, “y_pred”]
},
“train”: {
“epochs”: 30,
“batch_size”: 16,
“metrics”: [
{
“name”: “ner_f1”,
“inputs”: [“y”, “y_pred”]
},
{
“name”: “ner_token_f1”,
“inputs”: [“y”, “y_pred”]
}
],
“validation_patience”: 50,
“val_every_n_batches”: 20,
“log_every_n_batches”: 20,
“tensorboard_log_dir”: “{NER_PATH}/logs”,
“pytest_max_batches”: 2,
“pytest_batch_size”: 8,
“show_examples”: false,
“evaluation_targets”: [“valid”, “test”],
“class_name”: “nn_trainer”
},
“metadata”: {
“variables”: {
“ROOT_PATH”: “~/.deeppavlov”,
“DOWNLOADS_PATH”: “{ROOT_PATH}/downloads”,
“MODELS_PATH”: “{ROOT_PATH}/FictionModel”,
“BERT_PATH”: “{DOWNLOADS_PATH}/bert_models/multi_cased_L-12_H-768_A-12”,
“NER_PATH”: “{MODELS_PATH}/FicNERData”
},
“requirements”: [
“{DEEPPAVLOV_PATH}/requirements/tf.txt”,
“{DEEPPAVLOV_PATH}/requirements/bert_dp.txt”
],
“labels”: {
“telegram_utils”: “NERCoNLL2003Model”,
“server_utils”: “NER”
},
“download”: [
{
“url”: “http://files.deeppavlov.ai/deeppavlov_data/ner_ontonotes_bert_mult_v1.tar.gz”,
“subdir”: “{MODELS_PATH}”
},
{
“url”: “http://files.deeppavlov.ai/deeppavlov_data/bert/multi_cased_L-12_H-768_A-12.zip”,
“subdir”: “{DOWNLOADS_PATH}/bert_models”
}
]
}
}[quote=“yoptar, post:2, topic:174, full:true”]
Hi @prasanth55555,
Can you show us the code that you tried to run?
[/quote]

and

code is

ner_model = build_model(‘fiction.json’, download=False)
where fiction is the above json
i got error when i tried to process
nermodel([‘search for william shakesphere’])

`

It seems that the input to the model is empty. Please, try the following:
ner_model = build_model(‘fiction.json’, download=False)
nermodel(['search', 'for', 'william', 'shakesphere'])
Can you also provide the whole output of the model including loading stage?