tensorflow_model_server translation from translate_enes_wmt32k t2t library. "Could not parse example input"

瀏覽次數:26 次
跳到第一則未讀訊息

Paloma Jimeno

未讀,
2020年2月20日 清晨5:15:402020/2/20
收件者:tensor2tensor

I exported a trained transformer model for the enes_wmt32k problem with the following

t2t-exporter
--model=transformer
--hparams_set=transformer_tiny

--problem=translate_enes_wmt32k
--data_dir=<PATH_TO_DATA_DIR>
--output_dir=<PATH_TO_TRAIN_DIR>


I then started the tensorflow_model_server as such


runningserver.PNG


I ensured default_serving signature is present in the exported model saved_model.pbtxt as such


imagen2.PNG


However I get an input parsing error when pinging the REST API as such:


imagen3.PNG


Do you know why is this happening?


The details of my environment are here:

  •  Ubuntu 18.04.3 LTS
  • tensor2tensor==1.6.3
  • Python 2.7

Martin Popel

未讀,
2020年2月20日 清晨5:51:182020/2/20
收件者:Paloma Jimeno、tensor2tensor
Try ASCII quotes "Content-Type: application/json"
instead of curly “Content-Type: application/json”.

Martin

----- Original Message -----
> From: "Paloma Jimeno" <palom...@gmail.com>
> To: "tensor2tensor" <tensor...@googlegroups.com>
> Sent: Thursday, February 20, 2020 11:15:40 AM
> Subject: tensorflow_model_server translation from translate_enes_wmt32k t2t library. "Could not parse example input"

> I exported a trained transformer model for the enes_wmt32k problem with the
> following
>
> t2t-exporter
> --model=transformer
> --hparams_set=transformer_tiny
>
> --problem=translate_enes_wmt32k
> --data_dir=<PATH_TO_DATA_DIR>
> --output_dir=<PATH_TO_TRAIN_DIR>
>
>
> I then started the tensorflow_model_server as such
>
>
> [image: runningserver.PNG]
>
>
> I ensured default_serving signature is present in the exported model
> saved_model.pbtxt as such
>
>
> [image: imagen2.PNG]
>
>
> However I get an input parsing error when pinging the REST API as such:
>
>
> [image: imagen3.PNG]
>
>
> *Do you know why is this happening?*
>
>
> The details of my environment are here:
>
>
> - Ubuntu 18.04.3 LTS
> - tensor2tensor==1.6.3
> - Python 2.7
>
> --
> You received this message because you are subscribed to the Google Groups
> "tensor2tensor" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to tensor2tenso...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tensor2tensor/ab26df1e-99dd-47e6-9439-2adacb7ba1ff%40googlegroups.com.
訊息已遭刪除
訊息已遭刪除

Paloma Jimeno

未讀,
2020年2月20日 清晨7:00:022020/2/20
收件者:tensor2tensor


Thank you, Martin,

It is still a bad request (see picture)
 

badrequest.PNG



Could be an option to use the t2t-query-server as mentioned in this link:

t2t-query.PNG

 

If so, do you have any idea which inputs does it expect? The result from the encode method, maybe? - explained in here

Thank you, 


回覆所有人
回覆作者
轉寄
0 則新訊息