Skip to content

Commit bab88ef

Browse files
authored
Merge pull request #954 from timeseriesAI/tsai_v20250729
updated torch version to 2.7 fixed issue with fastcore import path
2 parents a86d803 + bf708d7 commit bab88ef

14 files changed

+925
-863
lines changed

nbs/006_data.core.ipynb

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

nbs/009_data.preprocessing.ipynb

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

nbs/010_data.transforms.ipynb

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

nbs/015_data.mixed.ipynb

Lines changed: 156 additions & 151 deletions
Large diffs are not rendered by default.
-48 Bytes
Binary file not shown.
-58 Bytes
Binary file not shown.

nbs/models/test.pth

839 Bytes
Binary file not shown.

settings.ini

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ status = 4
1515
min_python = 3.9
1616
audience = Developers
1717
language = English
18-
requirements = fastai>=2.7.18 pyts>=0.13.0 imbalanced-learn>=0.12.4 psutil>=6.1.0 scikit-learn>=1.5.2
19-
pip_requirements = torch>=1.10,<2.6
20-
conda_requirements = pytorch>=1.10,<2.6
18+
requirements = fastai>=2.8.2 pyts>=0.13.0 imbalanced-learn>=0.12.4 psutil>=6.1.0 scikit-learn>=1.5.2
19+
pip_requirements = torch>=1.10,<2.8
20+
conda_requirements = pytorch>=1.10,<2.8
2121
conda_user = timeseriesAI
22-
extra_requirements = sktime>=0.34.0 tsfresh>=0.20.3 PyWavelets>=1.7.0 nbformat>=5.10.4
22+
extra_requirements = sktime>=0.38.4 tsfresh>=0.21.0 PyWavelets>=1.8.0 nbformat>=5.10.4
2323
dev_requirements = nbdev>2 ipykernel>6 ipython<9
2424
console_scripts = nb2py=tsai.export:nb2py
2525
nbs_path = nbs
@@ -35,11 +35,11 @@ recursive = True
3535
clean_ids = True
3636
black_formatting = False
3737
readme_nb = index.ipynb
38-
allowed_metadata_keys =
39-
allowed_cell_metadata_keys =
38+
allowed_metadata_keys =
39+
allowed_cell_metadata_keys =
4040
jupyter_hooks = True
4141
clear_all = False
4242
put_version_in_init = True
4343
cell_number = True
44-
skip_procs =
44+
skip_procs =
4545

tsai/_modidx.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,10 @@
325325
'tsai.data.core.ToInt.decodes': ('data.core.html#toint.decodes', 'tsai/data/core.py'),
326326
'tsai.data.core.ToInt.encodes': ('data.core.html#toint.encodes', 'tsai/data/core.py'),
327327
'tsai.data.core.ToNumpyTensor': ('data.core.html#tonumpytensor', 'tsai/data/core.py'),
328+
'tsai.data.core.ToNumpyTensor.decodes': ('data.core.html#tonumpytensor.decodes', 'tsai/data/core.py'),
328329
'tsai.data.core.ToNumpyTensor.encodes': ('data.core.html#tonumpytensor.encodes', 'tsai/data/core.py'),
329330
'tsai.data.core.ToTSTensor': ('data.core.html#totstensor', 'tsai/data/core.py'),
331+
'tsai.data.core.ToTSTensor.decodes': ('data.core.html#totstensor.decodes', 'tsai/data/core.py'),
330332
'tsai.data.core.ToTSTensor.encodes': ('data.core.html#totstensor.encodes', 'tsai/data/core.py'),
331333
'tsai.data.core.TorchDataset': ('data.core.html#torchdataset', 'tsai/data/core.py'),
332334
'tsai.data.core.TorchDataset.__getitem__': ('data.core.html#torchdataset.__getitem__', 'tsai/data/core.py'),

tsai/data/core.py

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,29 @@
1111

1212
# %% ../../nbs/006_data.core.ipynb 3
1313
import warnings
14-
from ..imports import *
15-
from sklearn.model_selection import StratifiedKFold
1614
from types import MethodType
17-
from matplotlib.ticker import PercentFormatter
15+
1816
import matplotlib.colors as mcolors
19-
from matplotlib import rcParams
20-
from fastcore.transform import Transform, DisplayedTransform, Pipeline
21-
from fastai.data.transforms import (RandomSplitter, ItemGetter, MultiCategorize, CategoryMap,
22-
Category, MultiCategory, Categorize)
23-
from fastai.data.core import TfmdLists, Datasets, TfmdDL, DataLoaders
24-
from fastai.data.load import DataLoader
2517
from fastai.data.block import CategoryBlock, DataBlock
26-
from fastai.losses import MSELossFlat, CrossEntropyLossFlat, BCEWithLogitsLossFlat
18+
from fastai.data.core import DataLoaders, Datasets, TfmdDL, TfmdLists
19+
from fastai.data.load import DataLoader
20+
from fastai.data.transforms import (
21+
Categorize,
22+
Category,
23+
CategoryMap,
24+
ItemGetter,
25+
MultiCategorize,
26+
MultiCategory,
27+
RandomSplitter,
28+
)
29+
from fastai.losses import BCEWithLogitsLossFlat, CrossEntropyLossFlat, MSELossFlat
2730
from fastai.vision.data import get_grid
31+
from fasttransform import DisplayedTransform, Pipeline, Transform
32+
from matplotlib import rcParams
33+
from matplotlib.ticker import PercentFormatter
34+
from sklearn.model_selection import StratifiedKFold
35+
36+
from ..imports import *
2837
from ..utils import *
2938

3039
warnings.filterwarnings("ignore", category=UserWarning)
@@ -66,6 +75,7 @@ def show(self, ax=None, ctx=None, title=None, **kwargs):
6675
class ToNumpyTensor(Transform):
6776
"Transforms an object into NumpyTensor"
6877
def encodes(self, o): return NumpyTensor(o)
78+
def decodes(self, o): return o.detach().cpu().numpy()
6979

7080
# %% ../../nbs/006_data.core.ipynb 7
7181
class TSTensor(TensorBase):
@@ -117,6 +127,7 @@ def __repr__(self):
117127
class ToTSTensor(Transform):
118128
"Transforms an object into TSTensor"
119129
def encodes(self, o): return TSTensor(o)
130+
def decodes(self, o): return o.data
120131

121132

122133
@delegates(plt.subplots)

0 commit comments

Comments
 (0)