No such file or directory: '../datasets/RE/${DATA}/${SPLIT}/cached_train_BertTokenizer_128_sst-2.lock'
[@wonjininfo](https://github.com/wonjininfo)
Platform: Google Colab
Python version: 3.7
Transformers version: 3.0.0

Installations that were done:

```
pip install transformers==3.0.0
```

I'm trying to use Biobert from [this github repository](https://github.com/dmis-lab/biobert-pytorch), and I followed the below steps given in the repo to finetune it on Relation Extraction task.

1. ``./download.sh`` to download all the datasets
2. ``./preprocess.sh`` to preprocess for RE
3.
```  
%env SAVE_DIR=./output
%env DATA="GAD"
%env SPLIT="1"
%env DATA_DIR=../datasets/RE/${DATA}/${SPLIT}
%env ENTITY=${DATA}-${SPLIT}

%env MAX_LENGTH=128
%env BATCH_SIZE=32
%env NUM_EPOCHS=3
%env SAVE_STEPS=1000
%env SEED=1
```


4.
``` 
 !python run_re.py \
    --task_name SST-2 \
    --config_name bert-base-cased \
    --data_dir ${DATA_DIR} \
    --model_name_or_path dmis-lab/biobert-base-cased-v1.1 \
    --max_seq_length ${MAX_LENGTH} \
    --num_train_epochs ${NUM_EPOCHS} \
    --per_device_train_batch_size ${BATCH_SIZE} \
    --save_steps ${SAVE_STEPS} \
    --seed ${SEED} \
    --do_train \
    --do_predict \
    --learning_rate 5e-5 \
    --output_dir ${SAVE_DIR}/${ENTITY} \
    --overwrite_output_dir
```

When I run step 4, this is the error that I get: 

```
02/28/2022 07:27:25 - INFO - transformers.training_args -   PyTorch: setting up devices
02/28/2022 07:27:25 - WARNING - __main__ -   Process rank: -1, device: cpu, n_gpu: 0, distributed training: False, 16-bits training: False
02/28/2022 07:27:25 - INFO - transformers.configuration_utils -   loading configuration file https://s3.amazonaws.com/models.huggingface.co/bert/dmis-lab/biobert-base-cased-v1.1/config.json from cache at /root/.cache/torch/transformers/efc161c68d589c7960ab5463ed06a47d75d1ec73b2c31938de0ff797f76892dd.d7a3af18ce3a2ab7c0f48f04dc8daff45ed9a3ed333b9e9a79d012a0dedf87a6
02/28/2022 07:27:25 - INFO - transformers.configuration_utils -   Model config BertConfig {
  "attention_probs_dropout_prob": 0.1,
  "gradient_checkpointing": false,
  "hidden_act": "gelu",
  "hidden_dropout_prob": 0.1,
  "hidden_size": 768,
  "initializer_range": 0.02,
  "intermediate_size": 3072,
  "layer_norm_eps": 1e-12,
  "max_position_embeddings": 512,
  "model_type": "bert",
  "num_attention_heads": 12,
  "num_hidden_layers": 12,
  "pad_token_id": 0,
  "type_vocab_size": 2,
  "vocab_size": 28996
}

02/28/2022 07:27:25 - INFO - transformers.tokenization_utils_base -   Model name 'dmis-lab/biobert-base-cased-v1.1' not found in model shortcut name list (bert-base-uncased, bert-large-uncased, bert-base-cased, bert-large-cased, bert-base-multilingual-uncased, bert-base-multilingual-cased, bert-base-chinese, bert-base-german-cased, bert-large-uncased-whole-word-masking, bert-large-cased-whole-word-masking, bert-large-uncased-whole-word-masking-finetuned-squad, bert-large-cased-whole-word-masking-finetuned-squad, bert-base-cased-finetuned-mrpc, bert-base-german-dbmdz-cased, bert-base-german-dbmdz-uncased, TurkuNLP/bert-base-finnish-cased-v1, TurkuNLP/bert-base-finnish-uncased-v1, wietsedv/bert-base-dutch-cased). Assuming 'dmis-lab/biobert-base-cased-v1.1' is a path, a model identifier, or url to a directory containing tokenizer files.
02/28/2022 07:27:29 - INFO - transformers.tokenization_utils_base -   loading file https://s3.amazonaws.com/models.huggingface.co/bert/dmis-lab/biobert-base-cased-v1.1/vocab.txt from cache at /root/.cache/torch/transformers/a6d2d795bddbd9841e0ccd4a2f51c5b412116fda79488f6ffed7979e7ea9ef36.e13dbb970cb325137104fb2e5f36fe865f27746c6b526f6352861b1980eb80b1
02/28/2022 07:27:29 - INFO - transformers.tokenization_utils_base -   loading file https://s3.amazonaws.com/models.huggingface.co/bert/dmis-lab/biobert-base-cased-v1.1/added_tokens.json from cache at None
02/28/2022 07:27:29 - INFO - transformers.tokenization_utils_base -   loading file https://s3.amazonaws.com/models.huggingface.co/bert/dmis-lab/biobert-base-cased-v1.1/special_tokens_map.json from cache at None
02/28/2022 07:27:29 - INFO - transformers.tokenization_utils_base -   loading file https://s3.amazonaws.com/models.huggingface.co/bert/dmis-lab/biobert-base-cased-v1.1/tokenizer_config.json from cache at None
02/28/2022 07:27:29 - INFO - transformers.tokenization_utils_base -   loading file https://s3.amazonaws.com/models.huggingface.co/bert/dmis-lab/biobert-base-cased-v1.1/tokenizer.json from cache at None
Traceback (most recent call last):
  File "run_re.py", line 259, in <module>
    main()
  File "run_re.py", line 125, in main
    GlueDataset(data_args, tokenizer=tokenizer, cache_dir=model_args.cache_dir) if training_args.do_train else None
  File "/usr/local/lib/python3.7/dist-packages/transformers/data/datasets/glue.py", line 106, in __init__
    with FileLock(lock_path):
  File "/usr/local/lib/python3.7/dist-packages/filelock/_api.py", line 214, in __enter__
    self.acquire()
  File "/usr/local/lib/python3.7/dist-packages/filelock/_api.py", line 170, in acquire
    self._acquire()
  File "/usr/local/lib/python3.7/dist-packages/filelock/_unix.py", line 35, in _acquire
    fd = os.open(self._lock_file, open_mode)
FileNotFoundError: [Errno 2] No such file or directory: '../datasets/RE/${DATA}/${SPLIT}/cached_train_BertTokenizer_128_sst-2.lock'

```

What is causing this error? Could someone please help me get rid of it?
From your error `No such file or directory: '../datasets/RE/${DATA}/${SPLIT}/cached_train_BertTokenizer_128_sst-2.lock'` , it seems like the script input literally takes `${DATA}` and `${SPLIT}` instead of the values of the environment variables. <|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.<|||||>I am having the same issue. Does anyone know how to resolve it?