arkindex-base-worker 0.5.1b4__tar.gz → 0.5.1b5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/PKG-INFO +1 -1
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_base_worker.egg-info/PKG-INFO +1 -1
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/base.py +21 -12
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/pyproject.toml +1 -1
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/conftest.py +0 -18
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_base_worker.py +33 -123
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/LICENSE +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/README.md +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_base_worker.egg-info/SOURCES.txt +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_base_worker.egg-info/dependency_links.txt +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_base_worker.egg-info/requires.txt +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_base_worker.egg-info/top_level.txt +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/__init__.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/cache.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/image.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/models.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/utils.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/__init__.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/classification.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/corpus.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/dataset.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/element.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/entity.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/image.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/metadata.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/process.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/task.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/training.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/transcription.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/examples/standalone/python/worker.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/examples/tooled/python/worker.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/hooks/pre_gen_project.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/setup.cfg +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/__init__.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_cache.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_dataset_worker.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_element.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/__init__.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_classification.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_cli.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_corpus.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_dataset.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_element.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_element_create_multiple.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_element_create_single.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_element_list_children.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_element_list_parents.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_entity.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_image.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_metadata.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_process.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_task.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_training.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_transcription_create.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_transcription_create_with_elements.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_transcription_list.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_worker.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_image.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_merge.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_modern_config.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_utils.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/worker-demo/tests/__init__.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/worker-demo/tests/conftest.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/worker-demo/tests/test_worker.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/worker-demo/worker_demo/__init__.py +0 -0
- {arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/worker-demo/worker_demo/worker.py +0 -0
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/base.py
RENAMED
|
@@ -265,6 +265,11 @@ class BaseWorker:
|
|
|
265
265
|
if not item["secret"]:
|
|
266
266
|
return (item["key"], item["value"])
|
|
267
267
|
|
|
268
|
+
# The secret may not be picked by the user
|
|
269
|
+
if item["value"] is None:
|
|
270
|
+
logger.info(f"Skipping optional secret {item['key']}")
|
|
271
|
+
return (item["key"], None)
|
|
272
|
+
|
|
268
273
|
# Load secret, only available in Arkindex EE
|
|
269
274
|
try:
|
|
270
275
|
secret = self.load_secret(Path(item["value"]))
|
|
@@ -276,6 +281,19 @@ class BaseWorker:
|
|
|
276
281
|
|
|
277
282
|
return (item["key"], secret)
|
|
278
283
|
|
|
284
|
+
# Load model version configuration when available
|
|
285
|
+
# Workers will use model version ID and details to download the model
|
|
286
|
+
model_version = worker_run.get("model_version")
|
|
287
|
+
if model_version:
|
|
288
|
+
logger.info("Loaded model version configuration from WorkerRun")
|
|
289
|
+
self.model_configuration.update(model_version["configuration"])
|
|
290
|
+
|
|
291
|
+
# Set model_version ID as worker attribute
|
|
292
|
+
self.model_version_id = model_version["id"]
|
|
293
|
+
|
|
294
|
+
# Set model details as worker attribute
|
|
295
|
+
self.model_details = model_version["model"]
|
|
296
|
+
|
|
279
297
|
# Load worker run information
|
|
280
298
|
try:
|
|
281
299
|
config = self.api_client.request(
|
|
@@ -295,6 +313,9 @@ class BaseWorker:
|
|
|
295
313
|
}
|
|
296
314
|
logger.info("Using modern configuration")
|
|
297
315
|
|
|
316
|
+
# Reset the model configuration to make sure workers rely on the single new source
|
|
317
|
+
self.model_configuration = {}
|
|
318
|
+
|
|
298
319
|
return # Stop here once we have modern configuration
|
|
299
320
|
|
|
300
321
|
except ErrorResponse as e:
|
|
@@ -303,18 +324,6 @@ class BaseWorker:
|
|
|
303
324
|
logger.info("Modern configuration is not available")
|
|
304
325
|
|
|
305
326
|
# Use old-style configuration with local merge
|
|
306
|
-
# Load model version configuration when available
|
|
307
|
-
model_version = worker_run.get("model_version")
|
|
308
|
-
if model_version:
|
|
309
|
-
logger.info("Loaded model version configuration from WorkerRun")
|
|
310
|
-
self.model_configuration.update(model_version["configuration"])
|
|
311
|
-
|
|
312
|
-
# Set model_version ID as worker attribute
|
|
313
|
-
self.model_version_id = model_version["id"]
|
|
314
|
-
|
|
315
|
-
# Set model details as worker attribute
|
|
316
|
-
self.model_details = model_version["model"]
|
|
317
|
-
|
|
318
327
|
# Retrieve initial configuration from API
|
|
319
328
|
self.config = worker_version["configuration"].get("configuration", {})
|
|
320
329
|
if "user_configuration" in worker_version["configuration"]:
|
|
@@ -103,12 +103,6 @@ def _mock_worker_run_api(responses):
|
|
|
103
103
|
payload = {
|
|
104
104
|
"id": "56785678-5678-5678-5678-567856785678",
|
|
105
105
|
"parents": [],
|
|
106
|
-
"worker": {
|
|
107
|
-
"id": "deadbeef-1234-5678-1234-worker",
|
|
108
|
-
"name": "Fake worker",
|
|
109
|
-
"slug": "fake_worker",
|
|
110
|
-
"type": "classifier",
|
|
111
|
-
},
|
|
112
106
|
"worker_version": {
|
|
113
107
|
"id": "12341234-1234-1234-1234-123412341234",
|
|
114
108
|
"configuration": {
|
|
@@ -180,12 +174,6 @@ def _mock_worker_run_no_revision_api(responses):
|
|
|
180
174
|
payload = {
|
|
181
175
|
"id": "56785678-5678-5678-5678-567856785678",
|
|
182
176
|
"parents": [],
|
|
183
|
-
"worker": {
|
|
184
|
-
"id": "deadbeef-1234-5678-1234-worker",
|
|
185
|
-
"name": "Fake worker",
|
|
186
|
-
"slug": "fake_worker",
|
|
187
|
-
"type": "classifier",
|
|
188
|
-
},
|
|
189
177
|
"worker_version": {
|
|
190
178
|
"id": "12341234-1234-1234-1234-123412341234",
|
|
191
179
|
"configuration": {
|
|
@@ -355,12 +343,6 @@ def mock_elements_worker_consume_wa(monkeypatch, responses, mock_elements_worker
|
|
|
355
343
|
json={
|
|
356
344
|
"id": "56785678-5678-5678-5678-567856785678",
|
|
357
345
|
"parents": [],
|
|
358
|
-
"worker": {
|
|
359
|
-
"id": "deadbeef-1234-5678-1234-worker",
|
|
360
|
-
"name": "Fake worker",
|
|
361
|
-
"slug": "fake_worker",
|
|
362
|
-
"type": "classifier",
|
|
363
|
-
},
|
|
364
346
|
"worker_version": {
|
|
365
347
|
"id": "12341234-1234-1234-1234-123412341234",
|
|
366
348
|
"configuration": {
|
|
@@ -13,6 +13,29 @@ from arkindex_worker.worker import BaseWorker, ElementsWorker
|
|
|
13
13
|
from arkindex_worker.worker.base import ExtrasDirNotFoundError
|
|
14
14
|
from tests import CORPUS_ID, FIXTURES_DIR
|
|
15
15
|
|
|
16
|
+
SIMPLE_PAYLOAD = {
|
|
17
|
+
"id": "56785678-5678-5678-5678-567856785678",
|
|
18
|
+
"parents": [],
|
|
19
|
+
"worker_version": {
|
|
20
|
+
"id": "12341234-1234-1234-1234-123412341234",
|
|
21
|
+
"worker": {
|
|
22
|
+
"id": "deadbeef-1234-5678-1234-worker",
|
|
23
|
+
"name": "Fake worker",
|
|
24
|
+
"slug": "fake_worker",
|
|
25
|
+
"type": "classifier",
|
|
26
|
+
},
|
|
27
|
+
"revision": {"hash": "deadbeef1234"},
|
|
28
|
+
"configuration": {"configuration": {}},
|
|
29
|
+
},
|
|
30
|
+
"configuration": None,
|
|
31
|
+
"model_version": None,
|
|
32
|
+
"process": {
|
|
33
|
+
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeffff",
|
|
34
|
+
"corpus": CORPUS_ID,
|
|
35
|
+
},
|
|
36
|
+
"summary": "Worker Fake worker @ 123412",
|
|
37
|
+
}
|
|
38
|
+
|
|
16
39
|
|
|
17
40
|
def test_init_default_local_share():
|
|
18
41
|
worker = BaseWorker()
|
|
@@ -149,38 +172,13 @@ def test_configure_worker_run(mocker, responses, caplog):
|
|
|
149
172
|
|
|
150
173
|
worker = BaseWorker()
|
|
151
174
|
mocker.patch.object(sys, "argv", ["worker"])
|
|
152
|
-
user_configuration = {
|
|
153
|
-
"id": "bbbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
|
|
154
|
-
"name": "BBB",
|
|
155
|
-
"configuration": {"a": "b"},
|
|
156
|
-
}
|
|
157
175
|
payload = {
|
|
158
|
-
|
|
159
|
-
"
|
|
160
|
-
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"slug": "fake_worker",
|
|
164
|
-
"type": "classifier",
|
|
165
|
-
},
|
|
166
|
-
"worker_version": {
|
|
167
|
-
"id": "12341234-1234-1234-1234-123412341234",
|
|
168
|
-
"worker": {
|
|
169
|
-
"id": "deadbeef-1234-5678-1234-worker",
|
|
170
|
-
"name": "Fake worker",
|
|
171
|
-
"slug": "fake_worker",
|
|
172
|
-
"type": "classifier",
|
|
173
|
-
},
|
|
174
|
-
"revision": {"hash": "deadbeef1234"},
|
|
175
|
-
"configuration": {"configuration": {}},
|
|
176
|
-
},
|
|
177
|
-
"configuration": user_configuration,
|
|
178
|
-
"model_version": None,
|
|
179
|
-
"process": {
|
|
180
|
-
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeffff",
|
|
181
|
-
"corpus": CORPUS_ID,
|
|
176
|
+
**SIMPLE_PAYLOAD,
|
|
177
|
+
"configuration": {
|
|
178
|
+
"id": "bbbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
|
|
179
|
+
"name": "BBB",
|
|
180
|
+
"configuration": {"a": "b"},
|
|
182
181
|
},
|
|
183
|
-
"summary": "Worker Fake worker @ 123412",
|
|
184
182
|
}
|
|
185
183
|
|
|
186
184
|
responses.add(
|
|
@@ -262,8 +260,7 @@ def test_configure_user_configuration_defaults(mocker, responses):
|
|
|
262
260
|
worker.args = worker.parser.parse_args()
|
|
263
261
|
|
|
264
262
|
payload = {
|
|
265
|
-
|
|
266
|
-
"parents": [],
|
|
263
|
+
**SIMPLE_PAYLOAD,
|
|
267
264
|
"worker_version": {
|
|
268
265
|
"id": "12341234-1234-1234-1234-123412341234",
|
|
269
266
|
"worker": {
|
|
@@ -293,12 +290,6 @@ def test_configure_user_configuration_defaults(mocker, responses):
|
|
|
293
290
|
"param_5": True,
|
|
294
291
|
},
|
|
295
292
|
},
|
|
296
|
-
"model_version": None,
|
|
297
|
-
"process": {
|
|
298
|
-
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeffff",
|
|
299
|
-
"corpus": CORPUS_ID,
|
|
300
|
-
},
|
|
301
|
-
"summary": "Worker Fake worker @ 123412",
|
|
302
293
|
}
|
|
303
294
|
responses.add(
|
|
304
295
|
responses.GET,
|
|
@@ -340,30 +331,12 @@ def test_configure_user_config_debug(mocker, responses, debug):
|
|
|
340
331
|
mocker.patch.object(sys, "argv", ["worker"])
|
|
341
332
|
assert logger.level == logging.NOTSET
|
|
342
333
|
payload = {
|
|
343
|
-
|
|
344
|
-
"parents": [],
|
|
345
|
-
"worker_version": {
|
|
346
|
-
"id": "12341234-1234-1234-1234-123412341234",
|
|
347
|
-
"worker": {
|
|
348
|
-
"id": "deadbeef-1234-5678-1234-worker",
|
|
349
|
-
"name": "Fake worker",
|
|
350
|
-
"slug": "fake_worker",
|
|
351
|
-
"type": "classifier",
|
|
352
|
-
},
|
|
353
|
-
"revision": {"hash": "deadbeef1234"},
|
|
354
|
-
"configuration": {"configuration": {}},
|
|
355
|
-
},
|
|
356
|
-
"model_version": None,
|
|
334
|
+
**SIMPLE_PAYLOAD,
|
|
357
335
|
"configuration": {
|
|
358
336
|
"id": "af0daaf4-983e-4703-a7ed-a10f146d6684",
|
|
359
337
|
"name": "BBB",
|
|
360
338
|
"configuration": {"debug": debug},
|
|
361
339
|
},
|
|
362
|
-
"process": {
|
|
363
|
-
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeffff",
|
|
364
|
-
"corpus": CORPUS_ID,
|
|
365
|
-
},
|
|
366
|
-
"summary": "Worker Fake worker @ 123412",
|
|
367
340
|
}
|
|
368
341
|
responses.add(
|
|
369
342
|
responses.GET,
|
|
@@ -393,32 +366,8 @@ def test_configure_worker_run_missing_conf(mocker, responses):
|
|
|
393
366
|
mocker.patch.object(sys, "argv", ["worker"])
|
|
394
367
|
|
|
395
368
|
payload = {
|
|
396
|
-
|
|
397
|
-
"parents": [],
|
|
398
|
-
"worker": {
|
|
399
|
-
"id": "deadbeef-1234-5678-1234-worker",
|
|
400
|
-
"name": "Fake worker",
|
|
401
|
-
"slug": "fake_worker",
|
|
402
|
-
"type": "classifier",
|
|
403
|
-
},
|
|
404
|
-
"worker_version": {
|
|
405
|
-
"id": "12341234-1234-1234-1234-123412341234",
|
|
406
|
-
"worker": {
|
|
407
|
-
"id": "deadbeef-1234-5678-1234-worker",
|
|
408
|
-
"name": "Fake worker",
|
|
409
|
-
"slug": "fake_worker",
|
|
410
|
-
"type": "classifier",
|
|
411
|
-
},
|
|
412
|
-
"revision": {"hash": "deadbeef1234"},
|
|
413
|
-
"configuration": {"configuration": {}},
|
|
414
|
-
},
|
|
415
|
-
"model_version": None,
|
|
369
|
+
**SIMPLE_PAYLOAD,
|
|
416
370
|
"configuration": {"id": "bbbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", "name": "BBB"},
|
|
417
|
-
"process": {
|
|
418
|
-
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeffff",
|
|
419
|
-
"corpus": CORPUS_ID,
|
|
420
|
-
},
|
|
421
|
-
"summary": "Worker Fake worker @ 123412",
|
|
422
371
|
}
|
|
423
372
|
responses.add(
|
|
424
373
|
responses.GET,
|
|
@@ -446,28 +395,7 @@ def test_configure_worker_run_no_worker_run_conf(mocker, responses):
|
|
|
446
395
|
worker = BaseWorker()
|
|
447
396
|
mocker.patch.object(sys, "argv", ["worker"])
|
|
448
397
|
|
|
449
|
-
payload =
|
|
450
|
-
"id": "56785678-5678-5678-5678-567856785678",
|
|
451
|
-
"parents": [],
|
|
452
|
-
"worker_version": {
|
|
453
|
-
"id": "12341234-1234-1234-1234-123412341234",
|
|
454
|
-
"worker": {
|
|
455
|
-
"id": "deadbeef-1234-5678-1234-worker",
|
|
456
|
-
"name": "Fake worker",
|
|
457
|
-
"slug": "fake_worker",
|
|
458
|
-
"type": "classifier",
|
|
459
|
-
},
|
|
460
|
-
"revision": {"hash": "deadbeef1234"},
|
|
461
|
-
"configuration": {},
|
|
462
|
-
},
|
|
463
|
-
"model_version": None,
|
|
464
|
-
"configuration": None,
|
|
465
|
-
"process": {
|
|
466
|
-
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeffff",
|
|
467
|
-
"corpus": CORPUS_ID,
|
|
468
|
-
},
|
|
469
|
-
"summary": "Worker Fake worker @ 123412",
|
|
470
|
-
}
|
|
398
|
+
payload = SIMPLE_PAYLOAD
|
|
471
399
|
responses.add(
|
|
472
400
|
responses.GET,
|
|
473
401
|
"http://testserver/api/v1/process/workers/56785678-5678-5678-5678-567856785678/",
|
|
@@ -491,20 +419,7 @@ def test_configure_load_model_configuration(mocker, responses):
|
|
|
491
419
|
worker = BaseWorker()
|
|
492
420
|
mocker.patch.object(sys, "argv", ["worker"])
|
|
493
421
|
payload = {
|
|
494
|
-
|
|
495
|
-
"parents": [],
|
|
496
|
-
"worker_version": {
|
|
497
|
-
"id": "12341234-1234-1234-1234-123412341234",
|
|
498
|
-
"worker": {
|
|
499
|
-
"id": "deadbeef-1234-5678-1234-worker",
|
|
500
|
-
"name": "Fake worker",
|
|
501
|
-
"slug": "fake_worker",
|
|
502
|
-
"type": "classifier",
|
|
503
|
-
},
|
|
504
|
-
"revision": {"hash": "deadbeef1234"},
|
|
505
|
-
"configuration": {"configuration": {}},
|
|
506
|
-
},
|
|
507
|
-
"configuration": None,
|
|
422
|
+
**SIMPLE_PAYLOAD,
|
|
508
423
|
"model_version": {
|
|
509
424
|
"id": "12341234-1234-1234-1234-123412341234",
|
|
510
425
|
"model": {
|
|
@@ -517,11 +432,6 @@ def test_configure_load_model_configuration(mocker, responses):
|
|
|
517
432
|
"param3": None,
|
|
518
433
|
},
|
|
519
434
|
},
|
|
520
|
-
"process": {
|
|
521
|
-
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeffff",
|
|
522
|
-
"corpus": CORPUS_ID,
|
|
523
|
-
},
|
|
524
|
-
"summary": "Worker Fake worker @ 123412",
|
|
525
435
|
}
|
|
526
436
|
|
|
527
437
|
responses.add(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/corpus.py
RENAMED
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/dataset.py
RENAMED
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/element.py
RENAMED
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/entity.py
RENAMED
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/image.py
RENAMED
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/metadata.py
RENAMED
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/process.py
RENAMED
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/task.py
RENAMED
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/arkindex_worker/worker/training.py
RENAMED
|
File without changes
|
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/examples/standalone/python/worker.py
RENAMED
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/examples/tooled/python/worker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/tests/test_elements_worker/test_cli.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/worker-demo/tests/test_worker.py
RENAMED
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/worker-demo/worker_demo/__init__.py
RENAMED
|
File without changes
|
{arkindex_base_worker-0.5.1b4 → arkindex_base_worker-0.5.1b5}/worker-demo/worker_demo/worker.py
RENAMED
|
File without changes
|