Create, Get, Update, Delete
Manage your model training jobs.
Create Model
import com.clarifai.grpc.api.*;
import com.clarifai.grpc.api.status.*;
// Insert here the initialization code as outlined on this page:
// https://docs.clarifai.com/api-guide/api-overview/api-clients#client-installation-instructions
SingleModelResponse postModelsResponse = stub.postModels(
PostModelsRequest.newBuilder().addModels(
Model.newBuilder()
.setId("petsID")
.setOutputInfo(
OutputInfo.newBuilder().setData(
Data.newBuilder().addConcepts(Concept.newBuilder().setId("boscoe"))
)
)
).build()
);
if (postModelsResponse.getStatus().getCode() != StatusCode.SUCCESS) {
throw new RuntimeException("Post models failed, status: " + postModelsResponse.getStatus());// Insert here the initialization code as outlined on this page:
// https://docs.clarifai.com/api-guide/api-overview/api-clients#client-installation-instructions
stub.PostModels(
{
models: [
{
id: "petsID",
output_info: {
data: {concepts: [{id: "boscoe"}]},
}
}
]
},
metadata,
(err, response) => {
if (err) {
throw new Error(err);
}
if (response.status.code !== 10000) {
throw new Error("Post models failed, status: " + response.status.description);
}
}
);Add Concepts To A Model
Remove Concepts From A Model
Update Model Name and Configuration
Get
List Model Types
Get Models
Get Model By Id
Get Model Output Info By Id
List Model Versions
Get Model Version By Id
Get Model Training Inputs
Get Model Training Inputs By Version
Delete A Model
Delete A Model Version
Delete All Models
Train A Model
Predict With A Model
Search Models By Name And Type
Last updated
Was this helpful?