Skip to content

Commit feca5f1

Browse files
Removing the Keras sub-module from moabb (#692)
* bye keras models * bye keras models * no more keras models * removing the docker and poetry comments * updating the instruction list * updating poetry part * removing keras * removing keras * removing util deep learning from moabb * updating the tests * removing scikeras * removing scikeras * removing more keras * updating import * Updating the whats_new file * bye m2r2 * updating the docs dep * Updating the python version * - to _ * Apply suggestion from the review. * [pre-commit.ci] auto fixes from pre-commit.com hooks * updating the docstring * updating the docs yml file * update to make the review easy * updating config * fixing merging issue * renaming * update whats new file * Apply suggestions from code review Signed-off-by: Bru <b.aristimunha@gmail.com> --------- Signed-off-by: Bru <a.bruno@aluno.ufabc.edu.br> Signed-off-by: Bru <b.aristimunha@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 2e61fc8 commit feca5f1

28 files changed

+58
-2019
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ _Note 2 (deep learning):_\
7878
In case you want to install the optional deep learning dependencies (i.e. `pip install .[deeplearning]`),
7979

8080

81-
### Tools used
82-
8381
### Tools used
8482

8583
MOABB uses [`pre-commit`](https://pre-commit.com/). It automatically runs variety of Code Quality

docs/source/pipelines.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
=========
2+
Pipelines
3+
=========
4+
5+
.. automodule:: moabb.pipelines
6+
7+
.. currentmodule:: moabb.pipelines
8+
9+
---------
10+
Pipelines
11+
---------
12+
13+
.. autosummary::
14+
:toctree: generated/
15+
:template: class.rst
16+
17+
features.LogVariance
18+
features.FM
19+
features.ExtendedSSVEPSignal
20+
features.AugmentedDataset
21+
features.StandardScaler_Epoch
22+
csp.TRCSP
23+
classification.SSVEP_CCA
24+
classification.SSVEP_TRCA
25+
classification.SSVEP_MsetCCA
26+
27+
28+
------------
29+
Base & Utils
30+
------------
31+
32+
.. autosummary::
33+
:toctree: generated/
34+
:template: function.rst
35+
36+
utils.create_pipeline_from_config
37+
utils.FilterBank

docs/source/whats_new.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Bugs
2828

2929
API changes
3030
~~~~~~~~~~~
31+
- Removing the deep learning module from inside moabb in favour of braindecode integration (:gh:`692` by `Bruno Aristimunha`_ )
3132

3233

3334
Version - 1.2.0 (Stable - PyPi)
@@ -66,6 +67,7 @@ API changes
6667
- Removing the braindecode module from inside moabb (:gh:`666` by `Bruno Aristimunha`_ )
6768

6869

70+
6971
Version - 1.1.1
7072
----------------
7173

examples/advanced_examples/pipelines_save/keras_deepconvnet.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
==============================================
3-
Load Model (Scikit, Keras) with MOABB
3+
Load Model (Scikit) with MOABB
44
==============================================
55
66
This example shows how to use load the pretrained pipeline in MOABB.
@@ -12,12 +12,7 @@
1212

1313
from pickle import load
1414

15-
import keras
16-
from scikeras.wrappers import KerasClassifier
17-
from sklearn.pipeline import Pipeline
18-
1915
from moabb import set_log_level
20-
from moabb.pipelines.features import StandardScaler_Epoch
2116
from moabb.utils import setup_seed
2217

2318

@@ -26,9 +21,7 @@
2621
###############################################################################
2722
# In this example, we will use the results computed by the following examples
2823
#
29-
# - plot_benchmark_
30-
# - plot_benchmark_braindecode_
31-
# - plot_benchmark_DL_
24+
# - plot_benchmark
3225
# ---------------------
3326

3427
# Set up reproducibility of Tensorflow and PyTorch
@@ -38,26 +31,7 @@
3831
# Loading the Scikit-learn pipelines
3932

4033
with open(
41-
"./results/Models_WithinSession/Zhou2016/1/0/CSP + SVM/fitted_model_best.pkl",
34+
"../how_to_benchmark/results/Models_WithinSession/Zhou2016/1/0/csp+svm/fitted_model_best.pkl",
4235
"rb",
4336
) as pickle_file:
4437
CSP_SVM_Trained = load(pickle_file)
45-
46-
###############################################################################
47-
# Loading the Keras model
48-
# We load the single Keras model, if we want we can set in the exact same pipeline.
49-
50-
model_Keras = keras.models.load_model(
51-
"../how_to_benchmark/results/Models_WithinSession/BNCI2014-001/1/1E/Keras_DeepConvNet/kerasdeepconvnet_fitted_model_best.h5"
52-
)
53-
# Now we need to instantiate a new SciKeras object since we only saved the Keras model
54-
Keras_DeepConvNet_Trained = KerasClassifier(model_Keras)
55-
# Create the pipelines
56-
57-
58-
pipes_keras = Pipeline(
59-
[
60-
("StandardScaler_Epoch", StandardScaler_Epoch),
61-
("Keras_DeepConvNet_Trained", Keras_DeepConvNet_Trained),
62-
]
63-
)

examples/how_to_benchmark/noplot_benchmark_dl.py

Lines changed: 0 additions & 124 deletions
This file was deleted.

examples/how_to_benchmark/pipelines_codecarbon/keras_eegnet_8_2.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

examples/how_to_benchmark/pipelines_dl/keras_deepconvnet.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)