Skip to content

Commit 3dfe412

Browse files
committed
add .gitignore
1 parent d1deb0c commit 3dfe412

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*.dylib
44
*.so
55
coverage.html/*
6+
_cache/*
67
.coverage
78
dist/*
89
build/*

_doc/examples/plot_benchmark_rf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ def measure_inference(fct, X, repeat, max_time=5, quantile=1):
201201
with open(cache_name, "wb") as f:
202202
f.write(onx.SerializeToString())
203203
sess = InferenceSession(cache_name, so)
204+
onx_size = os.stat(cache_name).st_size
204205

205206
# run once to avoid counting the first run
206207
bar.set_description(f"J={n_j} E={n_estimators} D={max_depth} predict1")
@@ -217,6 +218,7 @@ def measure_inference(fct, X, repeat, max_time=5, quantile=1):
217218
name=rf.__class__.__name__,
218219
n_rows=X.shape[0],
219220
n_features=X.shape[1],
221+
onnx_size=onx_size,
220222
)
221223

222224
# baseline
@@ -240,7 +242,7 @@ def measure_inference(fct, X, repeat, max_time=5, quantile=1):
240242
# Saving data
241243
# +++++++++++
242244

243-
name = "plot_beanchmark_rf"
245+
name = os.path.join(cache_dir, "plot_beanchmark_rf")
244246
print(f"Saving data into {name!r}")
245247

246248
df = pandas.DataFrame(data)

0 commit comments

Comments
 (0)