Skip to content

Commit 07ab9f5

Browse files
committed
fixed TSiT and TSSequencer issues
1 parent d751602 commit 07ab9f5

11 files changed

+335
-267
lines changed

nbs/003_data.validation.ipynb

Lines changed: 113 additions & 113 deletions
Large diffs are not rendered by default.

nbs/021_calibration.ipynb

Lines changed: 17 additions & 25 deletions
Large diffs are not rendered by default.

nbs/022_tslearner.ipynb

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,11 @@
265265
" <tbody>\n",
266266
" <tr>\n",
267267
" <td>0</td>\n",
268-
" <td>1.458827</td>\n",
269-
" <td>0.300000</td>\n",
270-
" <td>1.362652</td>\n",
268+
" <td>1.620233</td>\n",
269+
" <td>0.200000</td>\n",
270+
" <td>1.466389</td>\n",
271271
" <td>0.300000</td>\n",
272-
" <td>00:02</td>\n",
272+
" <td>00:00</td>\n",
273273
" </tr>\n",
274274
" </tbody>\n",
275275
"</table>"
@@ -339,9 +339,9 @@
339339
" <tbody>\n",
340340
" <tr>\n",
341341
" <td>0</td>\n",
342-
" <td>1.457477</td>\n",
343-
" <td>0.200000</td>\n",
344-
" <td>00:01</td>\n",
342+
" <td>1.362660</td>\n",
343+
" <td>0.333333</td>\n",
344+
" <td>00:00</td>\n",
345345
" </tr>\n",
346346
" </tbody>\n",
347347
"</table>"
@@ -413,9 +413,9 @@
413413
" <tbody>\n",
414414
" <tr>\n",
415415
" <td>0</td>\n",
416-
" <td>0.749274</td>\n",
417-
" <td>0.721294</td>\n",
418-
" <td>0.666667</td>\n",
416+
" <td>0.792934</td>\n",
417+
" <td>0.762534</td>\n",
418+
" <td>0.444444</td>\n",
419419
" <td>00:00</td>\n",
420420
" </tr>\n",
421421
" </tbody>\n",
@@ -684,11 +684,11 @@
684684
" <tbody>\n",
685685
" <tr>\n",
686686
" <td>0</td>\n",
687-
" <td>204.070648</td>\n",
688-
" <td>13.636603</td>\n",
689-
" <td>199.854218</td>\n",
690-
" <td>13.712566</td>\n",
691-
" <td>00:01</td>\n",
687+
" <td>215.481400</td>\n",
688+
" <td>14.030172</td>\n",
689+
" <td>202.221893</td>\n",
690+
" <td>13.798750</td>\n",
691+
" <td>00:00</td>\n",
692692
" </tr>\n",
693693
" </tbody>\n",
694694
"</table>"
@@ -944,11 +944,11 @@
944944
" <tbody>\n",
945945
" <tr>\n",
946946
" <td>0</td>\n",
947-
" <td>4539.636719</td>\n",
948-
" <td>50.971386</td>\n",
949-
" <td>7981.193848</td>\n",
950-
" <td>74.748787</td>\n",
951-
" <td>00:01</td>\n",
947+
" <td>4688.818359</td>\n",
948+
" <td>52.336243</td>\n",
949+
" <td>7955.546387</td>\n",
950+
" <td>74.580894</td>\n",
951+
" <td>00:00</td>\n",
952952
" </tr>\n",
953953
" </tbody>\n",
954954
"</table>"
@@ -1016,9 +1016,9 @@
10161016
"name": "stdout",
10171017
"output_type": "stream",
10181018
"text": [
1019-
"/Users/nacho/notebooks/tsai/nbs/022_tslearner.ipynb saved at 2025-01-22 18:45:21\n",
1019+
"/Users/nacho/notebooks/tsai/nbs/022_tslearner.ipynb saved at 2025-03-01 15:25:53\n",
10201020
"Correct notebook to script conversion! 😃\n",
1021-
"Wednesday 22/01/25 18:45:24 CET\n"
1021+
"Saturday 01/03/25 15:25:56 CET\n"
10221022
]
10231023
},
10241024
{

nbs/068_models.TSiTPlus.ipynb

Lines changed: 88 additions & 9 deletions
Large diffs are not rendered by default.

nbs/069_models.TSSequencerPlus.ipynb

Lines changed: 7 additions & 7 deletions
Large diffs are not rendered by default.

nbs/077_models.multimodal.ipynb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,13 +1122,9 @@
11221122
],
11231123
"metadata": {
11241124
"kernelspec": {
1125-
"display_name": "py311t25",
1125+
"display_name": "python3",
11261126
"language": "python",
11271127
"name": "python3"
1128-
},
1129-
"language_info": {
1130-
"name": "python",
1131-
"version": "3.11.11"
11321128
}
11331129
},
11341130
"nbformat": 4,

nbs/models/test.pth

0 Bytes
Binary file not shown.

settings.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pip_requirements = torch>=1.10,<2.6
2020
conda_requirements = pytorch>=1.10,<2.6
2121
conda_user = timeseriesAI
2222
extra_requirements = sktime>=0.34.0 tsfresh>=0.20.3 PyWavelets>=1.7.0 nbformat>=5.10.4
23-
dev_requirements = nbdev>2 ipykernel>6
23+
dev_requirements = nbdev>2 ipykernel>6 ipython<9
2424
console_scripts = nb2py=tsai.export:nb2py
2525
nbs_path = nbs
2626
doc_path = _docs

tsai/data/validation.py

Lines changed: 76 additions & 76 deletions
Large diffs are not rendered by default.

tsai/models/TSSequencerPlus.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ def __init__(self, c_in:int, seq_len:int, depth:int=6, d_model:int=128, act:str=
9090
self.feature_extractor = nn.Identity()
9191

9292
# Linear projection
93+
self.transpose = Transpose(1,2)
9394
if token_size is None and tokenizer is None and feature_extractor is None:
94-
self.linear_proj = nn.Conv1d(c_in, d_model, 1)
95+
self.linear_proj = nn.Linear(c_in, d_model)
96+
# self.linear_proj = nn.Conv1d(c_in, d_model, 1)
9597
else:
9698
self.linear_proj = nn.Identity()
9799

98-
self.transpose = Transpose(1,2)
99-
100100
# Position embedding & token
101101
if use_pe:
102102
self.pos_embed = nn.Parameter(torch.zeros(1, seq_len, d_model))
@@ -122,10 +122,10 @@ def forward(self, x):
122122
x = self.feature_extractor(x)
123123

124124
# Linear projection
125+
x = self.transpose(x)
125126
x = self.linear_proj(x)
126127

127128
# Position embedding & token
128-
x = self.transpose(x)
129129
if self.use_pe:
130130
x = x + self.pos_embed
131131
if self.use_token: # token is concatenated after position embedding so that embedding can be learned using self.supervised learning

0 commit comments

Comments
 (0)