diff --git a/.github/workflows/tests_01.yml b/.github/workflows/tests_01.yml index 9f12863f..3951257b 100644 --- a/.github/workflows/tests_01.yml +++ b/.github/workflows/tests_01.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [3.11] + python: [3.12] env: BIGML_USERNAME: ${{ secrets.BIGML_USERNAME }} BIGML_API_KEY: ${{ secrets.BIGML_API_KEY }} diff --git a/.github/workflows/tests_05.yml b/.github/workflows/tests_05.yml index 8cc673ec..ed1cac5f 100644 --- a/.github/workflows/tests_05.yml +++ b/.github/workflows/tests_05.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [3.11] + python: [3.12] env: BIGML_USERNAME: ${{ secrets.BIGML_USERNAME }} BIGML_API_KEY: ${{ secrets.BIGML_API_KEY }} diff --git a/.github/workflows/tests_22.yml b/.github/workflows/tests_22.yml index c75adca1..46784de2 100644 --- a/.github/workflows/tests_22.yml +++ b/.github/workflows/tests_22.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [3.11] + python: [3.12] env: BIGML_USERNAME: ${{ secrets.BIGML_USERNAME }} BIGML_API_KEY: ${{ secrets.BIGML_API_KEY }} diff --git a/.github/workflows/tests_23.yml b/.github/workflows/tests_23.yml index 042d57cc..892a73d6 100644 --- a/.github/workflows/tests_23.yml +++ b/.github/workflows/tests_23.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [3.11] + python: [3.12] env: BIGML_USERNAME: ${{ secrets.BIGML_USERNAME }} BIGML_API_KEY: ${{ secrets.BIGML_API_KEY }} diff --git a/.github/workflows/tests_36.yml b/.github/workflows/tests_36.yml index 7b78c0a5..a766fa97 100644 --- a/.github/workflows/tests_36.yml +++ b/.github/workflows/tests_36.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [3.11] + python: [3.12] env: BIGML_USERNAME: ${{ secrets.BIGML_USERNAME }} BIGML_API_KEY: ${{ secrets.BIGML_API_KEY }} diff --git a/HISTORY.rst b/HISTORY.rst index 64bbc488..ed2e7598 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,7 @@ History ------------------ - Fixing the get_leaves function for local decision trees. +- Fixing setup issues in Python3.12 - Changing documentation templates. 9.8.0.dev1 (2024-02-28) diff --git a/bigml/dataset.py b/bigml/dataset.py index 280c285d..6b45f5e4 100644 --- a/bigml/dataset.py +++ b/bigml/dataset.py @@ -20,7 +20,6 @@ """ import os import logging -import warnings import subprocess from bigml.fields import Fields, sorted_headers, get_new_fields @@ -40,12 +39,13 @@ #pylint: disable=locally-disabled,bare-except,ungrouped-imports try: - # avoiding tensorflow info logging - warnings.filterwarnings("ignore", category=DeprecationWarning) - os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' + # bigml-sensenet should be installed for image processing + logging.disable(logging.WARNING) + os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tensorflow as tf - tf.get_logger().setLevel('ERROR') tf.autograph.set_verbosity(0) + logging.getLogger("tensorflow").setLevel(logging.ERROR) + import sensenet from bigml.images.featurizers import ImageFeaturizer as Featurizer except: pass diff --git a/bigml/deepnet.py b/bigml/deepnet.py index 75eed911..087f1653 100644 --- a/bigml/deepnet.py +++ b/bigml/deepnet.py @@ -62,20 +62,15 @@ import bigml.laminar.preprocess_np as pp try: - # avoiding tensorflow info logging - warnings.filterwarnings("ignore", category=DeprecationWarning) - os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' + logging.disable(logging.WARNING) + os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' + logging.getLogger("tensorflow").setLevel(logging.ERROR) import tensorflow as tf - tf.get_logger().setLevel('ERROR') tf.autograph.set_verbosity(0) - LAMINAR_VERSION = False -except Exception: - LAMINAR_VERSION = True - -try: from sensenet.models.wrappers import create_model from bigml.images.utils import to_relative_coordinates from bigml.constants import IOU_REMOTE_SETTINGS + LAMINAR_VERSION = False except Exception: LAMINAR_VERSION = True diff --git a/pyproject.toml b/pyproject.toml index 70a3fb8e..1de495d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires=[ - "setuptools" + "setuptools==69.0.0" ] [tool.black] diff --git a/setup.py b/setup.py index d24d7879..2bcdd013 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ open(version_py_path).read()).group(1) TOPIC_MODELING_DEPENDENCIES = ["cython", "pystemmer==2.2.0.1"] -IMAGES_DEPENDENCIES = ["bigml-sensenet==0.7.4"] +IMAGES_DEPENDENCIES = ["bigml-sensenet==0.7.5"] # Concatenate files into the long description file_contents = [] @@ -50,7 +50,7 @@ download_url="https://github.com/bigmlcom/python", license="http://www.apache.org/licenses/LICENSE-2.0", setup_requires = ['pytest'], - install_requires = ["unidecode", "bigml-chronos>=0.4.3", "requests", + install_requires = ["setuptools==69.0.0", "unidecode", "bigml-chronos>=0.4.3", "requests", "requests-toolbelt", "msgpack", "numpy>=1.22", "scipy", "javascript"], extras_require={"images": IMAGES_DEPENDENCIES,