Skip to content

Commit f44fc38

Browse files
committed
Remove TensorFlowProningHook's Python 3.12 support
1 parent 82493d3 commit f44fc38

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/workflows/checks-and-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ jobs:
218218
with:
219219
integration_name: 'tensorflow'
220220
deprecated: false
221+
python_matrix: "['3.8', '3.9', '3.10', '3.11']"
221222

222223
tfkeras:
223224
if: needs.changes.outputs.tfkeras == 'true'

optuna_integration/tensorflow/tensorflow.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import optuna
4+
from optuna._deprecated import deprecated_class
45

56
from optuna_integration._imports import try_import
67

@@ -15,6 +16,15 @@
1516
SessionRunHook = object # NOQA
1617

1718

19+
@deprecated_class(
20+
"4.0.0",
21+
"5.0.0",
22+
text=(
23+
"Use :class:`~optuna_integration.KerasPruningCallback`, "
24+
"since [TensorFlow recommends migrating from Estimator to Kras APIs]"
25+
"(https://www.tensorflow.org/guide/migrate/migrating_estimator)."
26+
),
27+
)
1828
class TensorFlowPruningHook(SessionRunHook):
1929
"""TensorFlow SessionRunHook to prune unpromising trials.
2030

0 commit comments

Comments
 (0)