Skip to content

Commit eccee6e

Browse files
authored
Merge branch 'topology-tool-kit:dev' into critical-point-tracking
2 parents 9ac6548 + 7bea8bd commit eccee6e

File tree

7 files changed

+48
-2532
lines changed

7 files changed

+48
-2532
lines changed

.github/workflows/package.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,8 @@ jobs:
345345
rm python/harmonicSkeleton.py
346346
rm python/topologicalOptimization_torus.py
347347
fi
348+
# remove sklearn examples -- buggy on MacOS since sklearn-1.7
349+
rm python/1manifoldLearning.py python/clusteringKelvinHelmholtzInstabilities.py python/karhunenLoveDigits64Dimensions.py python/mergeTreeClustering.py python/persistentGenerators_householdAnalysis.py python/persistentGenerators_periodicPicture.py
348350
pvpython -u python/run.py
349351
env:
350352
PV_PLUGIN_PATH: /usr/local/bin/plugins/TopologyToolKit
@@ -686,7 +688,7 @@ jobs:
686688
asset_name: ttk-$tag.exe
687689

688690
- name: Delete package artifacts
689-
uses: geekyeggo/delete-artifact@v2
691+
uses: geekyeggo/delete-artifact@v5
690692
with:
691693
name: |
692694
ttk*

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ jobs:
258258
diff python/hashes/${{ matrix.os }}.json python/res.json
259259
260260
- name: Delete TTK package artifact
261-
uses: geekyeggo/delete-artifact@v2
261+
uses: geekyeggo/delete-artifact@v5
262262
# delete package only once
263263
if: matrix.testSet == 'screenshotTests'
264264
with:
@@ -398,6 +398,8 @@ jobs:
398398
rm python/mpiExample.py
399399
# remove examples which fill up the memory
400400
rm python/topologicalOptimization_darkSky.py
401+
# remove sklearn examples -- buggy on MacOS since sklearn-1.7
402+
rm python/1manifoldLearning.py python/clusteringKelvinHelmholtzInstabilities.py python/karhunenLoveDigits64Dimensions.py python/mergeTreeClustering.py python/persistentGenerators_householdAnalysis.py python/persistentGenerators_periodicPicture.py
401403
pvpython -u python/run.py
402404
env:
403405
PV_PLUGIN_PATH: /usr/local/bin/plugins/TopologyToolKit

core/base/dimensionReduction/dimensionReduction.py

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ def doIt(X, method, ncomponents, nneighbors, njobs, rstate, params):
1515
# at least one module is not installed, aborting...
1616
return 0
1717

18+
import sklearn
1819
from sklearn import manifold
1920
from sklearn import decomposition
2021
import numpy as np
2122
from sys import platform
23+
from packaging import version
2224

23-
if platform == "darwin":
24-
import sklearn
25-
26-
sklearn.utils.parallel_backend("threading")
25+
#if platform == "darwin":
26+
# sklearn.utils.parallel_backend("threading")
2727

2828
if rstate > 0:
2929
np.random.seed(0)
@@ -81,20 +81,36 @@ def doIt(X, method, ncomponents, nneighbors, njobs, rstate, params):
8181
Y = mds.fit_transform(X)
8282
elif method == 3:
8383
tsneParams = params[3]
84-
tsne = manifold.TSNE(
85-
n_components=ncomponents,
86-
perplexity=tsneParams[0],
87-
early_exaggeration=tsneParams[1],
88-
learning_rate=tsneParams[2],
89-
n_iter=tsneParams[3],
90-
n_iter_without_progress=tsneParams[4],
91-
min_grad_norm=tsneParams[5],
92-
metric=tsneParams[6],
93-
init=tsneParams[7],
94-
verbose=tsneParams[8],
95-
method=tsneParams[9],
96-
angle=tsneParams[10],
97-
)
84+
if version.parse(sklearn.__version__) >= version.parse("1.7.0"):
85+
tsne = manifold.TSNE(
86+
n_components=ncomponents,
87+
perplexity=tsneParams[0],
88+
early_exaggeration=tsneParams[1],
89+
learning_rate=tsneParams[2],
90+
max_iter=tsneParams[3],
91+
n_iter_without_progress=tsneParams[4],
92+
min_grad_norm=tsneParams[5],
93+
metric=tsneParams[6],
94+
init=tsneParams[7],
95+
verbose=tsneParams[8],
96+
method=tsneParams[9],
97+
angle=tsneParams[10],
98+
)
99+
else:
100+
tsne = manifold.TSNE(
101+
n_components=ncomponents,
102+
perplexity=tsneParams[0],
103+
early_exaggeration=tsneParams[1],
104+
learning_rate=tsneParams[2],
105+
n_iter=tsneParams[3],
106+
n_iter_without_progress=tsneParams[4],
107+
min_grad_norm=tsneParams[5],
108+
metric=tsneParams[6],
109+
init=tsneParams[7],
110+
verbose=tsneParams[8],
111+
method=tsneParams[9],
112+
angle=tsneParams[10],
113+
)
98114
Y = tsne.fit_transform(X)
99115
elif method == 4:
100116
isoParams = params[4]

core/base/ripsPersistenceDiagram/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,9 @@ target_link_libraries(ripsPersistenceDiagram PUBLIC Boost::boost)
2828

2929
if(TTK_ENABLE_CGAL)
3030
target_compile_definitions(ripsPersistenceDiagram PUBLIC TTK_ENABLE_CGAL)
31-
target_link_libraries(ripsPersistenceDiagram PRIVATE ${CGAL_LIBRARIES})
32-
endif()
31+
if(CGAL_VERSION VERSION_LESS "6.0")
32+
target_link_libraries(ripsPersistenceDiagram PRIVATE ${CGAL_LIBRARIES})
33+
else()
34+
target_link_libraries(ripsPersistenceDiagram PUBLIC CGAL::CGAL)
35+
endif()
36+
endif()

0 commit comments

Comments
 (0)