Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-12-27 00:14:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-27 00:14:29 +0300
commitd6b0aec9b8801487055e096cfe96823424e6f745 (patch)
tree4d445695ae43a6b34c4d2d76b54f2b35fabb5ab0 /lib/api
parenta2f6474ee7cf1f5a48aa4c0176d3cc560d58f17d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/entities/ml/mlflow/model_version.rb6
-rw-r--r--lib/api/ml/mlflow/model_versions.rb4
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/api/entities/ml/mlflow/model_version.rb b/lib/api/entities/ml/mlflow/model_version.rb
index 10fdf3822a5..d57def4e1f2 100644
--- a/lib/api/entities/ml/mlflow/model_version.rb
+++ b/lib/api/entities/ml/mlflow/model_version.rb
@@ -18,7 +18,7 @@ module API
expose :run_id
expose :status
expose :status_message
- expose :metadata
+ expose :metadata, as: :tags, using: KeyValue
expose :run_link
expose :aliases, documentation: { is_array: true, type: String }
@@ -68,10 +68,6 @@ module API
""
end
- def metadata
- []
- end
-
def run_link
""
end
diff --git a/lib/api/ml/mlflow/model_versions.rb b/lib/api/ml/mlflow/model_versions.rb
index 4b211cf540c..72a4a686690 100644
--- a/lib/api/ml/mlflow/model_versions.rb
+++ b/lib/api/ml/mlflow/model_versions.rb
@@ -27,13 +27,15 @@ module API
desc: 'Register model under this name This field is required.'
optional :description, type: String,
desc: 'Optional description for model version.'
+ optional :tags, type: Array, desc: 'Additional metadata for a model version.'
end
post 'create', urgency: :low do
present ::Ml::CreateModelVersionService.new(
model,
{
model_name: params[:name],
- description: params[:description]
+ description: params[:description],
+ metadata: params[:tags]
}
).execute,
with: Entities::Ml::Mlflow::ModelVersion,