I'm trying to create a 'similar-items' model with an API call.
projects.locations.catalogs.models/create
It seems that model.optimizationObjective value is always unsupported, also if avoided.
{
"error": {
"code": 400,
"message": "Unsupported model.optimizationObjective for type similar-items.",
"status": "INVALID_ARGUMENT"
}
}
I try every possible values present in Reference but nothing to do.
How to solve this issue?
The error message you're encountering suggests that the optimization objective value you're using is not valid for the "similar-items" model type. When creating a similar-items model, the optimization objectives typically supported are limited.
Here are some steps you can take to troubleshoot and resolve the issue:-
1. Check Documentation
2. Default Values
3. Supported Values
4. API Version
5. Error Details
6. Test with Minimal Payload
7. Consult Support
Before posting this request I studied all the References carefully and the solution should be not to assign the field but even in that case the error is the same.
I'm starting to think it's an API bug. The same model can be instantiated directly from the GCloud interface and that's weird.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |