Remove uneeded labels data structure
This commit is contained in:
Родитель
22b3c19114
Коммит
dbec1f8120
|
@ -232,7 +232,6 @@
|
|||
" # Paths for the output data.\n",
|
||||
" outputs_path = args.outputs\n",
|
||||
" model_path = os.path.join(outputs_path, '{}.pkl'.format(args.save))\n",
|
||||
" labels_path = os.path.join(outputs_path, '{}.csv'.format(args.save))\n",
|
||||
"\n",
|
||||
" # Create the outputs folder.\n",
|
||||
" os.makedirs(outputs_path, exist_ok=True)\n",
|
||||
|
@ -373,10 +372,6 @@
|
|||
"\n",
|
||||
" print('Fitting the model.')\n",
|
||||
"\n",
|
||||
" # Collect the ordered AnswerId for computing scores.\n",
|
||||
" labels = sorted(train[questions_answerid_column].unique())\n",
|
||||
" label_order = pd.DataFrame({'label': labels})\n",
|
||||
"\n",
|
||||
" # Featurize the train and tune dataset. It's important to only fit the\n",
|
||||
" # featurizer on the training data, so that the tuning data is treated the\n",
|
||||
" # same way the testing data will be later on.\n",
|
||||
|
@ -401,8 +396,6 @@
|
|||
" joblib.dump(model, model_path)\n",
|
||||
" print('{}: {:.2f} MB'\n",
|
||||
" .format(model_path, os.path.getsize(model_path)/(2**20)))\n",
|
||||
" print('Saving the labels to {}'.format(labels_path))\n",
|
||||
" label_order.to_csv(labels_path, sep='\\t', index=False)\n",
|
||||
" "
|
||||
]
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче