MLflow models
Set Logged Model Tag
PATCH
/
api
/
2.0
/
mlflow
/
logged-models
/
{model_id}
/
tags
Set Logged Model Tag
curl --request PATCH \
--url https://mycluster.domino.tech/api/2.0/mlflow/logged-models/{model_id}/tags \
--header 'Content-Type: application/json' \
--data '
{
"model_id": "<string>",
"tags": [
{
"key": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://mycluster.domino.tech/api/2.0/mlflow/logged-models/{model_id}/tags"
payload = {
"model_id": "<string>",
"tags": [
{
"key": "<string>",
"value": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({model_id: '<string>', tags: [{key: '<string>', value: '<string>'}]})
};
fetch('https://mycluster.domino.tech/api/2.0/mlflow/logged-models/{model_id}/tags', 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/{model_id}/tags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'model_id' => '<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/{model_id}/tags"
payload := strings.NewReader("{\n \"model_id\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://mycluster.domino.tech/api/2.0/mlflow/logged-models/{model_id}/tags")
.header("Content-Type", "application/json")
.body("{\n \"model_id\": \"<string>\",\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/{model_id}/tags")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_id\": \"<string>\",\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
}
]
}
}
}Path Parameters
The ID of the LoggedModel to set tags for.
Body
application/json
Response
200 - application/json
Successful response
Response for setting tags on 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
Set Logged Model Tag
curl --request PATCH \
--url https://mycluster.domino.tech/api/2.0/mlflow/logged-models/{model_id}/tags \
--header 'Content-Type: application/json' \
--data '
{
"model_id": "<string>",
"tags": [
{
"key": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://mycluster.domino.tech/api/2.0/mlflow/logged-models/{model_id}/tags"
payload = {
"model_id": "<string>",
"tags": [
{
"key": "<string>",
"value": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({model_id: '<string>', tags: [{key: '<string>', value: '<string>'}]})
};
fetch('https://mycluster.domino.tech/api/2.0/mlflow/logged-models/{model_id}/tags', 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/{model_id}/tags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'model_id' => '<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/{model_id}/tags"
payload := strings.NewReader("{\n \"model_id\": \"<string>\",\n \"tags\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://mycluster.domino.tech/api/2.0/mlflow/logged-models/{model_id}/tags")
.header("Content-Type", "application/json")
.body("{\n \"model_id\": \"<string>\",\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/{model_id}/tags")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_id\": \"<string>\",\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
}
]
}
}
}