Skip to content

Commit

Permalink
Merge pull request #288 from kAIto47802/support-python3.12
Browse files Browse the repository at this point in the history
Add checking for python3.12
  • Loading branch information
y0z authored Nov 1, 2024
2 parents d4ed01d + 6ccb8d4 commit 0c6999a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tensorflow/tensorflow_estimator_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"""

import shutil
import sys
import tempfile
import urllib

Expand Down Expand Up @@ -133,4 +134,11 @@ def main():


if __name__ == "__main__":
if sys.version_info >= (3, 12):
raise RuntimeError(
"Use `optuna_integration.KerasPruningCallback` instead, "
"because TensorFlow recommends migrating from Estimator to Keras APIs. "
"For more details, please check the TensorFlow migration guide: "
"https://www.tensorflow.org/guide/migrate/migrating_estimator"
)
main()
7 changes: 7 additions & 0 deletions tensorflow/tensorflow_estimator_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"""

import shutil
import sys
import tempfile
import urllib

Expand Down Expand Up @@ -123,4 +124,10 @@ def main():


if __name__ == "__main__":
if sys.version_info >= (3, 12):
raise RuntimeError(
"Use Keras APIs instead of Estimator API in TensorFlow. "
"For more details, please check the TensorFlow migration guide: "
"https://www.tensorflow.org/guide/migrate/migrating_estimator"
)
main()

0 comments on commit 0c6999a

Please sign in to comment.