text: 
  
  TITLE
  converting REALM tensorflow checkpoints to pytorch
  
  COMMENTS
  8
  
  REACTIONS
  +1: 0
  -1: 0
  laugh: 0
  hooray: 0
  heart: 0
  rocket: 0
  eyes: 0
  
  BODY
  ## Environment info
  - `transformers` version: 3.3.1
  - Platform: Linux-3.10.0-1062.12.1.el7.x86_64-x86_64-with-centos-7.7.1908-Core
  - Python version: 3.6.3
  - PyTorch version (GPU?): 1.6.0 (False)
  - Tensorflow version (GPU?): 2.3.0 (False)
  - Using GPU in script?: <Yes>
  - Using distributed or parallel set-up in script?: <No>  
  
  
  ### Who can help
  @jplu, @sgugger 
  
   -->
  
  ## Information
  
  Model I am using (Bert, XLNet ...):  Bert
  
  
  ## To reproduce
  
  Steps to reproduce the behavior:
  
  1. Download checkpoint from the http link https://console.cloud.google.com/storage/browser/realm-data/cc_news_pretrained/embedded/.
  2. python convert_bert_original_tf2_checkpoint_to_pytorch.py \
         --tf_checkpoint_path="./cc_news_pretrained/embedder/encoded" \
         --bert_config_file="./bert_config.json" \
         --pytorch_dump_path="./pytorch"
  
  The checkpoint file has the following entries which are probably internal developer files(?):
  model_checkpoint_path: "/cns/li-d/home/lumiere/public/models/gatoatigrado/ner-with-dates/10923195/1-active_losses=mlm_loss/export/temp/1580364602/retriever/encoded/encoded.ckpt"
  all_model_checkpoint_paths: "/cns/li-d/home/lumiere/public/models/gatoatigrado/ner-with-dates/10923195/1-active_losses=mlm_loss/export/temp/1580364602/retriever/encoded/encoded.ckpt"
  
  1)When I set tf_checkpoint_path to the directory containing the checkpoint, I get the error :
  tensorflow.python.framework.errors_impl.NotFoundError: /cns/li-d/home/lumiere/public/models/gatoatigrado/ner-with-dates/10923195/1-active_losses=mlm_loss/export/temp/1580364602/retriever/encoded; No such file or directory
  
  2)When I set tf_checkpoint_path to the checkpoint file encode.ckpt.data-00000-of-00001, I get the error:
  env/lib/python3.6/site-packages/tensorflow/python/training/py_checkpoint_reader.py", line 95, in NewCheckpointReader
  return CheckpointReader(compat.as_bytes(filepattern))
  RuntimeError: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for ./cc_news_pretrained/embedder/encoded/encode.ckpt.data-00000-of-00001
  
  Thanks!
  
  