Skip to content

Commit 485752e

Browse files
authored
[MRG] Fix Github action version v2 -> v4 and fix test with skorch update (#292)
* add contributor guide * change v2 to v4 * try v3 * test fix tests * fix tests * fix tests?
1 parent ec2f00c commit 485752e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.github/workflows/testing.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ jobs:
2626

2727
# Install skada
2828
- name: Checking Out Repository
29-
uses: actions/checkout@v2
29+
uses: actions/checkout@v4
3030
# Cache 'skada' datasets
3131
- name: Create/Restore Skada Data Cache
3232
id: cache-skada_datasets
33-
uses: actions/cache@v2
33+
uses: actions/cache@v4
3434
with:
3535
path: ~/skada_datasets
3636
key: ${{ runner.os }}-v3
@@ -58,11 +58,11 @@ jobs:
5858

5959
# Install skada
6060
- name: Checking Out Repository
61-
uses: actions/checkout@v2
61+
uses: actions/checkout@v4
6262
# Cache 'skada' datasets
6363
- name: Create/Restore Skada Data Cache
6464
id: cache-skada_datasets
65-
uses: actions/cache@v2
65+
uses: actions/cache@v4
6666
with:
6767
path: ~/skada_datasets
6868
key: ${{ runner.os }}-v3
@@ -100,11 +100,11 @@ jobs:
100100

101101
# Install skada
102102
- name: Checking Out Repository
103-
uses: actions/checkout@v2
103+
uses: actions/checkout@v4
104104
# Cache 'skada' datasets
105105
- name: Create/Restore Skada Data Cache
106106
id: cache-skada_datasets
107-
uses: actions/cache@v2
107+
uses: actions/cache@v4
108108
with:
109109
path: ~/skada_datasets
110110
key: ${{ runner.os }}-v3

skada/metrics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010
from copy import deepcopy
1111

1212
import numpy as np
13-
from sklearn.base import BaseEstimator, clone
13+
from sklearn.base import clone
1414
from sklearn.linear_model import LogisticRegression
1515
from sklearn.metrics import balanced_accuracy_score, check_scoring
1616
from sklearn.model_selection import train_test_split
1717
from sklearn.neighbors import KernelDensity
18+
from sklearn.pipeline import Pipeline
1819
from sklearn.preprocessing import LabelEncoder, Normalizer
1920
from sklearn.utils import check_random_state
2021
from sklearn.utils.extmath import softmax
@@ -395,8 +396,7 @@ def _score(self, estimator, X, y, sample_domain=None, **kwargs):
395396
)
396397

397398
has_transform_method = False
398-
399-
if not isinstance(estimator, BaseEstimator):
399+
if not isinstance(estimator, Pipeline):
400400
# The estimator is a deep model
401401
if estimator.module_.layer_name is None:
402402
raise ValueError("The layer_name of the estimator is not set.")

0 commit comments

Comments
 (0)