Skip to content

Commit

Permalink
fix test patches
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova committed Apr 12, 2024
1 parent 8bae452 commit 9ad9142
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.

Large diffs are not rendered by default.

24 changes: 22 additions & 2 deletions notebooks/grammar-correction/grammar-correction.ipynb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "99b677ff-3399-4f27-ac0f-782bfe25f151",
"metadata": {},
Expand Down Expand Up @@ -48,6 +49,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "efafd7fb-95ea-47c0-9441-7b2bbb8e6b89",
"metadata": {},
Expand All @@ -69,6 +71,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "ed9a760a-aaf7-41f6-ab0d-da993e486336",
"metadata": {},
Expand Down Expand Up @@ -106,6 +109,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "c13b157a-2bbb-49db-9046-47c2b6ba2953",
"metadata": {},
Expand Down Expand Up @@ -172,6 +176,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "833e0871-c828-4104-a986-230a27c913a5",
"metadata": {},
Expand Down Expand Up @@ -226,6 +231,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "6131a0ec-654e-435e-a668-55ad33cff74b",
"metadata": {},
Expand Down Expand Up @@ -281,6 +287,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "482a5d75-916a-4363-bf24-5b642a6bf437",
"metadata": {},
Expand Down Expand Up @@ -325,6 +332,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "5c4e358c-bbf8-4ea8-9b19-d8616c41562d",
"metadata": {},
Expand All @@ -333,6 +341,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "cdba3c17-9f94-4d1c-afae-39c857caf5af",
"metadata": {},
Expand Down Expand Up @@ -453,6 +462,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "992cb162-efd3-49da-99c5-0c44af34afaf",
"metadata": {},
Expand All @@ -461,6 +471,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "69faa673-45fd-481d-9573-4f54ea17fb77",
"metadata": {},
Expand Down Expand Up @@ -576,6 +587,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "26d3d759-3cb2-418d-82f8-3be2e445916a",
"metadata": {},
Expand Down Expand Up @@ -650,6 +662,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "21c60879",
"metadata": {
Expand All @@ -673,6 +686,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "f87e8395",
"metadata": {
Expand Down Expand Up @@ -726,6 +740,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "b2b35b38",
"metadata": {
Expand Down Expand Up @@ -754,7 +769,7 @@
"outputs_hidden": false
},
"test_replace": {
", device.value)": ", device.value, calibration_dataset_size=1)"
"calibration_dataset_size=CALIBRATION_DATASET_SIZE,": "calibration_dataset_size=1,"
}
},
"outputs": [
Expand Down Expand Up @@ -953,7 +968,7 @@
}
],
"source": [
"from utils import get_quantized_pipeline\n",
"from utils import get_quantized_pipeline, CALIBRATION_DATASET_SIZE\n",
"\n",
"grammar_corrector_pipe_fp32 = grammar_corrector_pipe\n",
"grammar_corrector_pipe_int8 = None\n",
Expand All @@ -966,10 +981,12 @@
" grammar_corrector_dir,\n",
" quantized_model_path,\n",
" device.value,\n",
" calibration_dataset_size=CALIBRATION_DATASET_SIZE,\n",
" )"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "50123853-f621-4cab-b836-b8f210d03c04",
"metadata": {},
Expand Down Expand Up @@ -1022,6 +1039,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "176da8b1",
"metadata": {
Expand Down Expand Up @@ -1072,6 +1090,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "82d69626",
"metadata": {
Expand Down Expand Up @@ -1173,6 +1192,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "3dedfe26-143d-427d-9a6b-affc265a236b",
"metadata": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@
"outputId": "183bdbb6-4016-463c-8d76-636a6b3a9778",
"tags": [],
"test_replace": {
"train_dataset, ": "torch.utils.data.Subset(train_dataset, torch.arange(300)), ",
"train_dataset,": "torch.utils.data.Subset(train_dataset, torch.arange(300)), ",
"val_dataset, ": "torch.utils.data.Subset(val_dataset, torch.arange(100)), "
}
},
Expand Down

0 comments on commit 9ad9142

Please sign in to comment.