Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Generic Training Dataset
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Arkindex
Workers
Generic Training Dataset
Commits
3b973005
Verified
Commit
3b973005
authored
1 year ago
by
Yoann Schneider
Browse files
Options
Downloads
Patches
Plain Diff
use configuration to get folder IDs
parent
c06448c4
No related branches found
No related tags found
1 merge request
!2
Implement worker
Pipeline
#81800
passed
1 year ago
Stage: test
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.arkindex.yml
+13
-0
13 additions, 0 deletions
.arkindex.yml
worker_generic_training_dataset/worker.py
+7
-8
7 additions, 8 deletions
worker_generic_training_dataset/worker.py
with
20 additions
and
8 deletions
.arkindex.yml
+
13
−
0
View file @
3b973005
...
@@ -9,3 +9,16 @@ workers:
...
@@ -9,3 +9,16 @@ workers:
type
:
data-extract
type
:
data-extract
docker
:
docker
:
build
:
Dockerfile
build
:
Dockerfile
user_configuration
:
train_folder_id
:
type
:
str
title
:
ID of the training folder on Arkindex
required
:
true
validation_folder_id
:
type
:
str
title
:
ID of the validation folder on Arkindex
required
:
true
test_folder_id
:
type
:
str
title
:
ID of the testing folder on Arkindex
required
:
true
This diff is collapsed.
Click to expand it.
worker_generic_training_dataset/worker.py
+
7
−
8
View file @
3b973005
...
@@ -44,14 +44,13 @@ class DatasetExtractor(BaseWorker):
...
@@ -44,14 +44,13 @@ class DatasetExtractor(BaseWorker):
self
.
args
=
self
.
parser
.
parse_args
()
self
.
args
=
self
.
parser
.
parse_args
()
if
self
.
is_read_only
:
if
self
.
is_read_only
:
super
().
configure_for_developers
()
super
().
configure_for_developers
()
self
.
process_information
=
{
"
train_folder_id
"
:
"
47a0e07b-d07a-4969-aced-44450d132f0d
"
,
"
validation_folder_id
"
:
"
8cbc4b53-9e07-4a72-b4e6-93f7f5b0cbed
"
,
"
test_folder_id
"
:
"
659a37ea-3b26-42f0-8b65-78964f9e433e
"
,
}
else
:
else
:
super
().
configure
()
super
().
configure
()
if
self
.
user_configuration
:
logger
.
info
(
"
Overriding with user_configuration
"
)
self
.
config
.
update
(
self
.
user_configuration
)
# database arg is mandatory in dev mode
# database arg is mandatory in dev mode
assert
(
assert
(
not
self
.
is_read_only
or
self
.
args
.
database
is
not
None
not
self
.
is_read_only
or
self
.
args
.
database
is
not
None
...
@@ -79,15 +78,15 @@ class DatasetExtractor(BaseWorker):
...
@@ -79,15 +78,15 @@ class DatasetExtractor(BaseWorker):
"""
"""
logger
.
info
(
"
Retrieving information from process_information
"
)
logger
.
info
(
"
Retrieving information from process_information
"
)
train_folder_id
=
self
.
process_information
.
get
(
"
train_folder_id
"
)
train_folder_id
=
self
.
config
.
get
(
"
train_folder_id
"
)
assert
train_folder_id
,
"
A training folder id is necessary to use this worker
"
assert
train_folder_id
,
"
A training folder id is necessary to use this worker
"
self
.
training_folder_id
=
UUID
(
train_folder_id
)
self
.
training_folder_id
=
UUID
(
train_folder_id
)
val_folder_id
=
self
.
process_information
.
get
(
"
validation_folder_id
"
)
val_folder_id
=
self
.
config
.
get
(
"
validation_folder_id
"
)
assert
val_folder_id
,
"
A validation folder id is necessary to use this worker
"
assert
val_folder_id
,
"
A validation folder id is necessary to use this worker
"
self
.
validation_folder_id
=
UUID
(
val_folder_id
)
self
.
validation_folder_id
=
UUID
(
val_folder_id
)
test_folder_id
=
self
.
process_information
.
get
(
"
test_folder_id
"
)
test_folder_id
=
self
.
config
.
get
(
"
test_folder_id
"
)
self
.
testing_folder_id
=
UUID
(
test_folder_id
)
if
test_folder_id
else
None
self
.
testing_folder_id
=
UUID
(
test_folder_id
)
if
test_folder_id
else
None
def
initialize_database
(
self
):
def
initialize_database
(
self
):
...
...
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