Skip to content

Commit 2ac7f0d

Browse files
committed
update to 0.5.3
1 parent 34fa2a2 commit 2ac7f0d

13 files changed

+32
-27
lines changed

_cmake/constants.cmake

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,19 @@ configure_file(
150150
#
151151

152152
# AVX instructions
153+
# Check with bash _cmake/intrin.sh <avx function name>
153154
if(MSVC)
154155
# disable warning for #pragma unroll
155-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX")
156+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX2")
156157
add_compile_options(/wd4068)
157158
else()
158-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx")
159+
# Other possible flags
160+
# "-mavx512f", "-mavx512bw", "-mavx512dq", "-mavx512vl", "-mlzcnt"
161+
# See https://gcc.gnu.org/onlinedocs/gcc/x86-Built-in-Functions.html
162+
if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
163+
# -march=native selects the best option for AVX instructions
164+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native -mf16c")
165+
endif()
159166
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
160167
endif()
161168

@@ -176,6 +183,7 @@ message(STATUS "CMAKE_C_FLAGS_INIT=${CMAKE_C_FLAGS_INIT}")
176183
message(STATUS "CMAKE_C_FLAGS=${CMAKE_C_FLAGS}")
177184
message(STATUS "CMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}")
178185
message(STATUS "CMAKE_C_COMPILER_VERSION=${CMAKE_C_COMPILER_VERSION}")
186+
message(STATUS "CMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}")
179187
message(STATUS "CMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}")
180188
message(STATUS "CMAKE_CXX_FLAGS_INIT=${CMAKE_CXX_FLAGS_INIT}")
181189
message(STATUS "CMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}")

_doc/examples/plot_decision_tree_logreg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def draw_border(
259259
cmap = plt.cm.tab20
260260
Z = Z.reshape(xx.shape)
261261
if ax is None:
262-
fig, ax = plt.subplots(1, 1, figsize=figsize or (4, 3))
262+
_fig, ax = plt.subplots(1, 1, figsize=figsize or (4, 3))
263263
ax.pcolormesh(xx, yy, Z, cmap=cmap)
264264

265265
# Plot also the training points

_doc/examples/plot_leave_neighbors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def draw_border(
130130
cmap = plt.cm.tab20
131131
Z = Z.reshape(xx.shape)
132132
if ax is None:
133-
fig, ax = plt.subplots(1, 1, figsize=figsize or (4, 3))
133+
_fig, ax = plt.subplots(1, 1, figsize=figsize or (4, 3))
134134
ax.pcolormesh(xx, yy, Z, cmap=cmap)
135135

136136
# Plot also the training points

_doc/examples/plot_logistic_regression_clustering.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def draw_border(
8484
cmap = plt.cm.tab20
8585
Z = Z.reshape(xx.shape)
8686
if ax is None:
87-
fig, ax = plt.subplots(1, 1, figsize=figsize or (4, 3))
87+
_fig, ax = plt.subplots(1, 1, figsize=figsize or (4, 3))
8888
ax.pcolormesh(xx, yy, Z, cmap=cmap)
8989

9090
# Plot also the training points

_doc/examples/plot_piecewise_classification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def graph(X, Y, model):
4343
Z = Z.reshape(xx.shape)
4444

4545
# Put the result into a color plot
46-
fig, ax = plt.subplots(1, 1, figsize=(4, 3))
46+
_fig, ax = plt.subplots(1, 1, figsize=(4, 3))
4747
ax.pcolormesh(xx, yy, Z, cmap=plt.cm.Paired)
4848

4949
# Plot also the training points

_doc/examples/plot_predictable_tsne.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def plot_embedding(Xp, y, imgs, title=None, figsize=(12, 4)):
6060
x_min, x_max = numpy.min(Xp, 0), numpy.max(Xp, 0)
6161
X = (Xp - x_min) / (x_max - x_min)
6262

63-
fig, ax = plt.subplots(1, 2, figsize=figsize)
63+
_fig, ax = plt.subplots(1, 2, figsize=figsize)
6464
for i in range(X.shape[0]):
6565
ax[0].text(
6666
X[i, 0],

_doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,5 @@ Source are available at `sdpython/mlinsights <https://github.com/sdpython/mlinsi
9898
Older versions
9999
++++++++++++++
100100

101-
* `0.5.2 <../v0.5.1/index.html>`_
102-
* `0.5.1 <../v0.5.1/index.html>`_
101+
* `0.5.3 <../v0.5.3/index.html>`_
102+
* `0.5.2 <../v0.5.2/index.html>`_

_unittests/ut_xrun_doc/test_documentation_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def run_test(self, fold: str, name: str, verbose=0) -> int:
4141
cmds = [sys.executable, "-u", os.path.join(fold, name)]
4242
p = subprocess.Popen(cmds, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
4343
res = p.communicate()
44-
out, err = res
44+
_out, err = res
4545
st = err.decode("ascii", errors="ignore")
4646
if st and "Traceback" in st:
4747
if "No module named 'onnxruntime'" in st:

mlinsights/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.5.2"
1+
__version__ = "0.5.3"
22
__author__ = "Xavier Dupré"
33
__github__ = "https://github.com/sdpython/mlinsights"
44
__url__ = "https://sdpython.github.io/doc/dev/mlinsights/"

pyproject.toml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ license = {file = "LICENSE.txt"}
2626
name = "mlinsights"
2727
readme = "README.rst"
2828
requires-python = ">=3.10"
29-
version = "0.5.2"
29+
version = "0.5.3"
3030

3131
[project.urls]
3232
homepage = "https://sdpython.github.io/doc/mlinsights/dev/"
@@ -52,7 +52,7 @@ dev = [
5252
"onnxruntime",
5353
"pandas",
5454
"psutil",
55-
"pybind11>=2.12.0",
55+
"pybind11>=3",
5656
"pytest",
5757
"pytest-cov",
5858
"ruff",
@@ -73,7 +73,7 @@ requires = [
7373
"Cython>=3.0.10",
7474
"cmake",
7575
"numpy>=2.0",
76-
"pybind11>=2.12.0",
76+
"pybind11>=3",
7777
"scikit-learn>=1.3.0",
7878
"scipy",
7979
"setuptools",
@@ -104,17 +104,16 @@ namespaces = false
104104

105105
[tool.cibuildwheel]
106106
build = "*"
107-
manylinux-x86_64-image = "manylinux2014"
107+
manylinux-x86_64-image = "manylinux_2_28" # "manylinux2014"
108108

109109
[tool.cibuildwheel.linux]
110110
archs = ["x86_64"]
111111
build = "cp*"
112-
skip = "cp36-* cp37-* cp38-* cp39-* cp310-* cp314-* cp315-* pypy* *musllinux*"
113-
manylinux-x86_64-image = "manylinux2014"
112+
skip = "cp36-* cp37-* cp38-* cp39-* cp314-* cp315-* pypy* *musllinux*"
113+
manylinux-x86_64-image = "manylinux_2_28" # "manylinux2014"
114114
before-build = "pip install auditwheel-symbols abi3audit"
115115
build-verbosity = 1
116-
repair-wheel-command = "auditwheel-symbols --manylinux 2014 {wheel} ; abi3audit {wheel} ; auditwheel repair -w {dest_dir} {wheel} || exit 0"
117-
# repair-wheel-command = "auditwheel-symbols --manylinux 2014 {wheel} || exit 0"
116+
repair-wheel-command = "auditwheel-symbols --manylinux 2_28 {wheel} ; abi3audit {wheel} ; auditwheel repair -w {dest_dir} {wheel} || exit 0"
118117

119118
[tool.cibuildwheel.macos]
120119
archs = "arm64" # or "universal2" for a single universal wheel
@@ -127,13 +126,13 @@ environment = """
127126
DYLD_LIBRARY_PATH='$(brew --prefix libomp)/lib:$DYLD_LIBRARY_PATH'
128127
"""
129128
build = "cp*"
130-
skip = "cp36-* cp37-* cp38-* cp39-* cp310-* cp314-* cp315-* pypy* pp*"
129+
skip = "cp36-* cp37-* cp38-* cp39-* cp314-* cp315-* pypy* pp*"
131130
before-build = "brew install libomp llvm&&echo 'export PATH=\"/opt/homebrew/opt/llvm/bin:$PATH\"' >> /Users/runner/.bash_profile"
132131

133132
[tool.cibuildwheel.windows]
134133
archs = ["AMD64"]
135134
build = "cp*"
136-
skip = "cp36-* cp37-* cp38-* cp39-* cp310-* cp314-* cp315-* pypy*"
135+
skip = "cp36-* cp37-* cp38-* cp39-* cp314-* cp315-* pypy*"
137136

138137
[tool.cython-lint]
139138
max-line-length = 88

0 commit comments

Comments
 (0)