curl --request PUT \
--url https://{controlPlaneURL}/api/ml/v1/model-versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"manifest": {
"name": "<string>",
"metadata": {},
"ml_repo": "<string>",
"source": {
"type": "truefoundry",
"uri": "<string>"
},
"description": "<string>",
"version_alias": "<string>",
"version": 2,
"type": "model-version",
"framework": {
"type": "transformers",
"library_name": "transformers",
"pipeline_tag": "<string>",
"base_model": "<string>"
},
"environment": {
"python_version": "<string>",
"pip_packages": [
"<string>"
]
},
"step": 0,
"run_id": "<string>"
}
}
'{
"data": {
"id": "<string>",
"fqn": "<string>",
"created_by_subject": {
"subjectId": "<string>",
"subjectType": "user",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>"
},
"manifest": {
"name": "<string>",
"metadata": {},
"ml_repo": "<string>",
"source": {
"type": "truefoundry",
"uri": "<string>"
},
"description": "<string>",
"version_alias": "<string>",
"version": 2,
"type": "model-version",
"framework": {
"type": "transformers",
"library_name": "transformers",
"pipeline_tag": "<string>",
"base_model": "<string>"
},
"environment": {
"python_version": "<string>",
"pip_packages": [
"<string>"
]
},
"step": 0,
"run_id": "<string>"
},
"ml_repo_id": "<string>",
"model_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"usage_code_snippet": "<string>",
"tags": [
"<string>"
],
"metrics": [
{
"key": "<string>",
"value": 123,
"timestamp": 123,
"step": 0
}
],
"deployable": false
}
}curl --request PUT \
--url https://{controlPlaneURL}/api/ml/v1/model-versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"manifest": {
"name": "<string>",
"metadata": {},
"ml_repo": "<string>",
"source": {
"type": "truefoundry",
"uri": "<string>"
},
"description": "<string>",
"version_alias": "<string>",
"version": 2,
"type": "model-version",
"framework": {
"type": "transformers",
"library_name": "transformers",
"pipeline_tag": "<string>",
"base_model": "<string>"
},
"environment": {
"python_version": "<string>",
"pip_packages": [
"<string>"
]
},
"step": 0,
"run_id": "<string>"
}
}
'{
"data": {
"id": "<string>",
"fqn": "<string>",
"created_by_subject": {
"subjectId": "<string>",
"subjectType": "user",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>"
},
"manifest": {
"name": "<string>",
"metadata": {},
"ml_repo": "<string>",
"source": {
"type": "truefoundry",
"uri": "<string>"
},
"description": "<string>",
"version_alias": "<string>",
"version": 2,
"type": "model-version",
"framework": {
"type": "transformers",
"library_name": "transformers",
"pipeline_tag": "<string>",
"base_model": "<string>"
},
"environment": {
"python_version": "<string>",
"pip_packages": [
"<string>"
]
},
"step": 0,
"run_id": "<string>"
},
"ml_repo_id": "<string>",
"model_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"usage_code_snippet": "<string>",
"tags": [
"<string>"
],
"metrics": [
{
"key": "<string>",
"value": 123,
"timestamp": 123,
"step": 0
}
],
"deployable": false
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Model Version artifact.
Show child attributes
Name of the entity
256Key value metadata. Should be valid JSON. For e.g. {"business-unit": "sales", "quality": "good", "rating": 4.5}
Name of the ML Repo
512Version alias is alternate, ideally human readable, version string to reference an artifact version. It should start with v followed by alphanumeric and it can include . and - in between (e.g. v1.0.0, v1-prod, v3-dev, etc)
128Version of the entity
x >= 1model-version Framework for the model version like Transformers, PyTorch, Sklearn, Xgboost etc with framework specific metadata. This will be used to infer model deployment configuration
Show child attributes
Type of the framework
transformers Name of the library for the framework
transformers, sentence-transformers, diffusers The pipeline() task this model can be used with e.g. text-generation. See huggingface docs for all possible values
Base model Id from HuggingFace Hub. If this is a finetuned model, this points to the base model id used for finetuning.
Step/Epoch number in an iterative training loop the model version was created. Generally useful when logging a model version from a MLRepo Run
x >= 0ID of the MLRepo Run that generated the model version
Successful Response
Show child attributes
Show child attributes
Subject ID
Subject type
user, team, serviceaccount, virtualaccount Subject slug
Subject display name
Model Version artifact.
Show child attributes
Name of the entity
256Key value metadata. Should be valid JSON. For e.g. {"business-unit": "sales", "quality": "good", "rating": 4.5}
Name of the ML Repo
512Version alias is alternate, ideally human readable, version string to reference an artifact version. It should start with v followed by alphanumeric and it can include . and - in between (e.g. v1.0.0, v1-prod, v3-dev, etc)
128Version of the entity
x >= 1model-version Framework for the model version like Transformers, PyTorch, Sklearn, Xgboost etc with framework specific metadata. This will be used to infer model deployment configuration
Show child attributes
Type of the framework
transformers Name of the library for the framework
transformers, sentence-transformers, diffusers The pipeline() task this model can be used with e.g. text-generation. See huggingface docs for all possible values
Base model Id from HuggingFace Hub. If this is a finetuned model, this points to the base model id used for finetuning.
Step/Epoch number in an iterative training loop the model version was created. Generally useful when logging a model version from a MLRepo Run
x >= 0ID of the MLRepo Run that generated the model version
Was this page helpful?