Skip to content

Commit fb7b220

Browse files
committed
iter
1 parent 7a98062 commit fb7b220

File tree

3 files changed

+24
-22
lines changed

3 files changed

+24
-22
lines changed

imblearn/keras/tests/test_generator.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ def data():
2424
X, y = make_imbalance(
2525
iris.data, iris.target, sampling_strategy={0: 30, 1: 50, 2: 40}
2626
)
27-
y = LabelBinarizer().fit_transform(y)
27+
X = X.astype(np.float32)
28+
y = LabelBinarizer().fit_transform(y).astype(np.int32)
2829
return X, y
2930

3031

@@ -103,7 +104,7 @@ def test_balanced_batch_generator_function_no_return_indices(data):
103104
(None, None),
104105
(RandomOverSampler(), None),
105106
(NearMiss(), None),
106-
(None, np.random.uniform(size=120)),
107+
(None, np.random.uniform(size=120).astype(np.float32)),
107108
],
108109
)
109110
def test_balanced_batch_generator_function(data, sampler, sample_weight):
@@ -117,6 +118,7 @@ def test_balanced_batch_generator_function(data, sampler, sample_weight):
117118
batch_size=10,
118119
random_state=42,
119120
)
121+
print(next(training_generator))
120122
model.fit(
121123
training_generator,
122124
steps_per_epoch=steps_per_epoch,

pixi.lock

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ platforms = ["linux-64", "osx-arm64", "osx-64"]
137137

138138
[tool.pixi.feature.tensorflow.dependencies]
139139
tensorflow = ">=2.13.1,<2.18"
140-
keras = ">=3.0.5,<3.8"
140+
keras = ">=3.0.5,<3.9"
141141

142142
[tool.pixi.feature.min-dependencies.dependencies]
143143
numpy = "==1.24.3"

0 commit comments

Comments
 (0)