Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

182
Visualizações
(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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda