text: 
  
  TITLE
  Where do the models go in colab?
  
  COMMENTS
  1
  
  REACTIONS
  +1: 0
  -1: 0
  laugh: 0
  hooray: 0
  heart: 0
  rocket: 0
  eyes: 0
  
  BODY
  ## Who can help
  <!-- Your issue will be replied to more quickly if you can figure out the right person to tag with @
   If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
   Please tag fewer than 3 people.
   
   albert, bert, GPT2, XLM: @LysandreJik 
   tokenizers: @mfuntowicz
   documentation: @sgugger
   -->
  
  ## Information
  
  Model I am using (Bert):
  
  The problem arises when using:
  * [ ] the official example scripts: (give details below)
  * [.] my own modified scripts: (give details below)
  
  The tasks I am working on is:
  * [ ] an official GLUE/SQUaD task: (give the name)
  * [.] my own task or dataset: (give details below)
  Semeval 2017 task 10 keyword boundary detection
  
  ## To reproduce
  
  Steps to reproduce the behavior:
  
  1. Run `train.py` from [this repo](https://github.com/pranav-ust/BERT-keyphrase-extraction)
  2. Load the model as `model = BertForTokenClassification.from_pretrained('bert-base-uncased', num_labels=len(params.tag2idx))`
  3. Run `eval.py` as `python evaluate.py --data_dir data/task1/ --bert_model_dir model/ --model_dir experiments/base_model --restore_file best`
  
  This gives the following error:
  `Traceback (most recent call last):
    File "evaluate.py", line 117, in <module>
      config = BertConfig.from_json_file(config_path)
    File "/usr/local/lib/python3.6/dist-packages/transformers/configuration_utils.py", line 436, in from_json_file
      config_dict = cls._dict_from_json_file(json_file)
    File "/usr/local/lib/python3.6/dist-packages/transformers/configuration_utils.py", line 441, in _dict_from_json_file
      with open(json_file, "r", encoding="utf-8") as reader:
  FileNotFoundError: [Errno 2] No such file or directory: 'model/bert_config.json'
  2020-10-16 07:41:50.582535: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
  Loading the dataset...
     done.
  Traceback (most recent call last):
    File "evaluate.py", line 117, in <module>
      config = BertConfig.from_json_file(config_path)
    File "/usr/local/lib/python3.6/dist-packages/transformers/configuration_utils.py", line 436, in from_json_file
      config_dict = cls._dict_from_json_file(json_file)
    File "/usr/local/lib/python3.6/dist-packages/transformers/configuration_utils.py", line 441, in _dict_from_json_file
      with open(json_file, "r", encoding="utf-8") as reader:
  FileNotFoundError: [Errno 2] No such file or directory: 'model/bert_config.json'`
  
  Which I believe is caused by me passing `model/` as `--bert-model-dir` argument.
  Where do the downloaded models go on colab? Or more importantly, can I pass a path argument to download them in a specific folder?
  
  ### Edit
  If I download a model as `!wget https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased.tar.gz` and extract it in the model/ folder, then `python eval.py` gives the following error:
  `Loading the dataset...
      - done.
   Traceback (most recent call last):
         File "evaluate.py", line 118, in <module>
         model = BertForTokenClassification(config, num_labels=len(params.tag2idx))
  TypeError: __init__() got an unexpected keyword argument 'num_labels'`