dsipts 1.1.20__py3-none-any.whl → 1.1.22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dsipts might be problematic. Click here for more details.
- dsipts/data_structure/data_structure.py +31 -18
- dsipts/models/base_v2.py +4 -1
- dsipts/version.py +1 -1
- {dsipts-1.1.20.dist-info → dsipts-1.1.22.dist-info}/METADATA +6 -3
- {dsipts-1.1.20.dist-info → dsipts-1.1.22.dist-info}/RECORD +7 -7
- {dsipts-1.1.20.dist-info → dsipts-1.1.22.dist-info}/WHEEL +0 -0
- {dsipts-1.1.20.dist-info → dsipts-1.1.22.dist-info}/top_level.txt +0 -0
|
@@ -32,7 +32,10 @@ from datetime import datetime
|
|
|
32
32
|
from ..models.utils import weight_init_zeros,weight_init
|
|
33
33
|
import logging
|
|
34
34
|
from .modifiers import *
|
|
35
|
-
|
|
35
|
+
disable_aim = True
|
|
36
|
+
|
|
37
|
+
if disable_aim is False:
|
|
38
|
+
from aim.pytorch_lightning import AimLogger
|
|
36
39
|
import time
|
|
37
40
|
debug_prediction = False
|
|
38
41
|
class DummyScaler():
|
|
@@ -774,6 +777,7 @@ class TimeSeries():
|
|
|
774
777
|
train_dl = DataLoader(train, batch_size = batch_size , shuffle=True,drop_last=True,num_workers=num_workers,persistent_workers=persistent_workers)
|
|
775
778
|
valid_dl = DataLoader(validation, batch_size = batch_size , shuffle=False,drop_last=True,num_workers=num_workers,persistent_workers=persistent_workers)
|
|
776
779
|
|
|
780
|
+
beauty_string(f'train:{len(train_dl)}, validation:{len(valid_dl)}','section',self.verbose)
|
|
777
781
|
|
|
778
782
|
if debug_prediction:
|
|
779
783
|
dl = DataLoader(test, batch_size = batch_size , shuffle=False,drop_last=True,num_workers=num_workers,persistent_workers=persistent_workers)
|
|
@@ -801,11 +805,8 @@ class TimeSeries():
|
|
|
801
805
|
|
|
802
806
|
|
|
803
807
|
#logger = CSVLogger("logs", name=dirpath)
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
train_metric_prefix='train_',
|
|
807
|
-
val_metric_prefix='val_',
|
|
808
|
-
)
|
|
808
|
+
beauty_string(f'Init aim','section',self.verbose)
|
|
809
|
+
|
|
809
810
|
|
|
810
811
|
#https://stackoverflow.com/questions/49201236/check-the-total-number-of-parameters-in-a-pytorch-model
|
|
811
812
|
n_params = sum(dict((p.data_ptr(), p.numel()) for p in self.model.parameters()).values())
|
|
@@ -819,17 +820,25 @@ class TimeSeries():
|
|
|
819
820
|
buffer_size += buffer.nelement() * buffer.element_size()
|
|
820
821
|
|
|
821
822
|
size_all_mb = (param_size + buffer_size) / 1024**2
|
|
822
|
-
#aim_logger.experiment.track(self.model.name,name='model_name')
|
|
823
|
-
|
|
824
|
-
aim_logger.experiment.track(n_params,name='N-parameters')
|
|
825
|
-
aim_logger.experiment.track(size_all_mb,name='dim-model-MB')
|
|
826
|
-
aim_logger.experiment.track(len(train_dl.dataset),name='len-train')
|
|
827
|
-
aim_logger.experiment.track(len(valid_dl.dataset),name='len-valid')
|
|
828
|
-
#aim_logger.experiment.track(self.config,name=None)
|
|
829
823
|
tmp = self.config.copy()
|
|
830
824
|
tmp['model_name'] = self.model.name
|
|
831
|
-
aim_logger._run['hyperparameters'] = tmp
|
|
832
825
|
|
|
826
|
+
#aim_logger.experiment.track(self.model.name,name='model_name')
|
|
827
|
+
if disable_aim is False:
|
|
828
|
+
aim_logger = AimLogger(
|
|
829
|
+
experiment=self.name,
|
|
830
|
+
train_metric_prefix='train_',
|
|
831
|
+
val_metric_prefix='val_',
|
|
832
|
+
)
|
|
833
|
+
aim_logger.experiment.track(n_params,name='N-parameters')
|
|
834
|
+
aim_logger.experiment.track(size_all_mb,name='dim-model-MB')
|
|
835
|
+
aim_logger.experiment.track(len(train_dl.dataset),name='len-train')
|
|
836
|
+
aim_logger.experiment.track(len(valid_dl.dataset),name='len-valid')
|
|
837
|
+
#aim_logger.experiment.track(self.config,name=None)
|
|
838
|
+
|
|
839
|
+
aim_logger._run['hyperparameters'] = tmp
|
|
840
|
+
else:
|
|
841
|
+
aim_logger = None
|
|
833
842
|
mc = MetricsCallback(dirpath)
|
|
834
843
|
## TODO se ci sono 2 o piu gpu MetricsCallback non funziona (secondo me fa una istanza per ogni dataparallel che lancia e poi non riesce a recuperare info)
|
|
835
844
|
pl.seed_everything(seed, workers=True)
|
|
@@ -884,7 +893,8 @@ class TimeSeries():
|
|
|
884
893
|
tot_seconds = time.time()
|
|
885
894
|
|
|
886
895
|
|
|
887
|
-
|
|
896
|
+
beauty_string(f'tuning lr','section',self.verbose)
|
|
897
|
+
|
|
888
898
|
|
|
889
899
|
if auto_lr_find and (weight_exists is False):
|
|
890
900
|
try:
|
|
@@ -902,7 +912,8 @@ class TimeSeries():
|
|
|
902
912
|
self.model.optim_config['lr'] = lr_finder.suggestion() ## we are using it as optim key
|
|
903
913
|
except Exception as e:
|
|
904
914
|
beauty_string(f'There is a problem with the finding LR routine {e}','section',self.verbose)
|
|
905
|
-
|
|
915
|
+
beauty_string(f'Start fitting','section',self.verbose)
|
|
916
|
+
|
|
906
917
|
if OLD_PL:
|
|
907
918
|
if weight_exists:
|
|
908
919
|
trainer.fit(self.model, train_dl,valid_dl,ckpt_path=os.path.join(dirpath,'last.ckpt'))
|
|
@@ -994,8 +1005,10 @@ class TimeSeries():
|
|
|
994
1005
|
|
|
995
1006
|
beauty_string('END of the training process','block',self.verbose)
|
|
996
1007
|
|
|
997
|
-
|
|
998
|
-
|
|
1008
|
+
|
|
1009
|
+
if disable_aim is False:
|
|
1010
|
+
aim_logger.experiment.track((time.time()-tot_seconds),name='seconds-training')
|
|
1011
|
+
aim_logger.experiment.track(val_loss,name='val-loss-end-train')
|
|
999
1012
|
|
|
1000
1013
|
|
|
1001
1014
|
|
dsipts/models/base_v2.py
CHANGED
|
@@ -360,7 +360,10 @@ class Base(pl.LightningModule):
|
|
|
360
360
|
ax.plot(pred,'o-',label='pred')
|
|
361
361
|
ax.legend()
|
|
362
362
|
ax.set_title(f'Channel {i} first element first batch validation {int(100*self.count_epoch/self.trainer.max_epochs)}%')
|
|
363
|
-
|
|
363
|
+
try:
|
|
364
|
+
self.logger.experiment.track(Image(fig), name='cm_training_end')
|
|
365
|
+
except:
|
|
366
|
+
pass ##no aim probably
|
|
364
367
|
#self.log(f"example_{i}", np.stack([real, pred]).T,sync_dist=True)
|
|
365
368
|
plt.close(fig)
|
|
366
369
|
|
dsipts/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.1.
|
|
1
|
+
__version__ = "1.1.22"
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dsipts
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.22
|
|
4
4
|
Summary: Unified library for timeseries modelling
|
|
5
5
|
Author-email: Andrea Gobbi <agobbi@fbk.eu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/DSIP-FBK/DSIPTS
|
|
7
7
|
Project-URL: Docs, https://dsip-fbk.github.io/DSIPTS/
|
|
8
8
|
Requires-Python: >=3.12
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
|
-
Requires-Dist: aim
|
|
11
10
|
Requires-Dist: beautifulsoup4==4.12.0
|
|
12
11
|
Requires-Dist: bumpver>=2025.1131
|
|
13
12
|
Requires-Dist: einops>=0.8.1
|
|
@@ -18,7 +17,7 @@ Requires-Dist: hydra-joblib-launcher>=1.2.0
|
|
|
18
17
|
Requires-Dist: hydra-optuna-sweeper>=1.2.0
|
|
19
18
|
Requires-Dist: hydra-submitit-launcher>=1.2.0
|
|
20
19
|
Requires-Dist: ipykernel>=6.30.1
|
|
21
|
-
Requires-Dist: lightning
|
|
20
|
+
Requires-Dist: lightning==2.5.5
|
|
22
21
|
Requires-Dist: matplotlib>=3.10.6
|
|
23
22
|
Requires-Dist: nbformat>=5.10.4
|
|
24
23
|
Requires-Dist: numba>=0.61.2
|
|
@@ -431,6 +430,10 @@ and then open the url (http://127.0.0.1:43800)[http://127.0.0.1:43800]. It will
|
|
|
431
430
|
|
|
432
431
|
|
|
433
432
|
|
|
433
|
+
## 1.1.21-22 (2026-02-02)
|
|
434
|
+
- fixing lightening version support (not yet solved for version >2.6)
|
|
435
|
+
- removed aim (compatibility)
|
|
436
|
+
|
|
434
437
|
## 1.1.20 (2026-02-01)
|
|
435
438
|
- automation of tags, version etc using only the makefile
|
|
436
439
|
- update newer version of python
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
dsipts/__init__.py,sha256=2KK6XbUewsjmQQ6-zNMKIcFP01jtcXskcwr3qZwQToE,1822
|
|
2
|
-
dsipts/version.py,sha256=
|
|
2
|
+
dsipts/version.py,sha256=RcEsqYynl4v68pQpy_x3lmbtDimKNPMMlZTOueDpNzM,22
|
|
3
3
|
dsipts/data_management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
dsipts/data_management/monash.py,sha256=aZxq9FbIH6IsU8Lwou1hAokXjgOAK-wdl2VAeFg2k4M,13075
|
|
5
5
|
dsipts/data_management/public_datasets.py,sha256=yXFzOZZ-X0ZG1DoqVU-zFmEGVMc2033YDQhRgYxY8ws,6793
|
|
6
6
|
dsipts/data_structure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
dsipts/data_structure/data_structure.py,sha256=
|
|
7
|
+
dsipts/data_structure/data_structure.py,sha256=fwbJDNR0yQUEhT-kvNMm24d3hnQuXcSRfXJvZBQqun8,65419
|
|
8
8
|
dsipts/data_structure/modifiers.py,sha256=qlry9dfw8pEE0GrvgwROZJkJ6oPpUnjEHPIG5qIetss,7948
|
|
9
9
|
dsipts/data_structure/utils.py,sha256=ZL-z_InmFUkge5kQoHSrev1t6nyve9sTYTVeA75Or-I,6689
|
|
10
10
|
dsipts/models/Autoformer.py,sha256=nUQvPC_qtajLT1AHdNJmF_P3ZL01j3spkZ4ubxdGF3g,8497
|
|
@@ -32,7 +32,7 @@ dsipts/models/VQVAEA.py,sha256=sNJi8UZh-10qEIKcZK3SzhlOFUUjvqjoglzeZBFaeZM,13789
|
|
|
32
32
|
dsipts/models/VVA.py,sha256=BnPkJ0Nzue0oShSHZVRNlf5RvT0Iwtf9bx19vLB9Nn0,11939
|
|
33
33
|
dsipts/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
34
34
|
dsipts/models/base.py,sha256=aWvtDiBnmONsJ96tgaZRewB_yrqI8yvlAlH6PdpWrLA,20099
|
|
35
|
-
dsipts/models/base_v2.py,sha256=
|
|
35
|
+
dsipts/models/base_v2.py,sha256=oZaX1o0MidFTl_fq-MyZJHpw-tdEs9cskyR38cQiKjw,20438
|
|
36
36
|
dsipts/models/utils.py,sha256=kjTwyktNCFMpPUy6zoleBCSKlvMvK_Jkgyh2T1OXg3E,24497
|
|
37
37
|
dsipts/models/autoformer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
38
|
dsipts/models/autoformer/layers.py,sha256=xHt8V1lKdD1cIvgxXdDbI_EqOz4zgOQ6LP8l7M1pAxM,13276
|
|
@@ -83,7 +83,7 @@ dsipts/models/vva/minigpt.py,sha256=bg0JddqSD322uxSGexen3nPXL_hGTsk3vNLR62d7-w8,
|
|
|
83
83
|
dsipts/models/vva/vqvae.py,sha256=RzCQ_M9xBprp7_x20dSV3EQqlO0FjPUGWV-qdyKrQsM,19680
|
|
84
84
|
dsipts/models/xlstm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
85
85
|
dsipts/models/xlstm/xLSTM.py,sha256=ZKZZmffmIq1Vb71CR4GSyM8viqVx-u0FChxhcNgHub8,10081
|
|
86
|
-
dsipts-1.1.
|
|
87
|
-
dsipts-1.1.
|
|
88
|
-
dsipts-1.1.
|
|
89
|
-
dsipts-1.1.
|
|
86
|
+
dsipts-1.1.22.dist-info/METADATA,sha256=gfBeqQPtcXt5Qu-BYNJ7sfCRJbWYttXKb3GAgx6tUUM,27722
|
|
87
|
+
dsipts-1.1.22.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
88
|
+
dsipts-1.1.22.dist-info/top_level.txt,sha256=i6o0rf5ScFwZK21E89dSKjVNjUBkrEQpn0-Vij43748,7
|
|
89
|
+
dsipts-1.1.22.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|