Commit d84b496a authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

[sphinx] Fixed doctests

parent fe45d549
Pipeline #45736 passed with stage
in 6 minutes and 22 seconds
...@@ -200,7 +200,7 @@ class BioAlgorithmLegacy(BioAlgorithm): ...@@ -200,7 +200,7 @@ class BioAlgorithmLegacy(BioAlgorithm):
------- -------
>>> from bob.bio.base.pipelines.vanilla_biometrics import BioAlgorithmLegacy >>> from bob.bio.base.pipelines.vanilla_biometrics import BioAlgorithmLegacy
>>> from bob.bio.base.algorithm import PCA >>> from bob.bio.base.algorithm import PCA
>>> biometric_algorithm = BioAlgorithmLegacy(PCA()) >>> biometric_algorithm = BioAlgorithmLegacy(PCA(subspace_dimension=0.99), base_dir="./", projector_file="Projector.hdf5")
""" """
......
...@@ -43,21 +43,24 @@ class VanillaBiometricsPipeline(object): ...@@ -43,21 +43,24 @@ class VanillaBiometricsPipeline(object):
Example Example
------- -------
>>> from bob.pipelines.transformers import Linearize
>>> from sklearn.pipeline import make_pipeline >>> from sklearn.pipeline import make_pipeline
>>> from bob.bio.base.pipelines.vanilla_biometrics.implemented import Distance >>> from bob.bio.base.pipelines.vanilla_biometrics import Distance, VanillaBiometricsPipeline
>>> transformer = make_pipeline(estimator_1, estimator_2) >>> estimator_1 = Linearize()
>>> transformer = make_pipeline(estimator_1)
>>> biometric_algoritm = Distance() >>> biometric_algoritm = Distance()
>>> pipeline = VanillaBiometrics(transformer, biometric_algoritm) >>> pipeline = VanillaBiometricsPipeline(transformer, biometric_algoritm)
>>> pipeline(samples_for_training_back_ground_model, samplesets_for_enroll, samplesets_for_scoring) >>> pipeline(samples_for_training_back_ground_model, samplesets_for_enroll, samplesets_for_scoring) # doctest: +SKIP
To run this pipeline using Dask, used the function :py:func:`dask_vanilla_biometrics`. To run this pipeline using Dask, used the function :py:func:`dask_vanilla_biometrics`.
Example Example
------- -------
>>> pipeline = VanillaBiometrics(transformer, biometric_algoritm) >>> from bob.bio.base.pipelines.vanilla_biometrics import dask_vanilla_biometrics
>>> pipeline = VanillaBiometricsPipeline(transformer, biometric_algoritm)
>>> pipeline = dask_vanilla_biometrics(pipeline) >>> pipeline = dask_vanilla_biometrics(pipeline)
>>> pipeline(samples_for_training_back_ground_model, samplesets_for_enroll, samplesets_for_scoring).compute() >>> pipeline(samples_for_training_back_ground_model, samplesets_for_enroll, samplesets_for_scoring).compute() # doctest: +SKIP
Parameters Parameters
......
...@@ -46,9 +46,9 @@ class BioAlgorithmCheckpointWrapper(BioAlgorithm): ...@@ -46,9 +46,9 @@ class BioAlgorithmCheckpointWrapper(BioAlgorithm):
Examples Examples
-------- --------
>>> from bob.bio.base.pipelines.vanilla_biometrics.biometric_algorithm import BioAlgCheckpointWrapper, Distance >>> from bob.bio.base.pipelines.vanilla_biometrics import BioAlgorithmCheckpointWrapper, Distance
>>> biometric_algorithm = BioAlgCheckpointWrapper(Distance(), base_dir="./") >>> biometric_algorithm = BioAlgorithmCheckpointWrapper(Distance(), base_dir="./")
>>> biometric_algorithm.enroll(sample) >>> biometric_algorithm.enroll(sample) # doctest: +SKIP
""" """
......
...@@ -31,11 +31,15 @@ class ZTNormPipeline(object): ...@@ -31,11 +31,15 @@ class ZTNormPipeline(object):
Example Example
------- -------
>>> transformer = make_pipeline([]) >>> from bob.pipelines.transformers import Linearize
>>> from sklearn.pipeline import make_pipeline
>>> from bob.bio.base.pipelines.vanilla_biometrics import Distance, VanillaBiometricsPipeline, ZTNormPipeline
>>> estimator_1 = Linearize()
>>> transformer = make_pipeline(estimator_1)
>>> biometric_algorithm = Distance() >>> biometric_algorithm = Distance()
>>> vanilla_biometrics_pipeline = VanillaBiometricsPipeline(transformer, biometric_algorithm) >>> vanilla_biometrics_pipeline = VanillaBiometricsPipeline(transformer, biometric_algorithm)
>>> zt_pipeline = ZTNormVanillaBiometricsPipeline(vanilla_biometrics_pipeline) >>> zt_pipeline = ZTNormPipeline(vanilla_biometrics_pipeline)
>>> zt_pipeline(...) >>> zt_pipeline(...) #doctest: +SKIP
Parameters Parameters
---------- ----------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment