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
Merge requests
!500
Store model_version details regardless of model version configuration
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Store model_version details regardless of model version configuration
always-set-model-attributes
into
master
Overview
3
Commits
6
Pipelines
6
Changes
2
Merged
Manon Blanco
requested to merge
always-set-model-attributes
into
master
1 year ago
Overview
3
Commits
6
Pipelines
6
Changes
2
Expand
Closes
#285 (closed)
0
0
Merge request reports
Compare
master
version 5
b71e5970
1 year ago
version 4
a27e613b
1 year ago
version 3
39d2503a
1 year ago
version 2
36be1047
1 year ago
version 1
4658ea87
1 year ago
master (base)
and
version 5
latest version
d2eae87a
6 commits,
1 year ago
version 5
b71e5970
6 commits,
1 year ago
version 4
a27e613b
4 commits,
1 year ago
version 3
39d2503a
3 commits,
1 year ago
version 2
36be1047
2 commits,
1 year ago
version 1
4658ea87
1 commit,
1 year ago
2 files
+
15
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
arkindex_worker/worker/base.py
+
11
−
4
Options
@@ -148,6 +148,13 @@ class BaseWorker:
# there is at least one available sqlite database either given or in the parent tasks
self
.
use_cache
=
False
# model_version_id will be updated in configure() using the worker_run's model version
# or in configure_for_developers() from the environment
self
.
model_version_id
=
None
# model_details will be updated in configure() using the worker_run's model version
# or in configure_for_developers() from the environment
self
.
model_details
=
{}
# task_parents will be updated in configure_cache() if the cache is supported,
# if the task ID is set and if no database is passed as argument
self
.
task_parents
=
[]
@@ -257,15 +264,15 @@ class BaseWorker:
# Load model version configuration when available
model_version
=
worker_run
.
get
(
"
model_version
"
)
if
model_version
and
model_version
.
get
(
"
configuration
"
)
:
if
model_version
:
logger
.
info
(
"
Loaded model version configuration from WorkerRun
"
)
self
.
model_configuration
.
update
(
model_version
.
get
(
"
configuration
"
)
)
self
.
model_configuration
.
update
(
model_version
[
"
configuration
"
]
)
# Set model_version ID as worker attribute
self
.
model_version_id
=
model_version
.
get
(
"
id
"
)
self
.
model_version_id
=
model_version
[
"
id
"
]
# Set model details as worker attribute
self
.
model_details
=
model_version
.
get
(
"
model
"
)
self
.
model_details
=
model_version
[
"
model
"
]
# Retrieve initial configuration from API
self
.
config
=
worker_version
[
"
configuration
"
].
get
(
"
configuration
"
,
{})
Loading