Closed mbarretta closed 9 months ago
Notebooks are calling the Python methods directly and not using the import script, so this change in #608 broke the method signature. We just need to make the arg default to None
and move it in the arg list.
(26] load model ("dslim/bert-base-NER"
"ner")
Loading HuggingFace transformer tokenizer and model [slim/bert-base-NER] for task [ner]
TypeError
<ipython-input-26-ele3b282bf1> in <cell line: 1> ()
----> 1 load model ("dslim/bert-base-NER"
Traceback (most recent call last)
"ner")
<ipython-input-25-891c440b381e> in load model (model id, task type)
print (f"Loading HuggingFace transformer tokenizer and model [ {model id)l for task [{task type}]" )
tm
= TransformerModel (model id=model id, task type=task type)
model_path, config, vocab_path = tm.save (tmp_dir)
TypeError: TransformerModel. init () missing 1 required keyword-only argument: 'access token'
608 changed the
TransformerModel
constructor, making theaccess_token
attribute required. Since tokens are not required for public models, users must now setaccess_token
to an empty string to use the model. I think this is an unnecessary breaking change.