Use a trained model to generate new model artifacts
Using the Neptune ML model transform command, you can compute model artifacts like node embeddings on processed graph data using pre-trained model parameters.
Model transform for incremental inference
In the incremental model inference workflow, after you have processed the updated graph data that you exported from Neptune you can start a model transform job using a curl (or awscurl) command like the following:
curl \ -X POST https://
(your Neptune endpoint)
/ml/modeltransform -H 'Content-Type: application/json' \ -d '{ "id" : "(a unique model-training job ID)
", "dataProcessingJobId" : "(the data-processing job-id of a completed job)
", "mlModelTrainingJobId": "(the ML model training job-id)
", "modelTransformOutputS3Location" : "s3://(your Amazon S3 bucket)
/neptune-model-transform/" }'
You can then pass the ID of this job to the create-endpoints API call to create a new endpoint or update an existing one with the new model artifacts generated by this job. This allows the new or updated endpoint to provide model predictions for the updated graph data.
Model transform for any training job
You can also supply a trainingJobName
parameter to generate model
artifacts for any of the SageMaker AI training jobs launched during Neptune
ML model training. Since a Neptune ML model training job can potentially launch many
SageMaker AI training jobs, this gives you the flexibility to create an inference endpoint
based on any of those SageMaker AI training jobs.
For example:
curl \ -X POST https://
(your Neptune endpoint)
/ml/modeltransform -H 'Content-Type: application/json' \ -d '{ "id" : "(a unique model-training job ID)
", "trainingJobName" : "(name a completed SageMaker AI training job)
", "modelTransformOutputS3Location" : "s3://(your Amazon S3 bucket)
/neptune-model-transform/" }'
If the original training job was for a user-provided custom model, you must include
a customModelTransformParameters
object when invoking a model transform.
See Custom models in Neptune ML
for information about how to implement and use a custom model.
Note
The modeltransform
command always runs the model transform on the
best SageMaker AI training job for that training.
See The modeltransform command for more information about model transform jobs.