Skip to content

Commit 33c95a6

Browse files
Add metrics testing (#87)
* add configs * add report generator metrics config * add knn_regr * add ci testing for knn_regr * rename algos in cuml * rename algos in sklearn * reworked kmeans config for test metrics * add init to report config * add opportunity to write path to folder in configs * pep8 * change readme * apply comments, part1 * apply comments, part2 * dfs strategy to take jsons from folders * now you can --configs=folder,.json,folder * Update README.md * apply comment Co-authored-by: Ekaterina Mekhnetsova <mekkatya@gmail.com>
1 parent 556313d commit 33c95a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2707
-309
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Run `python runner.py --configs configs/config_example.json [--output-file resul
7474

7575
Options:
7676

77-
- ``--configs``: specify the path to a configuration file.
77+
- ``--configs``: specify the path to a configuration file or a folder that contains configuration files.
7878
- ``--no-intel-optimized``: use Scikit-learn without [Intel(R) Extension for Scikit-learn*](#intelr-extension-for-scikit-learn-support). Now available for [scikit-learn benchmarks](https://github.com/IntelPython/scikit-learn_bench/tree/master/sklearn_bench). By default, the runner uses Intel(R) Extension for Scikit-learn.
7979
- ``--output-file``: specify the name of the output file for the benchmark result. The default name is `result.json`
8080
- ``--report``: create an Excel report based on benchmark results. The `openpyxl` library is required.

configs/blogs/skl_2021_3.json

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"common": {
3-
"lib": ["sklearn"],
4-
"data-format": ["pandas"],
5-
"data-order": ["F"],
6-
"dtype": ["float64"]
3+
"lib": "sklearn",
4+
"data-format": "pandas",
5+
"data-order": "F",
6+
"dtype": "float64"
77
},
88
"cases": [
99
{
@@ -19,11 +19,11 @@
1919
}
2020
}
2121
],
22-
"time-method": ["box_filter"],
23-
"time-limit": [50],
24-
"n-clusters": [1000],
25-
"maxiter": [50],
26-
"tol": [0.0]
22+
"time-method": "box_filter",
23+
"time-limit": 50,
24+
"n-clusters": 1000,
25+
"maxiter": 50,
26+
"tol": 0.0
2727
},
2828
{
2929
"algorithm": "kmeans",
@@ -38,12 +38,12 @@
3838
}
3939
}
4040
],
41-
"time-method": ["box_filter"],
42-
"time-limit": [50],
43-
"n-clusters": [5],
44-
"maxiter": [50],
45-
"init": ["k-means++"],
46-
"tol": [0.0]
41+
"time-method": "box_filter",
42+
"time-limit": 50,
43+
"n-clusters": 5,
44+
"maxiter": 50,
45+
"init": "k-means++",
46+
"tol": 0.0
4747
},
4848
{
4949
"algorithm": "kmeans",
@@ -58,11 +58,11 @@
5858
}
5959
}
6060
],
61-
"time-method": ["box_filter"],
62-
"time-limit": [50],
63-
"n-clusters": [20],
64-
"maxiter": [50],
65-
"tol": [0.0]
61+
"time-method": "box_filter",
62+
"time-limit": 50,
63+
"n-clusters": 20,
64+
"maxiter": 50,
65+
"tol": 0.0
6666
},
6767
{
6868
"algorithm": "pca",
@@ -107,12 +107,12 @@
107107
}
108108
}
109109
],
110-
"svd-solver": ["full"],
111-
"n-components": [10]
110+
"svd-solver": "full",
111+
"n-components": 10
112112
},
113113
{
114114
"algorithm": "df_clsf",
115-
"dtype": ["float32"],
115+
"dtype": "float32",
116116
"dataset": [
117117
{
118118
"source": "npy",
@@ -129,10 +129,10 @@
129129
}
130130
}
131131
],
132-
"num-trees": [50],
133-
"max-depth": [16],
134-
"max-leaf-nodes": [131072],
135-
"max-features": [0.2]
132+
"num-trees": 50,
133+
"max-depth": 16,
134+
"max-leaf-nodes": 131072,
135+
"max-features": 0.2
136136
},
137137
{
138138
"algorithm": "ridge",
@@ -146,7 +146,7 @@
146146
}
147147
}
148148
],
149-
"alpha": [5]
149+
"alpha": 5
150150
},
151151
{
152152
"algorithm": "linear",
@@ -201,8 +201,8 @@
201201
}
202202
}
203203
],
204-
"maxiter": [100],
205-
"tol": [0]
204+
"maxiter": 100,
205+
"tol": 0
206206
},
207207
{
208208
"algorithm": "svm",
@@ -222,8 +222,8 @@
222222
}
223223
}
224224
],
225-
"C": [500.0],
226-
"kernel": ["rbf"]
225+
"C": 500.0,
226+
"kernel": "rbf"
227227
},
228228
{
229229
"algorithm": "svm",
@@ -243,8 +243,8 @@
243243
}
244244
}
245245
],
246-
"C": [1.5e-3],
247-
"kernel": ["linear"]
246+
"C": 1.5e-3,
247+
"kernel": "linear"
248248
},
249249
{
250250
"algorithm": "svm",
@@ -264,8 +264,8 @@
264264
}
265265
}
266266
],
267-
"C": [100.0],
268-
"kernel": ["linear"]
267+
"C": 100.0,
268+
"kernel": "linear"
269269
},
270270
{
271271
"algorithm": "svm",
@@ -285,8 +285,8 @@
285285
}
286286
}
287287
],
288-
"C": [50.0],
289-
"kernel": ["rbf"]
288+
"C": 50.0,
289+
"kernel": "rbf"
290290
},
291291
{
292292
"algorithm": "nusvc",
@@ -306,8 +306,8 @@
306306
}
307307
}
308308
],
309-
"nu": [0.25],
310-
"kernel": ["poly"]
309+
"nu": 0.25,
310+
"kernel": "poly"
311311
},
312312
{
313313
"algorithm": "svr",
@@ -327,8 +327,8 @@
327327
}
328328
}
329329
],
330-
"C": [0.1],
331-
"kernel": ["poly"]
330+
"C": 0.1,
331+
"kernel": "poly"
332332
},
333333
{
334334
"algorithm": "nusvr",
@@ -348,9 +348,9 @@
348348
}
349349
}
350350
],
351-
"nu": [0.8],
352-
"C": [2.0],
353-
"kernel": ["rbf"]
351+
"nu": 0.8,
352+
"C": 2.0,
353+
"kernel": "rbf"
354354
},
355355
{
356356
"algorithm": "dbscan",
@@ -386,7 +386,7 @@
386386
},
387387
{
388388
"algorithm": "knn_clsf",
389-
"dtype": ["float32"],
389+
"dtype": "float32",
390390
"dataset": [
391391
{
392392
"source": "synthetic",
@@ -437,11 +437,11 @@
437437
}
438438
}
439439
],
440-
"method": ["brute"]
440+
"method": "brute"
441441
},
442442
{
443443
"algorithm": "knn_clsf",
444-
"dtype": ["float32"],
444+
"dtype": "float32",
445445
"dataset": [
446446
{
447447
"source": "synthetic",
@@ -468,7 +468,7 @@
468468
}
469469
}
470470
],
471-
"method": ["kd_tree"]
471+
"method": "kd_tree"
472472
},
473473
{
474474
"algorithm": "train_test_split",
@@ -483,9 +483,9 @@
483483
}
484484
}
485485
],
486-
"include-y": [""],
487-
"train-size": [0.75],
488-
"test-size": [0.25]
486+
"include-y": "",
487+
"train-size": 0.75,
488+
"test-size": 0.25
489489
}
490490
]
491491
}

0 commit comments

Comments
 (0)