

TITLE
REALM checkpoints to pytorch checkpoints

COMMENTS
0

REACTIONS
+1: 2
-1: 0
laugh: 0
hooray: 0
heart: 0
rocket: 0
eyes: 0

BODY
Will it be possible to convert checkpoints in https://console.cloud.google.com/storage/browser/realm-data/cc_news_pretrained to pytorch implementations ? 
I am not very familiar with Tensorflow....
I tried using convert_bert_original_tf_checkpoint_to_pytorch.py but I am not sure I am invoking it correctly.
Here is how I am invoking the python script...
--tf_checkpoint_path="./cc_news_pretrained/embedder/encoded/" \
 --bert_config_file="./bert_config.json" \
 --pytorch_dump_path="./pytorch"

I am using tensorflow 2.3.0.

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!