ELS-RD / transformer-deploy

Efficient, scalable and enterprise-grade CPU/GPU inference server for 🤗 Hugging Face transformer models 🚀
https://els-rd.github.io/transformer-deploy/
Apache License 2.0
1.64k stars 150 forks source link

quick question about the attribute "model_name" in `BertForTokenClassification` #161

Closed yc-wang00 closed 1 year ago

yc-wang00 commented 1 year ago

This might be a stupid question, but I saw in the utils folder, it has this line:

self.model = BertForTokenClassification(model_name=current_name, model_path=target_model)

However, when I add custom task, it will output TypeError: __init__() got an unexpected keyword argument 'model_name'

which seems that huggingface transformers 'BertForTokenClassification' class doesn't have these attributes. I am wondering why this doesn't happen in your experiments.

nevermind. I saw the overriding class. Closed