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

26 views
Skip to first unread message

Paloma Jimeno

unread,
Feb 20, 2020, 5:15:40 AM2/20/20
to 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

unread,
Feb 20, 2020, 5:51:18 AM2/20/20
to 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.
Message has been deleted
Message has been deleted

Paloma Jimeno

unread,
Feb 20, 2020, 7:00:02 AM2/20/20
to 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, 


Reply all
Reply to author
Forward
0 new messages