Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.pipelines
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.pipelines
Commits
83448a4a
Commit
83448a4a
authored
Dec 09, 2020
by
Amir MOHAMMADI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[xarray] fix tests
parent
29a970c8
Pipeline
#46439
passed with stage
in 8 minutes and 2 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
bob/pipelines/tests/test_xarray.py
bob/pipelines/tests/test_xarray.py
+3
-2
bob/pipelines/xarray.py
bob/pipelines/xarray.py
+11
-5
No files found.
bob/pipelines/tests/test_xarray.py
View file @
83448a4a
...
...
@@ -16,6 +16,7 @@ from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from
sklearn.linear_model
import
SGDClassifier
from
sklearn.preprocessing
import
StandardScaler
import
bob.io.base
import
bob.pipelines
as
mario
...
...
@@ -178,8 +179,8 @@ def test_dataset_pipeline_with_checkpoints():
)
):
path
=
os
.
path
.
join
(
pca_features
,
path
)
assert
path
.
endswith
(
f"
{
i
}
.
npy
"
),
path
np
.
testing
.
assert_array_equal
(
np
.
load
(
path
).
shape
,
(
3
,))
assert
path
.
endswith
(
f"
{
i
}
.
hdf5
"
),
path
np
.
testing
.
assert_array_equal
(
bob
.
io
.
base
.
load
(
path
).
shape
,
(
3
,))
# now this time it should load features
# delete one of the features
...
...
bob/pipelines/xarray.py
View file @
83448a4a
...
...
@@ -154,7 +154,7 @@ class Block(_ReprMixin):
estimator_name
=
None
,
model_path
=
None
,
features_dir
=
None
,
extension
=
".
npy
"
,
extension
=
".
hdf5
"
,
save_func
=
None
,
load_func
=
None
,
dataset_map
=
None
,
...
...
@@ -179,12 +179,18 @@ class Block(_ReprMixin):
self
.
model_path
=
model_path
self
.
features_dir
=
features_dir
self
.
extension
=
extension
self
.
save_func
=
(
save_func
or
estimator
.
_get_tags
().
get
(
"bob_features_save_fn"
)
or
save
estimator_save_fn
=
(
None
if
estimator
is
None
else
estimator
.
_get_tags
().
get
(
"bob_features_save_fn"
)
)
self
.
load_func
=
(
load_func
or
estimator
.
_get_tags
().
get
(
"bob_features_load_fn"
)
or
load
estimator_load_fn
=
(
None
if
estimator
is
None
else
estimator
.
_get_tags
().
get
(
"bob_features_load_fn"
)
)
self
.
save_func
=
save_func
or
estimator_save_fn
or
save
self
.
load_func
=
load_func
or
estimator_load_fn
or
load
self
.
dataset_map
=
dataset_map
self
.
input_dask_array
=
input_dask_array
self
.
fit_kwargs
=
fit_kwargs
or
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment