Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Base Worker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Workers
Base Worker
Commits
aba26633
Commit
aba26633
authored
2 years ago
by
Nolan
Committed by
Yoann Schneider
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Display updated model version
parent
387f094b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!201
Display updated model version
Pipeline
#79492
passed
2 years ago
Stage: release
Stage: deploy
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arkindex_worker/worker/training.py
+11
-2
11 additions, 2 deletions
arkindex_worker/worker/training.py
with
11 additions
and
2 deletions
arkindex_worker/worker/training.py
+
11
−
2
View file @
aba26633
...
...
@@ -145,6 +145,9 @@ class TrainingMixin(object):
"
description
"
:
description
,
},
)
logger
.
info
(
f
"
Model version (
{
model_version_details
[
'
id
'
]
}
) was created successfully
"
)
except
ErrorResponse
as
e
:
if
e
.
status_code
>=
500
:
logger
.
error
(
f
"
Failed to create model version:
{
e
.
content
}
"
)
...
...
@@ -158,6 +161,10 @@ class TrainingMixin(object):
logger
.
error
(
model_version_details
[
0
])
return
logger
.
info
(
f
"
Model version (
{
model_version_details
[
'
id
'
]
}
) has the same hash, using this one instead of creating one
"
)
return
model_version_details
def
upload_to_s3
(
self
,
archive_path
:
str
,
model_version_details
:
dict
)
->
None
:
...
...
@@ -185,11 +192,12 @@ class TrainingMixin(object):
Update the specified model version to the state `Available` and use the given information
"
"""
logger
.
info
(
"
Updating the model version...
"
)
model_version_id
=
model_version_details
.
get
(
"
id
"
)
logger
.
info
(
f
"
Updating model version (
{
model_version_id
}
)
"
)
try
:
self
.
request
(
"
UpdateModelVersion
"
,
id
=
model_version_d
etails
.
get
(
"
id
"
)
,
id
=
model_version_
i
d
,
body
=
{
"
state
"
:
"
available
"
,
"
description
"
:
model_version_details
.
get
(
"
description
"
),
...
...
@@ -197,5 +205,6 @@ class TrainingMixin(object):
"
tag
"
:
model_version_details
.
get
(
"
tag
"
),
},
)
logger
.
info
(
f
"
Model version (
{
model_version_id
}
) was successfully updated
"
)
except
ErrorResponse
as
e
:
logger
.
error
(
f
"
Failed to update model version:
{
e
.
content
}
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment