TypeError: __init__() got an unexpected keyword argument 'feature_names'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.3k
- Forks
- 135
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to run query autocomplete. Unable to run the line
args = DetextArg(ftr_ext="cnn",
num_filters=50,
num_units=64,
emb_sim_func=["inner"], # cosine matching function
ltr_loss_fn="softmax", # learning-to-rank loss
optimizer="bert_adam", # same AdamWeightDecay optimizer as in BERT training
learning_rate=0.002,
max_len=16,
min_len=3,
use_deep=True,
num_train_steps=300,
steps_per_stats=30,
steps_per_eval=30,
train_batch_size=64,
test_batch_size=64,
pmetric="mrr@5",
vocab_file=vocab_file,
feature_names=["label","usr_prefix","doc_suffix"],
train_file="train.tfrecord",
dev_file="dev.tfrecord",
test_file="test.tfrecord",
out_dir="output")
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the exact query-autocomplete call to DetextArg and inspect its constructor to determine which arguments it accepts. Compare that interface with the shown feature_names argument; done means the reported TypeError is resolved for this invocation and the query-autocomplete path runs successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100