Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

181
Views
(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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!