Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.bio.base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
bob
bob.bio.base
Commits
89064087
Commit
89064087
authored
4 years ago
by
Tiago de Freitas Pereira
Browse files
Options
Downloads
Patches
Plain Diff
Used the ScoreWriter to do the score concatenation
parent
54162c97
No related branches found
No related tags found
2 merge requests
!185
Wrappers and aggregators
,
!180
[dask] Preparing bob.bio.base for dask pipelines
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/bio/base/script/vanilla_biometrics.py
+7
-7
7 additions, 7 deletions
bob/bio/base/script/vanilla_biometrics.py
with
7 additions
and
7 deletions
bob/bio/base/script/vanilla_biometrics.py
+
7
−
7
View file @
89064087
...
@@ -158,7 +158,6 @@ def vanilla_biometrics(pipeline, database, dask_client, groups, output, **kwargs
...
@@ -158,7 +158,6 @@ def vanilla_biometrics(pipeline, database, dask_client, groups, output, **kwargs
biometric_references
=
database
.
references
(
group
=
group
)
biometric_references
=
database
.
references
(
group
=
group
)
logger
.
info
(
f
"
Running vanilla biometrics for group
{
group
}
"
)
logger
.
info
(
f
"
Running vanilla biometrics for group
{
group
}
"
)
allow_scoring_with_all_biometric_references
=
(
allow_scoring_with_all_biometric_references
=
(
database
.
allow_scoring_with_all_biometric_references
database
.
allow_scoring_with_all_biometric_references
if
hasattr
(
database
,
"
allow_scoring_with_all_biometric_references
"
)
if
hasattr
(
database
,
"
allow_scoring_with_all_biometric_references
"
)
...
@@ -182,14 +181,15 @@ def vanilla_biometrics(pipeline, database, dask_client, groups, output, **kwargs
...
@@ -182,14 +181,15 @@ def vanilla_biometrics(pipeline, database, dask_client, groups, output, **kwargs
result
=
result
.
compute
(
scheduler
=
"
single-threaded
"
)
result
=
result
.
compute
(
scheduler
=
"
single-threaded
"
)
# Check if there's a score writer hooked in
# Check if there's a score writer hooked in
if
isinstance
(
pipeline
.
biometric_algorithm
,
BioAlgorithmCheckpointWrapp
er
):
if
hasattr
(
pipeline
.
biometric_algorithm
,
"
score_writ
er
"
):
pipeline
.
biometric_algorithm
.
score_writer
.
concatenate_write_scores
(
result
,
score_file_name
)
pipeline
.
biometric_algorithm
.
score_writer
.
concatenate_write_scores
(
result
,
score_file_name
)
else
:
else
:
# Flatting out the list
with
open
(
score_file_name
,
"
w
"
)
as
f
:
result
=
itertools
.
chain
(
*
result
)
# Flatting out the list
for
probe
in
result
:
result
=
itertools
.
chain
(
*
result
)
for
sample
in
probe
.
samples
:
for
probe
in
result
:
f
.
write
(
sample
.
data
)
for
sample
in
probe
.
samples
:
f
.
writelines
(
sample
.
data
)
if
dask_client
is
not
None
:
if
dask_client
is
not
None
:
dask_client
.
shutdown
()
dask_client
.
shutdown
()
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