Added notebook to sample from predictions and load model

This commit is contained in:
Victor Mylle
2023-12-18 21:12:14 +00:00
parent c437c23566
commit fee948cc09
11 changed files with 1226 additions and 236 deletions

File diff suppressed because one or more lines are too long

View File

@@ -187,22 +187,56 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ClearML Task: created new task id=6b50442e1cec4bf9b3bd5a34077b4217\n",
"ClearML results page: http://192.168.1.182:8080/projects/2e46d4af6f1e4c399cf9f5aa30bc8795/experiments/6b50442e1cec4bf9b3bd5a34077b4217/output/log\n",
"151780\n",
"ClearML Task: created new task id=d19c767120a24f97b3231f0e8ac9f2b5\n",
"ClearML results page: http://192.168.1.182:8080/projects/2e46d4af6f1e4c399cf9f5aa30bc8795/experiments/d19c767120a24f97b3231f0e8ac9f2b5/output/log\n",
"151780\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"ERROR: Unexpected bus error encountered in worker. This might be caused by insufficient shared memory (shm).\n",
"\u0000Exception ignored in: <function _MultiProcessingDataLoaderIter.__del__ at 0x7f37044039a0>\n",
"Traceback (most recent call last):\n",
" File \"/opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py\", line 1478, in __del__\n",
" self._shutdown_workers()\n",
" File \"/opt/conda/lib/python3.10/site-packages/torch/utils/data/dataloader.py\", line 1442, in _shutdown_workers\n",
" w.join(timeout=_utils.MP_STATUS_CHECK_INTERVAL)\n",
" File \"/opt/conda/lib/python3.10/multiprocessing/process.py\", line 149, in join\n",
" res = self._popen.wait(timeout)\n",
" File \"/opt/conda/lib/python3.10/multiprocessing/popen_fork.py\", line 40, in wait\n",
" if not wait([self.sentinel], timeout):\n",
" File \"/opt/conda/lib/python3.10/multiprocessing/connection.py\", line 931, in wait\n",
" ready = selector.select(timeout)\n",
" File \"/opt/conda/lib/python3.10/selectors.py\", line 416, in select\n",
" fd_event_list = self._selector.poll(timeout)\n",
" File \"/opt/conda/lib/python3.10/site-packages/torch/utils/data/_utils/signal_handling.py\", line 66, in handler\n",
" _error_if_any_worker_fails()\n",
"RuntimeError: DataLoader worker (pid 326715) is killed by signal: Bus error. It is possible that dataloader's workers are out of shared memory. Please try to raise your shared memory limit.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"151780\n",
"24979\n",
"151780\n",
"24979\n",
"151780\n",
"24979\n",
"Using get_plot_error\n",
"Using get_plot_error\n",
"Using get_plot_error\n",
"Using get_plot_error\n",
"Early stopping triggered\n",
"151780\n",
"24979\n"
@@ -210,7 +244,7 @@
}
],
"source": [
"task = clearml_helper.get_task(task_name=\"Autoregressive Non Linear Quantile Regression + Quarter + DoW\")\n",
"task = clearml_helper.get_task(task_name=\"Autoregressive Non Linear Quantile Regression + Quarter + DoW + Net\")\n",
"data_config = task.connect(data_config, name=\"data_features\")\n",
"\n",
"#### Hyperparameters ####\n",
@@ -227,8 +261,8 @@
" quantiles = eval(quantiles)\n",
"\n",
"model_parameters = {\n",
" \"learning_rate\": 0.0001,\n",
" \"hidden_size\": 512,\n",
" \"learning_rate\": 0.0002,\n",
" \"hidden_size\": 1024,\n",
" \"num_layers\": 3,\n",
" \"dropout\": 0.2,\n",
" \"time_feature_embedding\": 2,\n",
@@ -256,7 +290,7 @@
" [PinballLoss(quantiles), MSELoss(), L1Loss(), CRPSLoss(quantiles)]\n",
")\n",
"trainer.early_stopping(patience=10)\n",
"trainer.plot_every(15)\n",
"trainer.plot_every(25)\n",
"trainer.train(task=task, epochs=epochs, remotely=False)"
]
},