Skip to content
Snippets Groups Projects
Commit 3e5506e4 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Some cosmetic changes in the legacy wrap function

parent 18f0ff35
No related branches found
No related tags found
2 merge requests!185Wrappers and aggregators,!180[dask] Preparing bob.bio.base for dask pipelines
Pipeline #39622 failed
# see https://docs.python.org/3/library/pkgutil.html
from pkgutil import extend_path
from .pipelines import VanillaBiometricsPipeline
from .biometric_algorithms import Distance
from .score_writers import FourColumnsScoreWriter, CSVScoreWriter
from .wrappers import BioAlgorithmCheckpointWrapper, BioAlgorithmDaskWrapper, dask_vanilla_biometrics
from .legacy import BioAlgorithmLegacy, DatabaseConnector
__path__ = extend_path(__path__, __name__)
from .legacy import BioAlgorithmLegacy, DatabaseConnector
\ No newline at end of file
......@@ -19,7 +19,7 @@ from bob.bio.base.wrappers import (
wrap_preprocessor,
wrap_extractor,
wrap_algorithm,
wrap_transform_bob,
wrap_bob_legacy,
)
from sklearn.pipeline import make_pipeline
......@@ -263,13 +263,13 @@ def test_wrap_bob_pipeline():
with tempfile.TemporaryDirectory() as dir_name:
pipeline = make_pipeline(
wrap_transform_bob(
wrap_bob_legacy(
FakePreprocesor(),
dir_name,
transform_extra_arguments=(("annotations", "annotations"),),
),
wrap_transform_bob(FakeExtractor(), dir_name,),
wrap_transform_bob(FakeAlgorithm(), dir_name),
wrap_bob_legacy(FakeExtractor(), dir_name,),
wrap_bob_legacy(FakeAlgorithm(), dir_name),
)
oracle = [7.0, 7.0, 7.0, 7.0]
training_samples = generate_samples(n_subjects=2, n_samples_per_subject=2)
......
......@@ -7,7 +7,7 @@ import os
import numpy as np
import tempfile
from sklearn.pipeline import make_pipeline
from bob.bio.base.wrappers import wrap_transform_bob
from bob.bio.base.wrappers import wrap_bob_legacy
from bob.bio.base.test.test_transformers import FakePreprocesor, FakeExtractor, FakeAlgorithm
from bob.bio.base.pipelines.vanilla_biometrics import (
Distance,
......@@ -96,25 +96,25 @@ class DummyDatabase:
def _make_transformer(dir_name):
pipeline = make_pipeline(
wrap_transform_bob(
wrap_bob_legacy(
FakePreprocesor(),
dir_name,
transform_extra_arguments=(("annotations", "annotations"),),
),
wrap_transform_bob(FakeExtractor(), dir_name,)
wrap_bob_legacy(FakeExtractor(), dir_name,)
)
return pipeline
def _make_transformer_with_algorithm(dir_name):
pipeline = make_pipeline(
wrap_transform_bob(
wrap_bob_legacy(
FakePreprocesor(),
dir_name,
transform_extra_arguments=(("annotations", "annotations"),),
),
wrap_transform_bob(FakeExtractor(), dir_name),
wrap_transform_bob(FakeAlgorithm(), dir_name)
wrap_bob_legacy(FakeExtractor(), dir_name),
wrap_bob_legacy(FakeAlgorithm(), dir_name)
)
return pipeline
......
......@@ -13,7 +13,7 @@ import bob.pipelines as mario
import os
def wrap_transform_bob(
def wrap_bob_legacy(
bob_object,
dir_name,
fit_extra_arguments=(("y", "subject"),),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment