MLflow models
Create Logged Model
POST
/
api
/
2.0
/
mlflow
/
logged-models
Create Logged Model
curl --request POST \
--url https://mycluster.domino.tech/api/2.0/mlflow/logged-models \
--header 'Content-Type: application/json' \
--data '
{
"experiment_id": "<string>",
"name": "<string>",
"model_type": "<string>",
"source_run_id": "<string>",
"params": [
{
"key": "<string>",
"value": "<string>"
}
],
"tags": [
{
"key": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://mycluster.domino.tech/api/2.0/mlflow/logged-models"
payload = {
"experiment_id": "<string>",
"name": "<string>",
"model_type": "<string>",
"source_run_id": "<string>",
"params": [
{
"key": "<string>",
"value": "<string>"
}
],
"tags": [
{
"key": "<string>",
"value": "<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({
experiment_id: '<string>',
name: '<string>',
model_type: '<string>',
source_run_id: '<string>',
params: [{key: '<string>', value: '<string>'}],
tags: [{key: '<string>', value: '<string>'}]
})
};
fetch('https://mycluster.domino.tech/api/2.0/mlflow/logged-models', 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/logged-models",
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([
'experiment_id' => '<string>',
'name' => '<string>',
'model_type' => '<string>',
'source_run_id' => '<string>',
'params' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'tags' => [
[
'key' => '<string>',
'value' => '<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/logged-models"
payload := strings.NewReader("{\n \"experiment_id\": \"<string>\",\n \"name\": \"<string>\",\n \"model_type\": \"<string>\",\n \"source_run_id\": \"<string>\",\n \"params\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\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/logged-models")
.header("Content-Type", "application/json")
.body("{\n \"experiment_id\": \"<string>\",\n \"name\": \"<string>\",\n \"model_type\": \"<string>\",\n \"source_run_id\": \"<string>\",\n \"params\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/2.0/mlflow/logged-models")
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 \"experiment_id\": \"<string>\",\n \"name\": \"<string>\",\n \"model_type\": \"<string>\",\n \"source_run_id\": \"<string>\",\n \"params\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"model": {
"info": {
"model_id": "logged_model_12345",
"experiment_id": "exp_001",
"name": "my_awesome_model",
"creation_timestamp_ms": 1678886400000,
"last_updated_timestamp_ms": 1678887000000,
"artifact_uri": "s3://my-bucket/models/my_awesome_model",
"status": "LOGGED_MODEL_STATUS_UNSPECIFIED",
"creator_id": 12345,
"model_type": "Classifier",
"source_run_id": "run_abcd1234efgh5678",
"status_message": "Model successfully logged.",
"tags": [
{
"key": "<string>",
"value": "<string>"
}
],
"registrations": [
{
"name": "<string>",
"version": "<string>"
}
]
},
"data": {
"params": [
{
"key": "<string>",
"value": "<string>"
}
],
"metrics": [
{
"key": "<string>",
"step": "0",
"timestamp": 123,
"value": 123
}
]
}
}
}Body
application/json
Request body for creating a new logged model.
ID of the associated experiment.
Name of the model. Optional. If not specified, the backend will generate one.
The type of model, such as "Agent", "Classifier", "LLM".
Run ID of the run that created this model.
LoggedModel params.
Show child attributes
Show child attributes
LoggedModel tags.
Show child attributes
Show child attributes
Response
200 - application/json
List of artifacts that fit the search criteria
The response from creating a logged model.
A LoggedModel message includes logged model attributes, tags, registration info, params, and linked run metrics.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Create Logged Model
curl --request POST \
--url https://mycluster.domino.tech/api/2.0/mlflow/logged-models \
--header 'Content-Type: application/json' \
--data '
{
"experiment_id": "<string>",
"name": "<string>",
"model_type": "<string>",
"source_run_id": "<string>",
"params": [
{
"key": "<string>",
"value": "<string>"
}
],
"tags": [
{
"key": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://mycluster.domino.tech/api/2.0/mlflow/logged-models"
payload = {
"experiment_id": "<string>",
"name": "<string>",
"model_type": "<string>",
"source_run_id": "<string>",
"params": [
{
"key": "<string>",
"value": "<string>"
}
],
"tags": [
{
"key": "<string>",
"value": "<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({
experiment_id: '<string>',
name: '<string>',
model_type: '<string>',
source_run_id: '<string>',
params: [{key: '<string>', value: '<string>'}],
tags: [{key: '<string>', value: '<string>'}]
})
};
fetch('https://mycluster.domino.tech/api/2.0/mlflow/logged-models', 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/logged-models",
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([
'experiment_id' => '<string>',
'name' => '<string>',
'model_type' => '<string>',
'source_run_id' => '<string>',
'params' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'tags' => [
[
'key' => '<string>',
'value' => '<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/logged-models"
payload := strings.NewReader("{\n \"experiment_id\": \"<string>\",\n \"name\": \"<string>\",\n \"model_type\": \"<string>\",\n \"source_run_id\": \"<string>\",\n \"params\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\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/logged-models")
.header("Content-Type", "application/json")
.body("{\n \"experiment_id\": \"<string>\",\n \"name\": \"<string>\",\n \"model_type\": \"<string>\",\n \"source_run_id\": \"<string>\",\n \"params\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/2.0/mlflow/logged-models")
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 \"experiment_id\": \"<string>\",\n \"name\": \"<string>\",\n \"model_type\": \"<string>\",\n \"source_run_id\": \"<string>\",\n \"params\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"model": {
"info": {
"model_id": "logged_model_12345",
"experiment_id": "exp_001",
"name": "my_awesome_model",
"creation_timestamp_ms": 1678886400000,
"last_updated_timestamp_ms": 1678887000000,
"artifact_uri": "s3://my-bucket/models/my_awesome_model",
"status": "LOGGED_MODEL_STATUS_UNSPECIFIED",
"creator_id": 12345,
"model_type": "Classifier",
"source_run_id": "run_abcd1234efgh5678",
"status_message": "Model successfully logged.",
"tags": [
{
"key": "<string>",
"value": "<string>"
}
],
"registrations": [
{
"name": "<string>",
"version": "<string>"
}
]
},
"data": {
"params": [
{
"key": "<string>",
"value": "<string>"
}
],
"metrics": [
{
"key": "<string>",
"step": "0",
"timestamp": 123,
"value": 123
}
]
}
}
}