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
bf73055f
Commit
bf73055f
authored
2 years ago
by
Bastien Abadie
Committed by
Yoann Schneider
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Apply 2 suggestion(s) to 1 file(s)
parent
f7b50e3e
No related branches found
No related tags found
1 merge request
!217
Find local model directory method
Pipeline
#79613
failed
2 years ago
Stage: test
Stage: build
Stage: release
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arkindex_worker/worker/base.py
+4
-2
4 additions, 2 deletions
arkindex_worker/worker/base.py
with
4 additions
and
2 deletions
arkindex_worker/worker/base.py
+
4
−
2
View file @
bf73055f
...
...
@@ -124,7 +124,8 @@ class BaseWorker(object):
self
.
work_dir
=
os
.
path
.
join
(
xdg_data_home
,
"
arkindex
"
)
os
.
makedirs
(
self
.
work_dir
,
exist_ok
=
True
)
# Store task ID
# Store task ID. This is only available when running in production
# through a ponos agent
self
.
task_id
=
os
.
environ
.
get
(
"
PONOS_TASK
"
)
self
.
worker_version_id
=
os
.
environ
.
get
(
"
WORKER_VERSION_ID
"
)
...
...
@@ -364,7 +365,8 @@ class BaseWorker(object):
:return: Path to the model on disk
"""
if
self
.
task_id
:
# Running in PONOS
# When running in production with ponos, the agent
# downloads the model and set it in the current task work dir
return
Path
(
self
.
work_dir
)
else
:
model_path
=
self
.
config
.
get
(
"
model_dir
"
,
self
.
args
.
model_dir
)
...
...
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