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
cc5227ab
Verified
Commit
cc5227ab
authored
2 years ago
by
Yoann Schneider
Browse files
Options
Downloads
Patches
Plain Diff
draft configure documentation
parent
4561df33
No related branches found
No related tags found
No related merge requests found
Pipeline
#80028
passed
2 years ago
Stage: test
Stage: build
Stage: release
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/contents/implem/configure.md
+48
-0
48 additions, 0 deletions
docs/contents/implem/configure.md
docs/contents/implem/index.md
+2
-0
2 additions, 0 deletions
docs/contents/implem/index.md
mkdocs.yml
+3
-0
3 additions, 0 deletions
mkdocs.yml
with
53 additions
and
0 deletions
docs/contents/implem/configure.md
0 → 100644
+
48
−
0
View file @
cc5227ab
# Configuration
When the worker is running over elements, be it locally or on Arkindex, the first step before actually doing
anything is configuration. This process is implemented in the
`configure`
method that a worker
inherits from
[
ElementsWorker
][
elements_worker
]
and
[
BaseWorker
][
base_worker
]
.
This method can also be overloaded if the worker needs additional configuration steps.
The developer mode was designed to help worker developers reproduce and test how their worker
would behave on Arkindex. This is why the configuration process in this mode mirrors the operation while
replacing API calls by CLI arguments.
The developer mode is enabled when at least one of three events occur:
-
the
`--dev`
CLI arguments is used,
-
the
`WORKER_VERSION_ID`
variable was not set in the environment,
-
the
`ARKINDEX_WORKER_RUN`
variable was not set in the environment.
None of these happen when running on Arkindex.
## Developer mode
-
The worker's configuration YAML with variable needed by the worker
contains also the list of secrets needed by the worker. See
[
secrets
][]
.
-
ARKINDEX_CORPUS_ID to specify which corpus the processed elements belong to
-
Local secrets loading
-
DEBUG mode
When implementing a new worker, some additional logs might be needed to properly investigate
why something is not working as intended. The logging level can be set to the
`DEBUG`
level via either
-
the
`--verbose`
CLI arguments,
-
setting the
`ARKINDEX_DEBUG`
to
`True`
in the environment,
-
specifying the
`"debug": True`
in the worker's configuration via the
`user_configuration`
.
For more information, see
[
how to use the user_configuration
][
user-config
]
.
## Arkindex mode
-
DEBUG mode
-
RetrieveWorkerRun, what is a worker run. link to arkindex api ? what information does it give
-
user_configuration loading
reading default values and storing them in the config
-
secrets actual loading
-
overriding the config with worker's configuration
[
elements_worker
]:
/../../../ref/elements_worker#elements-worker
[
base_worker
]:
/../../ref/base_worker#base-worker
[
user-config
]:
/../workers/yaml.md#setting-up-user-configurable-parameters
This diff is collapsed.
Click to expand it.
docs/contents/implem/index.md
0 → 100644
+
2
−
0
View file @
cc5227ab
# Worker Implementation
This diff is collapsed.
Click to expand it.
mkdocs.yml
+
3
−
0
View file @
cc5227ab
...
...
@@ -70,6 +70,9 @@ nav:
-
Using secrets in workers
:
-
contents/secrets/index.md
-
Usage
:
contents/secrets/usage.md
-
Worker Implementation
:
-
contents/implem/index.md
-
Configuration
:
contents/implem/configure.md
-
Python Reference
:
-
Base Worker
:
ref/base_worker.md
-
Elements Worker
:
ref/elements_worker.md
...
...
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