Skip to main content
Question

Issue with V 10 TensorFlow sample

  • May 13, 2020
  • 2 replies
  • 12 views

DieterC
Forum|alt.badge.img+2

Hi forum, I am checking the Tensorflow sample at
https://www.vertica.com/docs/10.0.x/HTML/Content/Authoring/AnalyzingData/MachineLearning/UsingExternalModels/UsingTensorFlow/TensorFlowExample.htm?zoom_highlight=predict TensorFlow.
I am stuck on an error I get for
dbadmin=> select PREDICT_TENSORFLOW ( * USING PARAMETERS model_name='tf_mnist_keras', num_passthru_cols=1) OVER(PARTITION BEST) as predict FROM tf_mnist_test_images;
ERROR 3457: Function PREDICT_TENSORFLOW(int, int, .., int,
HINT: No function matches the given name and argument types. You may need to add explicit type casts
Would you please have a tip what goes wrong here?
Thank you
Dieter

2 replies

glarionov
  • New Participant
  • May 13, 2020

Hi Dieter, well first of all if you would like to add an 'as predict' clause you need to provide enough columns for the whole output, something like 'as (id, col1, col2, col3, col4, col5, col6, col7, col8, col9, col10)'.

However, that shouldn't give the error you're getting. It looks like you haven't installed the TFIntegration library which contains the predict_tensorflow command. In order to do so, you'll have to exit the VSQL prompt and run the following command:
/opt/vertica/bin/admintools -t install_package -d mydb -p 'mypasswd' --package TFIntegration
Just make sure to replace 'mydb' and 'mypasswd' with your database name and password. It might take some time, but should resolve your issue.

It looks like our documentation is not very clear about that step, I'll make sure that gets updated. The reason for requiring users to install this package themselves is because due to the limitations of the TensorFlow library, it does not work on RHEL6, so installing by default would cause an error for some users.

Hope this helps!
George


DieterC
Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • May 14, 2020

Thank you George,
installing the TFIntegration package was the missing piece in this case. I was not aware that there was a seperate package on this.
Best
Dieter