fine-tuning 0.001

This commit is contained in:
Łukasz Jędyk 2022-04-09 15:29:32 +02:00
parent ca339fcfcc
commit 501ca59624
5 changed files with 17756 additions and 17609 deletions

3
.gitignore vendored
View File

@ -6,3 +6,6 @@
*.o
.DS_Store
.token
.ipynb_checkpoints/
geval

File diff suppressed because it is too large Load Diff

144
fine-tuning.ipynb Normal file
View File

@ -0,0 +1,144 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "binding-contribution",
"metadata": {},
"source": [
"## Alpha fine-tuning"
]
},
{
"cell_type": "markdown",
"id": "colored-chaos",
"metadata": {},
"source": [
"Fine-tuning parametru wygładzania alpha. Tylko 10000 linii ze zbioru trenującego, aby oszczędzić czas. <br>\n",
"Ostatecznie trening na całym zbiorze z wybranym parametrem."
]
},
{
"cell_type": "markdown",
"id": "environmental-session",
"metadata": {},
"source": [
"#### Alpha 0.001"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "coordinated-ratio",
"metadata": {},
"outputs": [],
"source": [
"!py run.py 0.001"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "revolutionary-designation",
"metadata": {},
"outputs": [],
"source": [
"!./geval -t dev-0"
]
},
{
"cell_type": "markdown",
"id": "molecular-civilian",
"metadata": {},
"source": [
"#### Alpha 0.005"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "coral-silver",
"metadata": {},
"outputs": [],
"source": [
"!py run.py 0.005"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "powered-webcam",
"metadata": {},
"outputs": [],
"source": [
"!./geval -t dev-0"
]
},
{
"cell_type": "markdown",
"id": "broadband-heating",
"metadata": {},
"source": [
"#### Alpha 0.01"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "moderate-bearing",
"metadata": {},
"outputs": [],
"source": [
"!py run.py 0.01"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "guilty-committee",
"metadata": {},
"outputs": [],
"source": [
"!./geval -t dev-0"
]
},
{
"cell_type": "markdown",
"id": "blank-coordinate",
"metadata": {},
"source": [
"| alpha | dev-0 score |\n",
"|-------|-------------|\n",
"| 0.001 | |\n",
"| 0.005 | |\n",
"| 0.01 | |\n",
"| 0.05 | |\n",
"| 0.1 | |\n",
"| 0.2 | |\n",
"| 0.3 | |\n",
"| 0.4 | |\n",
"| 0.5 | |"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

2
run.py
View File

@ -61,7 +61,7 @@ if len(sys.argv) != 2:
print('Wrong number of arguments. Expected 1 - alpha smoothing parameter.')
quit()
else:
alpha = sys.argv[1]
alpha = float(sys.argv[1])
# load training data
train_data = pd.read_csv('train/in.tsv.xz', sep='\t', error_bad_lines=False, warn_bad_lines=False, header=None, quoting=csv.QUOTE_NONE)

File diff suppressed because it is too large Load Diff