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
8773ff98
Commit
8773ff98
authored
4 years ago
by
Tiago de Freitas Pereira
Browse files
Options
Downloads
Patches
Plain Diff
Improved the checkpointing
parent
7fc43e9e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!180
[dask] Preparing bob.bio.base for dask pipelines
Pipeline
#40607
failed
4 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/bio/base/script/vanilla_biometrics.py
+10
-4
10 additions, 4 deletions
bob/bio/base/script/vanilla_biometrics.py
bob/bio/base/script/vanilla_biometrics_ztnorm.py
+16
-7
16 additions, 7 deletions
bob/bio/base/script/vanilla_biometrics_ztnorm.py
with
26 additions
and
11 deletions
bob/bio/base/script/vanilla_biometrics.py
+
10
−
4
View file @
8773ff98
...
...
@@ -26,6 +26,7 @@ from bob.bio.base.pipelines.vanilla_biometrics import (
dask_get_partition_size
,
FourColumnsScoreWriter
,
CSVScoreWriter
,
BioAlgorithmLegacy
)
from
dask.delayed
import
Delayed
import
pkg_resources
...
...
@@ -213,10 +214,15 @@ def vanilla_biometrics(
pipeline
.
score_writer
=
FourColumnsScoreWriter
(
os
.
path
.
join
(
output
,
"
./tmp
"
))
# Check if it's already checkpointed
if
checkpoint
and
not
isinstance_nested
(
pipeline
.
biometric_algorithm
,
"
biometric_algorithm
"
,
BioAlgorithmCheckpointWrapper
,
if
checkpoint
and
(
not
isinstance_nested
(
pipeline
,
"
biometric_algorithm
"
,
BioAlgorithmCheckpointWrapper
,
)
or
not
isinstance_nested
(
pipeline
,
"
biometric_algorithm
"
,
BioAlgorithmLegacy
)
):
pipeline
=
checkpoint_vanilla_biometrics
(
pipeline
,
output
)
...
...
This diff is collapsed.
Click to expand it.
bob/bio/base/script/vanilla_biometrics_ztnorm.py
+
16
−
7
View file @
8773ff98
...
...
@@ -29,12 +29,17 @@ from bob.bio.base.pipelines.vanilla_biometrics import (
dask_get_partition_size
,
FourColumnsScoreWriter
,
CSVScoreWriter
,
BioAlgorithmLegacy
,
)
from
dask.delayed
import
Delayed
from
bob.bio.base.utils
import
get_resource_filename
from
bob.extension.config
import
load
as
chain_load
from
bob.pipelines.utils
import
isinstance_nested
from
.vanilla_biometrics
import
compute_scores
,
post_process_scores
,
load_database_pipeline
from
.vanilla_biometrics
import
(
compute_scores
,
post_process_scores
,
load_database_pipeline
,
)
import
copy
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -67,11 +72,14 @@ EPILOG = """\b
entry_point_group
=
"
bob.pipelines.config
"
,
cls
=
ConfigCommand
,
epilog
=
EPILOG
,
)
@click.option
(
"
--pipeline
"
,
"
-p
"
,
required
=
True
,
help
=
"
Vanilla biometrics pipeline composed of a scikit-learn Pipeline and a BioAlgorithm
"
,
"
--pipeline
"
,
"
-p
"
,
required
=
True
,
help
=
"
Vanilla biometrics pipeline composed of a scikit-learn Pipeline and a BioAlgorithm
"
,
)
@click.option
(
"
--database
"
,
"
-d
"
,
"
-d
"
,
help
=
"
Biometric Database connector (class that implements the methods: `background_model_samples`, `references` and `probes`)
"
,
)
@click.option
(
...
...
@@ -211,10 +219,11 @@ def vanilla_biometrics_ztnorm(
pipeline
.
score_writer
=
FourColumnsScoreWriter
(
os
.
path
.
join
(
output
,
"
./tmp
"
))
# Check if it's already checkpointed
if
checkpoint
and
not
isinstance_nested
(
pipeline
.
biometric_algorithm
,
"
biometric_algorithm
"
,
BioAlgorithmCheckpointWrapper
,
if
checkpoint
and
(
not
isinstance_nested
(
pipeline
,
"
biometric_algorithm
"
,
BioAlgorithmCheckpointWrapper
,
)
and
not
isinstance_nested
(
pipeline
,
"
biometric_algorithm
"
,
BioAlgorithmLegacy
)
):
pipeline
=
checkpoint_vanilla_biometrics
(
pipeline
,
output
)
...
...
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