Skip to content

Commit 1d310af

Browse files
committed
Upgrading sensenet and fixing issues for Python 3.12
1 parent f45f5a4 commit 1d310af

File tree

10 files changed

+18
-22
lines changed

10 files changed

+18
-22
lines changed

.github/workflows/tests_01.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python: [3.11]
15+
python: [3.12]
1616
env:
1717
BIGML_USERNAME: ${{ secrets.BIGML_USERNAME }}
1818
BIGML_API_KEY: ${{ secrets.BIGML_API_KEY }}

.github/workflows/tests_05.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python: [3.11]
15+
python: [3.12]
1616
env:
1717
BIGML_USERNAME: ${{ secrets.BIGML_USERNAME }}
1818
BIGML_API_KEY: ${{ secrets.BIGML_API_KEY }}

.github/workflows/tests_22.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python: [3.11]
15+
python: [3.12]
1616
env:
1717
BIGML_USERNAME: ${{ secrets.BIGML_USERNAME }}
1818
BIGML_API_KEY: ${{ secrets.BIGML_API_KEY }}

.github/workflows/tests_23.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python: [3.11]
15+
python: [3.12]
1616
env:
1717
BIGML_USERNAME: ${{ secrets.BIGML_USERNAME }}
1818
BIGML_API_KEY: ${{ secrets.BIGML_API_KEY }}

.github/workflows/tests_36.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python: [3.11]
15+
python: [3.12]
1616
env:
1717
BIGML_USERNAME: ${{ secrets.BIGML_USERNAME }}
1818
BIGML_API_KEY: ${{ secrets.BIGML_API_KEY }}

HISTORY.rst

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ History
77
------------------
88

99
- Fixing the get_leaves function for local decision trees.
10+
- Fixing setup issues in Python3.12
1011
- Changing documentation templates.
1112

1213
9.8.0.dev1 (2024-02-28)

bigml/dataset.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"""
2121
import os
2222
import logging
23-
import warnings
2423
import subprocess
2524

2625
from bigml.fields import Fields, sorted_headers, get_new_fields
@@ -40,12 +39,13 @@
4039

4140
#pylint: disable=locally-disabled,bare-except,ungrouped-imports
4241
try:
43-
# avoiding tensorflow info logging
44-
warnings.filterwarnings("ignore", category=DeprecationWarning)
45-
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
42+
# bigml-sensenet should be installed for image processing
43+
logging.disable(logging.WARNING)
44+
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
4645
import tensorflow as tf
47-
tf.get_logger().setLevel('ERROR')
4846
tf.autograph.set_verbosity(0)
47+
logging.getLogger("tensorflow").setLevel(logging.ERROR)
48+
import sensenet
4949
from bigml.images.featurizers import ImageFeaturizer as Featurizer
5050
except:
5151
pass

bigml/deepnet.py

+4-9
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,15 @@
6262
import bigml.laminar.preprocess_np as pp
6363

6464
try:
65-
# avoiding tensorflow info logging
66-
warnings.filterwarnings("ignore", category=DeprecationWarning)
67-
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
65+
logging.disable(logging.WARNING)
66+
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
67+
logging.getLogger("tensorflow").setLevel(logging.ERROR)
6868
import tensorflow as tf
69-
tf.get_logger().setLevel('ERROR')
7069
tf.autograph.set_verbosity(0)
71-
LAMINAR_VERSION = False
72-
except Exception:
73-
LAMINAR_VERSION = True
74-
75-
try:
7670
from sensenet.models.wrappers import create_model
7771
from bigml.images.utils import to_relative_coordinates
7872
from bigml.constants import IOU_REMOTE_SETTINGS
73+
LAMINAR_VERSION = False
7974
except Exception:
8075
LAMINAR_VERSION = True
8176

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
22
requires=[
3-
"setuptools"
3+
"setuptools==69.0.0"
44
]
55

66
[tool.black]

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
open(version_py_path).read()).group(1)
3131

3232
TOPIC_MODELING_DEPENDENCIES = ["cython", "pystemmer==2.2.0.1"]
33-
IMAGES_DEPENDENCIES = ["bigml-sensenet==0.7.4"]
33+
IMAGES_DEPENDENCIES = ["bigml-sensenet==0.7.5"]
3434

3535
# Concatenate files into the long description
3636
file_contents = []
@@ -50,7 +50,7 @@
5050
download_url="https://github.com/bigmlcom/python",
5151
license="http://www.apache.org/licenses/LICENSE-2.0",
5252
setup_requires = ['pytest'],
53-
install_requires = ["unidecode", "bigml-chronos>=0.4.3", "requests",
53+
install_requires = ["setuptools==69.0.0", "unidecode", "bigml-chronos>=0.4.3", "requests",
5454
"requests-toolbelt", "msgpack", "numpy>=1.22", "scipy",
5555
"javascript"],
5656
extras_require={"images": IMAGES_DEPENDENCIES,

0 commit comments

Comments
 (0)