MLflow models
Create model version
Creates a model version
POST
/
api
/
2.0
/
mlflow
/
model-versions
/
create
cURL
curl --request POST \
--url https://mycluster.domino.tech/api/2.0/mlflow/model-versions/create \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"source": "<string>",
"run_id": "<string>",
"tags": [
{
"key": "<string>",
"value": "<string>"
}
],
"run_link": "<string>",
"description": "<string>"
}
'import requests
url = "https://mycluster.domino.tech/api/2.0/mlflow/model-versions/create"
payload = {
"name": "<string>",
"source": "<string>",
"run_id": "<string>",
"tags": [
{
"key": "<string>",
"value": "<string>"
}
],
"run_link": "<string>",
"description": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
source: '<string>',
run_id: '<string>',
tags: [{key: '<string>', value: '<string>'}],
run_link: '<string>',
description: '<string>'
})
};
fetch('https://mycluster.domino.tech/api/2.0/mlflow/model-versions/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mycluster.domino.tech/api/2.0/mlflow/model-versions/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'source' => '<string>',
'run_id' => '<string>',
'tags' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'run_link' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mycluster.domino.tech/api/2.0/mlflow/model-versions/create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"run_id\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"run_link\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mycluster.domino.tech/api/2.0/mlflow/model-versions/create")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"run_id\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"run_link\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/2.0/mlflow/model-versions/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"run_id\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"run_link\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"model_version": {
"name": "<string>",
"version": "<string>",
"creation_timestamp": 123,
"last_updated_timestamp": 123,
"current_stage": "<string>",
"description": "<string>",
"source": "<string>",
"status": "PENDING_REGISTRATION",
"tags": [
{
"key": "<string>",
"value": "<string>"
}
],
"user_id": "<string>",
"run_id": "<string>",
"status_message": "<string>",
"run_link": "<string>",
"aliases": [
"<string>"
]
}
}{
"error_code": "INTERNAL_ERROR",
"message": "<string>"
}Body
application/json
Register models under this name. This field is required.
URI indicating the location of the model artifacts. This field is required.
MLflow run ID for correlation, if source was generated by an experiment run in MLflow tracking server
Additional metadata for model version.
Show child attributes
Show child attributes
MLflow run link - this is the exact link of the run that generated this model version, potentially hosted at another instance of MLflow.
Optional description for model version.
Response
Created model version
Show child attributes
Show child attributes
Was this page helpful?
⌘I
cURL
curl --request POST \
--url https://mycluster.domino.tech/api/2.0/mlflow/model-versions/create \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"source": "<string>",
"run_id": "<string>",
"tags": [
{
"key": "<string>",
"value": "<string>"
}
],
"run_link": "<string>",
"description": "<string>"
}
'import requests
url = "https://mycluster.domino.tech/api/2.0/mlflow/model-versions/create"
payload = {
"name": "<string>",
"source": "<string>",
"run_id": "<string>",
"tags": [
{
"key": "<string>",
"value": "<string>"
}
],
"run_link": "<string>",
"description": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
source: '<string>',
run_id: '<string>',
tags: [{key: '<string>', value: '<string>'}],
run_link: '<string>',
description: '<string>'
})
};
fetch('https://mycluster.domino.tech/api/2.0/mlflow/model-versions/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mycluster.domino.tech/api/2.0/mlflow/model-versions/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'source' => '<string>',
'run_id' => '<string>',
'tags' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'run_link' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mycluster.domino.tech/api/2.0/mlflow/model-versions/create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"run_id\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"run_link\": \"<string>\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mycluster.domino.tech/api/2.0/mlflow/model-versions/create")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"run_id\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"run_link\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/2.0/mlflow/model-versions/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"run_id\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"run_link\": \"<string>\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"model_version": {
"name": "<string>",
"version": "<string>",
"creation_timestamp": 123,
"last_updated_timestamp": 123,
"current_stage": "<string>",
"description": "<string>",
"source": "<string>",
"status": "PENDING_REGISTRATION",
"tags": [
{
"key": "<string>",
"value": "<string>"
}
],
"user_id": "<string>",
"run_id": "<string>",
"status_message": "<string>",
"run_link": "<string>",
"aliases": [
"<string>"
]
}
}{
"error_code": "INTERNAL_ERROR",
"message": "<string>"
}