Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

183
Vistas
(Google AutoML) Error: 3 INVALID_ARGUMENT: Unsupported payload type `row`

I'm trying to port a Python function to javascript that runs a prediction model created on Google Cloud.

Everything works perfectly, until calling the .predict() method as it always throws an Unsupported payload type row error message.

The format of the payload is quite simple:

const data = [ { key1: value1, key2: value2, key3: value3 ... } ];

In case it helps, here's a portion of the code:

const {PredictionServiceClient} = require('@google-cloud/automl').v1beta1;

const ai = new PredictionServiceClient({
    projectId: projectId
});
const payload = {
    row: {
        values: data
    }
};
const request = {
    name: ai.modelPath(projectId, computeRegion, modelId),
    payload: payload,
    params: {feature_importance: true}
};
const [result] = await ai.predict(request);

And here's the original Python code from which the js version is based on:

from google.cloud import aiplatform

aiplatform.init(project=PROJECT_ID, location=compute_region)
endpoint = aiplatform.Endpoint(ENDPOINT_ID)
response = endpoint.predict(instances=data)

Please let me know if I should provide any additional information. Any hints will be greatly appreciated!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Its good to know that you were able to solve your issue. I'm leaving this answer of the current aiplatform libraries in use as November 2021 for the community.

  • Python AIPlatform
  • NodeJs AIPlatform
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda