Issues when run two programs compute the same metrics
{'login': 'lamthuy', 'id': 8089862, 'node_id': 'MDQ6VXNlcjgwODk4NjI=', 'avatar_url': 'https://avatars.githubusercontent.com/u/8089862?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/lamthuy', 'html_url': 'https://github.com/lamthuy', 'followers_url': 'https://api.github.com/users/lamthuy/followers', 'following_url': 'https://api.github.com/users/lamthuy/following{/other_user}', 'gists_url': 'https://api.github.com/users/lamthuy/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/lamthuy/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/lamthuy/subscriptions', 'organizations_url': 'https://api.github.com/users/lamthuy/orgs', 'repos_url': 'https://api.github.com/users/lamthuy/repos', 'events_url': 'https://api.github.com/users/lamthuy/events{/privacy}', 'received_events_url': 'https://api.github.com/users/lamthuy/received_events', 'type': 'User', 'site_admin': False}
[]
[]
['Hi ! To avoid collisions you can specify a `experiment_id` when instantiating your metric using `load_metric`. It will replace "default_experiment" with the experiment id that you provide in the arrow filename. \r\n\r\nAlso when two `experiment_id` collide we\'re supposed to detect it using our locking mechanism. Not sure why it didn\'t work in your case. Could you share some code that reproduces the issue ? This would help us investigate.'
 'Thank you for your response. I fixed the issue by set "keep_in_memory=True" when load_metric. \r\nI cannot share the entire source code but below is the wrapper I wrote:\r\n\r\n```python\r\nclass Evaluation:\r\n    def __init__(self, metric=\'sacrebleu\'):\r\n        # self.metric = load_metric(metric, keep_in_memory=True)\r\n        self.metric = load_metric(metric)\r\n\r\n    def add(self, predictions, references):\r\n        self.metric.add_batch(predictions=predictions, references=references)\r\n\r\n    def compute(self):\r\n        return self.metric.compute()[\'score\']\r\n```\r\n\r\nThen call the given wrapper as follows:\r\n\r\n```python\r\neval = Evaluation(metric=\'sacrebleu\')\r\nfor query, candidates,  labels in tqdm(dataset):\r\n    predictions = net.generate(query)\r\n    references = [[s] for s in labels]\r\n    eval.add(predictions, references)\r\n    if n % 100 == 0:\r\n        bleu += eval.compute()\r\n        eval = Evaluation(metric=\'sacrebleu\')']
I got the following error when running two different programs that both compute sacreblue metrics. It seems that both read/and/write to the same location (.cache/huggingface/metrics/sacrebleu/default/default_experiment-1-0.arrow) where it caches the batches:

```
File "train_matching_min.py", line 160, in <module>ch_9_label
    avg_loss = valid(epoch, args.batch, args.validation, args.with_label)
  File "train_matching_min.py", line 93, in valid
    bleu += eval.compute()
  File "/u/tlhoang/projects/seal/match/models/eval.py", line 23, in compute
    return self.metric.compute()['score']
  File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/metric.py", line 387, in compute
    self._finalize()
  File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/metric.py", line 355, in _finalize
    self.data = Dataset(**reader.read_files([{"filename": f} for f in file_paths]))
  File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 231, in read_files
    pa_table = self._read_files(files)
  File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 170, in _read_files
    pa_table: pa.Table = self._get_dataset_from_filename(f_dict)
  File "/dccstor/know/anaconda3/lib/python3.7/site-packages/datasets/arrow_reader.py", line 299, in _get_dataset_from_filename
    pa_table = f.read_all()
  File "pyarrow/ipc.pxi", line 481, in pyarrow.lib.RecordBatchReader.read_all
  File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Expected to read 1819307375 metadata bytes, but only read 454396
``` 
{'url': 'https://api.github.com/repos/huggingface/datasets/issues/1766/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}