Skip to content
Snippets Groups Projects
Commit bf73055f authored by Bastien Abadie's avatar Bastien Abadie Committed by Yoann Schneider
Browse files

Apply 2 suggestion(s) to 1 file(s)

parent f7b50e3e
No related branches found
No related tags found
1 merge request!217Find local model directory method
Pipeline #79613 failed
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment