Skip to content

Commit

Permalink
Added some md comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fexfl committed Dec 24, 2024
1 parent 2525dcd commit f7eb8cd
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions notebook/batching_performance.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Transformers Batching Performance Testing\n",
"\n",
"This notebook is intended for testing the pseudonymization performance for different transformers batch sizes."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -44,6 +53,13 @@
" return text"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Below is the function for a single performance test. The model is loaded from scratch every iteration, and the csv file is reread every time, to create equal conditions for every batching size."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -156,6 +172,13 @@
" return average_email_time"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Below the testing setup is configured. The tested batching sizes are set in `batching_sizes`. For each batching size, `n_samples` independent runs are executed and the performances are averaged."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -175,6 +198,13 @@
" av_email_times_for_batches.append(average_email_time/n_samples)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"A bar plot displaying the average email processing times for the different batch sizes."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit f7eb8cd

Please sign in to comment.