File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 1212"""
1313
1414import shutil
15+ import sys
1516import tempfile
1617import urllib
1718
@@ -133,4 +134,11 @@ def main():
133134
134135
135136if __name__ == "__main__" :
137+ if sys .version_info >= (3 , 12 ):
138+ raise RuntimeError (
139+ "Use `optuna_integration.KerasPruningCallback` instead, "
140+ "because TensorFlow recommends migrating from Estimator to Keras APIs. "
141+ "For more details, please check the TensorFlow migration guide: "
142+ "https://www.tensorflow.org/guide/migrate/migrating_estimator"
143+ )
136144 main ()
Original file line number Diff line number Diff line change 1111import shutil
1212import tempfile
1313import urllib
14+ import sys
1415
1516import optuna
1617from packaging import version
@@ -123,4 +124,10 @@ def main():
123124
124125
125126if __name__ == "__main__" :
127+ if sys .version_info >= (3 , 12 ):
128+ raise RuntimeError (
129+ "Use Keras APIs instead of Estimator API in TensorFlow. "
130+ "For more details, please check the TensorFlow migration guide: "
131+ "https://www.tensorflow.org/guide/migrate/migrating_estimator"
132+ )
126133 main ()
You can’t perform that action at this time.
0 commit comments