From cff05b95b288bad02d77a53f45aa86b0ed2b743d Mon Sep 17 00:00:00 2001 From: Aryan Saini Date: Tue, 26 Aug 2025 23:44:55 +0530 Subject: [PATCH 01/13] initial design --- pytorch_forecasting/base/_base_pkg.py | 206 ++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 pytorch_forecasting/base/_base_pkg.py diff --git a/pytorch_forecasting/base/_base_pkg.py b/pytorch_forecasting/base/_base_pkg.py new file mode 100644 index 000000000..419b4bd82 --- /dev/null +++ b/pytorch_forecasting/base/_base_pkg.py @@ -0,0 +1,206 @@ +from pathlib import Path +import pickle +from typing import Any, Optional, Union + +from lightning import Trainer +from lightning.pytorch.callbacks import ModelCheckpoint +from lightning.pytorch.core.datamodule import LightningDataModule +import torch +from torch.utils.data import DataLoader + +from pytorch_forecasting.data import TimeSeries +from pytorch_forecasting.models.base._base_object import _BasePtForecasterV2 + + +class Base_pkg(_BasePtForecasterV2): + """ + Base model package class acting as a high-level wrapper for the Lightning workflow. + + This class simplifies the user experience by managing model, datamodule, and trainer + configurations, and providing streamlined `fit` and `predict` methods. + + Parameters + ---------- + model_cfg : dict, optional + Model configs for the initialisation of the model. Required if not loading + from a checkpoint. Defaults to {}. + trainer_cfg : dict, optional + Configs to initialise ``lightning.Trainer``. Defaults to {}. + datamodule_cfg : Union[dict, str, Path], optional + Configs to initialise a ``LightningDataModule``. + - If dict, the keys and values are used as configuration parameters. + - If str or Path, it should be a path to a ``.pkl`` file containing + the serialized configuration dictionary. Required for reproducibility + when loading a model for inference. Defaults to {}. + ckpt_path : Union[str, Path], optional + Path to the checkpoint from which to load the model. If provided, `model_cfg` + is ignored. Defaults to None. + """ + + def __init__( + self, + model_cfg: Optional[dict[str, Any]] = None, + trainer_cfg: Optional[dict[str, Any]] = None, + datamodule_cfg: Optional[Union[dict[str, Any], str, Path]] = None, + ckpt_path: Optional[Union[str, Path]] = None, + ): + self.model_cfg = model_cfg or {} + self.trainer_cfg = trainer_cfg or {} + self.ckpt_path = Path(ckpt_path) if ckpt_path else None + + if isinstance(datamodule_cfg, (str, Path)): + with open(datamodule_cfg, "rb") as f: + self.datamodule_cfg = pickle.load(f) # noqa : S301 + else: + self.datamodule_cfg = datamodule_cfg or {} + + self.model = None + self.trainer = None + self.datamodule = None + + self._build_model() + + @classmethod + def get_cls(cls): + """Get the underlying model class.""" + raise NotImplementedError("Subclasses must implement `get_cls`.") + + @classmethod + def get_datamodule_cls(cls): + """Get the underlying DataModule class.""" + raise NotImplementedError("Subclasses must implement `get_datamodule_cls`.") + + def _build_model(self): + """Instantiates the model, either from a checkpoint or from config.""" + model_cls = self.get_cls() + if self.ckpt_path: + self.model = model_cls.load_from_checkpoint(self.ckpt_path) + elif self.model_cfg: + self.model = model_cls(**self.model_cfg) + else: + self.model = None + + def _build_datamodule(self, data: TimeSeries) -> LightningDataModule: + """Constructs a DataModule from a D1 layer object.""" + if not self.datamodule_cfg: + raise ValueError("`datamodule_cfg` must be provided to build a datamodule.") + datamodule_cls = self.get_datamodule_cls() + return datamodule_cls(data, **self.datamodule_cfg) + + def _load_dataloader( + self, data: Union[TimeSeries, LightningDataModule, DataLoader] + ) -> DataLoader: + """Converts various data input types into a DataLoader for prediction.""" + if isinstance(data, TimeSeries): # D1 Layer + dm = self._build_datamodule(data) + return dm.predict_dataloader() + elif isinstance(data, LightningDataModule): # D2 Layer + return data.predict_dataloader() + elif isinstance(data, DataLoader): + return data + else: + raise TypeError( + f"Unsupported data type for prediction: {type(data).__name__}. " + "Expected TimeSeriesDataSet, LightningDataModule, or DataLoader." + ) + + def fit( + self, + train_data: Union[TimeSeries, LightningDataModule], + # todo: we should create a base data_module for different data_modules + val_data: Optional[Union[TimeSeries, LightningDataModule]] = None, + save_ckpt: bool = True, + ckpt_dir: Union[str, Path] = "checkpoints", + **trainer_fit_kwargs, + ): + """ + Fit the model to the training data. + + Parameters + ---------- + train_data : Union[TimeSeries, LightningDataModule] + Training data (D1 or D2 layer). + val_data : Union[TimeSeries, LightningDataModule], optional + Validation data. + save_ckpt : bool, default=True + If True, save the best model checkpoint and the `datamodule_cfg`. + ckpt_dir : Union[str, Path], default="checkpoints" + Directory to save artifacts. + **trainer_fit_kwargs : + Additional keyword arguments passed to `trainer.fit()`. + + Returns + ------- + Optional[Path] + The path to the best model checkpoint if `save_ckpt=True`, else None. + """ + if self.model is None: + raise RuntimeError( + "Model is not initialized. Provide `model_cfg` or `ckpt_path`." + ) + + if isinstance(train_data, TimeSeries): + self.datamodule = self._build_datamodule(train_data) + else: + self.datamodule = train_data + + callbacks = self.trainer_cfg.get("callbacks", []) + if save_ckpt: + ckpt_dir = Path(ckpt_dir) + ckpt_dir.mkdir(parents=True, exist_ok=True) + checkpoint_cb = ModelCheckpoint( + dirpath=ckpt_dir, + filename="best-{epoch}-{val_loss:.2f}", + save_top_k=1, + monitor="val_loss", + mode="min", + ) + callbacks.append(checkpoint_cb) + + self.trainer = Trainer(**self.trainer_cfg, callbacks=callbacks) + self.trainer.fit(self.model, datamodule=self.datamodule, **trainer_fit_kwargs) + + if save_ckpt: + best_model_path = Path(checkpoint_cb.best_model_path) + dm_cfg_path = best_model_path.parent / "datamodule_cfg.pkl" + with open(dm_cfg_path, "wb") as f: + pickle.dump(self.datamodule_cfg, f) + print(f"Best model saved to: {best_model_path}") + print(f"DataModule config saved to: {dm_cfg_path}") + return best_model_path + return None + + def predict( + self, + data: Union[TimeSeries, LightningDataModule, DataLoader], + **kwargs, + ) -> Union[dict[str, torch.Tensor], None]: + """ + Generate predictions by wrapping the model's predict method. + + This method prepares the data by resolving it into a DataLoader and then + delegates the prediction task to the underlying model's ``.predict()`` method. + + Parameters + ---------- + data : Union[TimeSeries, LightningDataModule, DataLoader] + The data to predict on (D1, D2, or DataLoader). + **kwargs : + Additional keyword arguments passed directly to the model's ``.predict()`` + method. This includes `mode`, `return_info`, `output_dir`, and any + `trainer_kwargs`. + + Returns + ------- + Union[Dict[str, torch.Tensor], None] + A dictionary of prediction tensors, or `None` if `output_dir` is specified + in `**kwargs`. + """ + if self.model is None: + raise RuntimeError( + "Model is not initialized. Provide `model_cfg` or `ckpt_path`." + ) + + dataloader = self._load_dataloader(data) + + return self.model.predict(dataloader, **kwargs) From 13c12b98a689d8cdedcabc8547af60fad1f08e64 Mon Sep 17 00:00:00 2001 From: Aryan Saini Date: Fri, 3 Oct 2025 00:54:20 +0530 Subject: [PATCH 02/13] preliminary design --- pytorch_forecasting/base/_base_pkg.py | 15 ++- pytorch_forecasting/callbacks/__init__.py | 0 pytorch_forecasting/callbacks/predict.py | 112 ++++++++++++++++++ .../models/base/_base_model_v2.py | 68 ++++++++++- 4 files changed, 192 insertions(+), 3 deletions(-) create mode 100644 pytorch_forecasting/callbacks/__init__.py create mode 100644 pytorch_forecasting/callbacks/predict.py diff --git a/pytorch_forecasting/base/_base_pkg.py b/pytorch_forecasting/base/_base_pkg.py index 419b4bd82..7d5ba39f8 100644 --- a/pytorch_forecasting/base/_base_pkg.py +++ b/pytorch_forecasting/base/_base_pkg.py @@ -93,8 +93,10 @@ def _load_dataloader( """Converts various data input types into a DataLoader for prediction.""" if isinstance(data, TimeSeries): # D1 Layer dm = self._build_datamodule(data) + dm.setup(stage="predict") return dm.predict_dataloader() elif isinstance(data, LightningDataModule): # D2 Layer + data.setup(stage="predict") return data.predict_dataloader() elif isinstance(data, DataLoader): return data @@ -160,7 +162,7 @@ def fit( self.trainer = Trainer(**self.trainer_cfg, callbacks=callbacks) self.trainer.fit(self.model, datamodule=self.datamodule, **trainer_fit_kwargs) - if save_ckpt: + if save_ckpt and checkpoint_cb: best_model_path = Path(checkpoint_cb.best_model_path) dm_cfg_path = best_model_path.parent / "datamodule_cfg.pkl" with open(dm_cfg_path, "wb") as f: @@ -173,6 +175,7 @@ def fit( def predict( self, data: Union[TimeSeries, LightningDataModule, DataLoader], + output_dir: Optional[Union[str, Path]] = None, **kwargs, ) -> Union[dict[str, torch.Tensor], None]: """ @@ -202,5 +205,15 @@ def predict( ) dataloader = self._load_dataloader(data) + predictions = self.model.predict(dataloader, **kwargs) + + if output_dir: + output_path = Path(output_dir) + output_path.mkdir(parents=True, exist_ok=True) + output_file = output_path / "predictions.pkl" + with open(output_file, "wb") as f: + pickle.dump(predictions, f) + print(f"Predictions saved to {output_file}") + return None return self.model.predict(dataloader, **kwargs) diff --git a/pytorch_forecasting/callbacks/__init__.py b/pytorch_forecasting/callbacks/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/pytorch_forecasting/callbacks/predict.py b/pytorch_forecasting/callbacks/predict.py new file mode 100644 index 000000000..48e6d3c84 --- /dev/null +++ b/pytorch_forecasting/callbacks/predict.py @@ -0,0 +1,112 @@ +from typing import Any, Optional +from warnings import warn + +from lightning import Trainer +from lightning.pytorch.callbacks import BasePredictionWriter +import torch + +from pytorch_forecasting.models.base._base_model_v2 import BaseModel + + +class PredictCallback(BasePredictionWriter): + """ + Callback to capture predictions and related information internally. + + This callback is used by `BaseModel.predict()` to process raw model outputs + into the desired format (`prediction`, `quantiles`, or `raw`) and collect + any additional requested info (`x`, `y`, `index`, etc.). The results are + collated and stored in memory, accessible via the `.result` property. It does + not write to disk. + + Parameters + ---------- + mode : str + The prediction mode ("prediction", "quantiles", or "raw"). + return_info : list[str], optional + Additional information to return. + **kwargs : + Additional keyword arguments for `to_prediction` or `to_quantiles`. + """ + + def __init__( + self, + mode: str = "prediction", + return_info: Optional[list[str]] = None, + **kwargs, + ): + super().__init__(write_interval="epoch") + self.mode = mode + self.return_info = return_info or [] + self.kwargs = kwargs + self._reset_data() + + def _reset_data(self): + """Clear collected data for a new prediction run.""" + self.predictions = [] + self.info = {key: [] for key in self.return_info} + self._result = None + + def on_predict_batch_end( + self, + trainer: Trainer, + pl_module: BaseModel, + outputs: Any, + batch: Any, + batch_idx: int, + dataloader_idx: int = 0, + ): + """Process and store predictions for a single batch.""" + x, y = batch + + if self.mode == "raw": + processed_output = outputs + elif self.mode == "prediction": + processed_output = pl_module.to_prediction(outputs, **self.kwargs) + elif self.mode == "quantiles": + processed_output = pl_module.to_quantiles(outputs, **self.kwargs) + else: + raise ValueError(f"Invalid prediction mode: {self.mode}") + + self.predictions.append(processed_output) + + for key in self.return_info: + if key == "x": + self.info[key].append(x) + elif key == "y": + self.info[key].append(y[0]) + elif key == "index": + self.info[key].append(y[1]) + elif key == "decoder_lengths": + self.info[key].append(x["decoder_lengths"]) + else: + warn(f"Unknown return_info key: {key}") + + def on_predict_epoch_end(self, trainer: Trainer, pl_module: "BaseModel"): + """Collate all batch results into final tensors.""" + if self.mode == "raw" and isinstance(self.predictions[0], dict): + keys = self.predictions[0].keys() + collated_preds = { + key: torch.cat([p[key] for p in self.predictions]) for key in keys + } + else: + collated_preds = {"prediction": torch.cat(self.predictions)} + + final_result = collated_preds + + for key, data_list in self.info.items(): + if isinstance(data_list[0], dict): + collated_info = { + k: torch.cat([d[k] for d in data_list]) for k in data_list[0].keys() + } + else: + collated_info = torch.cat(data_list) + final_result[key] = collated_info + + self._result = final_result + self._reset_data() + + @property + def result(self) -> dict[str, torch.Tensor]: + if self._result is None: + raise RuntimeError("Prediction results are not yet available.") + return self._result diff --git a/pytorch_forecasting/models/base/_base_model_v2.py b/pytorch_forecasting/models/base/_base_model_v2.py index 8896a5397..31cfc356e 100644 --- a/pytorch_forecasting/models/base/_base_model_v2.py +++ b/pytorch_forecasting/models/base/_base_model_v2.py @@ -5,16 +5,19 @@ ######################################################################################## -from typing import Optional, Union +from typing import Any, Optional, Union from warnings import warn +from lightning import Trainer from lightning.pytorch import LightningModule from lightning.pytorch.utilities.types import STEP_OUTPUT import torch import torch.nn as nn from torch.optim import Optimizer +from torch.utils.data import DataLoader -from pytorch_forecasting.metrics import Metric +from pytorch_forecasting.callbacks.predict import PredictCallback +from pytorch_forecasting.metrics import Metric, MultiLoss from pytorch_forecasting.utils._classproperty import classproperty @@ -91,6 +94,67 @@ def forward(self, x: dict[str, torch.Tensor]) -> dict[str, torch.Tensor]: """ raise NotImplementedError("Forward method must be implemented by subclass.") + def predict( + self, + dataloader: DataLoader, + mode: str = "prediction", + return_info: Optional[list[str]] = None, + **kwargs, + ) -> dict[str, torch.Tensor]: + """ + Generate predictions for new data using the `lightning.Trainer`. + + Parameters + ---------- + dataloader : DataLoader + The dataloader containing the data to predict on. + mode : str + The prediction mode ("prediction", "quantiles", or "raw"). + return_info : list[str], optional + A list of additional information to return. + **kwargs : + Additional arguments for `to_prediction`/`to_quantiles` or `Trainer`. + + Returns + ------- + dict[str, torch.Tensor] + A dictionary of prediction results. + """ + trainer_kwargs = kwargs.pop("trainer_kwargs", {}) + predict_callback = PredictCallback(mode=mode, return_info=return_info, **kwargs) + + # Ensure callbacks list exists and append the new one + callbacks = trainer_kwargs.get("callbacks", []) + if not isinstance(callbacks, list): + callbacks = [callbacks] + callbacks.append(predict_callback) + trainer_kwargs["callbacks"] = callbacks + + trainer = Trainer(**trainer_kwargs) + trainer.predict(self, dataloaders=dataloader) + + return predict_callback.result + + def to_prediction(self, out: dict[str, Any], **kwargs) -> torch.Tensor: + """Converts raw model output to point forecasts.""" + if isinstance(self.loss, MultiLoss): + # Assuming first loss is the primary one for prediction + return self.loss.losses[0].to_prediction(out["prediction"][0]) + else: + return self.loss.to_prediction(out["prediction"]) + + def to_quantiles(self, out: dict[str, Any], **kwargs) -> torch.Tensor: + """Converts raw model output to quantile forecasts.""" + quantiles = kwargs.get("quantiles") # Allow overriding default quantiles + if isinstance(self.loss, MultiLoss): + # Assuming first loss is the primary one for quantiles + loss = self.loss.losses[0] + q = quantiles or loss.quantiles + return loss.to_quantiles(out["prediction"][0], quantiles=q) + else: + q = quantiles or self.loss.quantiles + return self.loss.to_quantiles(out["prediction"], quantiles=q) + def training_step( self, batch: tuple[dict[str, torch.Tensor]], batch_idx: int ) -> STEP_OUTPUT: From 35e2447d02d4afb1c08b4b881b0202f0c9b8dbb1 Mon Sep 17 00:00:00 2001 From: Aryan Saini Date: Sat, 18 Oct 2025 23:26:38 +0530 Subject: [PATCH 03/13] add predict to all v2 models --- pytorch_forecasting/base/_base_pkg.py | 70 +++++---- pytorch_forecasting/callbacks/predict.py | 23 ++- .../models/base/_base_model_v2.py | 18 +-- .../models/dlinear/_dlinear_pkg_v2.py | 23 ++- .../models/samformer/_samformer_v2_pkg.py | 92 +++--------- .../_tft_pkg_v2.py | 100 +++---------- .../models/tide/_tide_dsipts/_tide_v2_pkg.py | 95 +++--------- .../models/timexer/_timexer_pkg_v2.py | 95 +++--------- .../tests/test_all_estimators_v2.py | 135 +++++++++--------- 9 files changed, 222 insertions(+), 429 deletions(-) diff --git a/pytorch_forecasting/base/_base_pkg.py b/pytorch_forecasting/base/_base_pkg.py index 7d5ba39f8..340e9e742 100644 --- a/pytorch_forecasting/base/_base_pkg.py +++ b/pytorch_forecasting/base/_base_pkg.py @@ -17,13 +17,13 @@ class Base_pkg(_BasePtForecasterV2): Base model package class acting as a high-level wrapper for the Lightning workflow. This class simplifies the user experience by managing model, datamodule, and trainer - configurations, and providing streamlined `fit` and `predict` methods. + configurations, and providing streamlined ``fit`` and ``predict`` methods. Parameters ---------- model_cfg : dict, optional Model configs for the initialisation of the model. Required if not loading - from a checkpoint. Defaults to {}. + from a checkpoint. Defaults to ``{}``. trainer_cfg : dict, optional Configs to initialise ``lightning.Trainer``. Defaults to {}. datamodule_cfg : Union[dict, str, Path], optional @@ -58,8 +58,6 @@ def __init__( self.trainer = None self.datamodule = None - self._build_model() - @classmethod def get_cls(cls): """Get the underlying model class.""" @@ -70,13 +68,32 @@ def get_datamodule_cls(cls): """Get the underlying DataModule class.""" raise NotImplementedError("Subclasses must implement `get_datamodule_cls`.") - def _build_model(self): + @classmethod + def get_test_data(cls, **kwargs): + """ + Creates and returns D1 TimeSeries dataSet objects for testing. + """ + from pytorch_forecasting.tests._data_scenarios import ( + data_with_covariates_v2, + make_datasets_v2, + ) + + raw_data = data_with_covariates_v2() + + datasets_info = make_datasets_v2(raw_data, **kwargs) + + return { + "train": datasets_info["training_dataset"], + "predict": datasets_info["validation_dataset"], + } + + def _build_model(self, metadata: dict): """Instantiates the model, either from a checkpoint or from config.""" model_cls = self.get_cls() if self.ckpt_path: self.model = model_cls.load_from_checkpoint(self.ckpt_path) elif self.model_cfg: - self.model = model_cls(**self.model_cfg) + self.model = model_cls(**self.model_cfg, metadata=metadata) else: self.model = None @@ -108,9 +125,8 @@ def _load_dataloader( def fit( self, - train_data: Union[TimeSeries, LightningDataModule], + data: Union[TimeSeries, LightningDataModule], # todo: we should create a base data_module for different data_modules - val_data: Optional[Union[TimeSeries, LightningDataModule]] = None, save_ckpt: bool = True, ckpt_dir: Union[str, Path] = "checkpoints", **trainer_fit_kwargs, @@ -120,10 +136,9 @@ def fit( Parameters ---------- - train_data : Union[TimeSeries, LightningDataModule] - Training data (D1 or D2 layer). - val_data : Union[TimeSeries, LightningDataModule], optional - Validation data. + data : Union[TimeSeries, LightningDataModule] + The data to fit on (D1 or D2 layer). This object is responsible + for providing both training and validation data. save_ckpt : bool, default=True If True, save the best model checkpoint and the `datamodule_cfg`. ckpt_dir : Union[str, Path], default="checkpoints" @@ -136,17 +151,22 @@ def fit( Optional[Path] The path to the best model checkpoint if `save_ckpt=True`, else None. """ - if self.model is None: - raise RuntimeError( - "Model is not initialized. Provide `model_cfg` or `ckpt_path`." - ) - - if isinstance(train_data, TimeSeries): - self.datamodule = self._build_datamodule(train_data) + if isinstance(data, TimeSeries): + self.datamodule = self._build_datamodule(data) else: - self.datamodule = train_data + self.datamodule = data + self.datamodule.setup(stage="fit") - callbacks = self.trainer_cfg.get("callbacks", []) + if self.model is None: + if not self.model_cfg: + raise RuntimeError( + "`model_cfg` must be provided to train from scratch." + ) + metadata = self.datamodule.metadata + self._build_model(metadata) + + callbacks = self.trainer_cfg.get("callbacks", []).copy() + checkpoint_cb = None if save_ckpt: ckpt_dir = Path(ckpt_dir) ckpt_dir.mkdir(parents=True, exist_ok=True) @@ -158,10 +178,12 @@ def fit( mode="min", ) callbacks.append(checkpoint_cb) + trainer_init_cfg = self.trainer_cfg.copy() + trainer_init_cfg.pop("callbacks", None) - self.trainer = Trainer(**self.trainer_cfg, callbacks=callbacks) - self.trainer.fit(self.model, datamodule=self.datamodule, **trainer_fit_kwargs) + self.trainer = Trainer(**trainer_init_cfg, callbacks=callbacks) + self.trainer.fit(self.model, datamodule=self.datamodule, **trainer_fit_kwargs) if save_ckpt and checkpoint_cb: best_model_path = Path(checkpoint_cb.best_model_path) dm_cfg_path = best_model_path.parent / "datamodule_cfg.pkl" @@ -216,4 +238,4 @@ def predict( print(f"Predictions saved to {output_file}") return None - return self.model.predict(dataloader, **kwargs) + return predictions diff --git a/pytorch_forecasting/callbacks/predict.py b/pytorch_forecasting/callbacks/predict.py index 48e6d3c84..883a92f8b 100644 --- a/pytorch_forecasting/callbacks/predict.py +++ b/pytorch_forecasting/callbacks/predict.py @@ -2,21 +2,19 @@ from warnings import warn from lightning import Trainer +from lightning.pytorch import LightningModule from lightning.pytorch.callbacks import BasePredictionWriter import torch -from pytorch_forecasting.models.base._base_model_v2 import BaseModel - class PredictCallback(BasePredictionWriter): """ Callback to capture predictions and related information internally. - This callback is used by `BaseModel.predict()` to process raw model outputs - into the desired format (`prediction`, `quantiles`, or `raw`) and collect - any additional requested info (`x`, `y`, `index`, etc.). The results are - collated and stored in memory, accessible via the `.result` property. It does - not write to disk. + This callback is used by ``BaseModel.predict()`` to process raw model outputs + into the desired format (``prediction``, ``quantiles``, or ``raw``) and collect + any additional requested info (``x``, ``y``, ``index``, etc.). The results are + collated and stored in memory, accessible via the ``.result`` property. Parameters ---------- @@ -40,16 +38,17 @@ def __init__( self.kwargs = kwargs self._reset_data() - def _reset_data(self): + def _reset_data(self, result: bool = True): """Clear collected data for a new prediction run.""" self.predictions = [] self.info = {key: [] for key in self.return_info} - self._result = None + if result: + self._result = None def on_predict_batch_end( self, trainer: Trainer, - pl_module: BaseModel, + pl_module: LightningModule, outputs: Any, batch: Any, batch_idx: int, @@ -81,7 +80,7 @@ def on_predict_batch_end( else: warn(f"Unknown return_info key: {key}") - def on_predict_epoch_end(self, trainer: Trainer, pl_module: "BaseModel"): + def on_predict_epoch_end(self, trainer: Trainer, pl_module: LightningModule): """Collate all batch results into final tensors.""" if self.mode == "raw" and isinstance(self.predictions[0], dict): keys = self.predictions[0].keys() @@ -103,7 +102,7 @@ def on_predict_epoch_end(self, trainer: Trainer, pl_module: "BaseModel"): final_result[key] = collated_info self._result = final_result - self._reset_data() + self._reset_data(result=False) @property def result(self) -> dict[str, torch.Tensor]: diff --git a/pytorch_forecasting/models/base/_base_model_v2.py b/pytorch_forecasting/models/base/_base_model_v2.py index 31cfc356e..2de069d58 100644 --- a/pytorch_forecasting/models/base/_base_model_v2.py +++ b/pytorch_forecasting/models/base/_base_model_v2.py @@ -137,23 +137,15 @@ def predict( def to_prediction(self, out: dict[str, Any], **kwargs) -> torch.Tensor: """Converts raw model output to point forecasts.""" - if isinstance(self.loss, MultiLoss): - # Assuming first loss is the primary one for prediction - return self.loss.losses[0].to_prediction(out["prediction"][0]) - else: - return self.loss.to_prediction(out["prediction"]) + # todo: add MultiLoss support + return self.loss.to_prediction(out["prediction"]) def to_quantiles(self, out: dict[str, Any], **kwargs) -> torch.Tensor: """Converts raw model output to quantile forecasts.""" + # todo: add MultiLoss support quantiles = kwargs.get("quantiles") # Allow overriding default quantiles - if isinstance(self.loss, MultiLoss): - # Assuming first loss is the primary one for quantiles - loss = self.loss.losses[0] - q = quantiles or loss.quantiles - return loss.to_quantiles(out["prediction"][0], quantiles=q) - else: - q = quantiles or self.loss.quantiles - return self.loss.to_quantiles(out["prediction"], quantiles=q) + q = quantiles or self.loss.quantiles + return self.loss.to_quantiles(out["prediction"], quantiles=q) def training_step( self, batch: tuple[dict[str, torch.Tensor]], batch_idx: int diff --git a/pytorch_forecasting/models/dlinear/_dlinear_pkg_v2.py b/pytorch_forecasting/models/dlinear/_dlinear_pkg_v2.py index bf4fffce5..500446d9d 100644 --- a/pytorch_forecasting/models/dlinear/_dlinear_pkg_v2.py +++ b/pytorch_forecasting/models/dlinear/_dlinear_pkg_v2.py @@ -2,10 +2,10 @@ Packages container for DLinear model. """ -from pytorch_forecasting.models.base._base_object import _BasePtForecasterV2 +from pytorch_forecasting.base._base_pkg import Base_pkg -class DLinear_pkg_v2(_BasePtForecasterV2): +class DLinear_pkg_v2(Base_pkg): """DLinear package container.""" _tags = { @@ -26,6 +26,13 @@ def get_cls(cls): return DLinear + @classmethod + def get_datamodule_cls(cls): + """Get the underlying DataModule class.""" + from pytorch_forecasting.data._tslib_data_module import TslibDataModule + + return TslibDataModule + @classmethod def _get_test_datamodule_from(cls, trainer_kwargs): """Create test dataloaders from trainer_kwargs - following v1 pattern.""" @@ -112,7 +119,7 @@ def get_test_train_params(cls): from pytorch_forecasting.metrics import MAE, MAPE, SMAPE, QuantileLoss - return [ + params = [ {}, dict(moving_avg=25, individual=False, logging_metrics=[SMAPE()]), dict( @@ -125,3 +132,13 @@ def get_test_train_params(cls): logging_metrics=[SMAPE()], ), ] + + default_dm_cfg = {"context_length": 8, "prediction_length": 2} + + for param in params: + current_dm_cfg = param.get("datamodule_cfg", {}) + default_dm_cfg.update(current_dm_cfg) + + param["datamodule_cfg"] = default_dm_cfg + + return params diff --git a/pytorch_forecasting/models/samformer/_samformer_v2_pkg.py b/pytorch_forecasting/models/samformer/_samformer_v2_pkg.py index 36db9340a..2838fcc91 100644 --- a/pytorch_forecasting/models/samformer/_samformer_v2_pkg.py +++ b/pytorch_forecasting/models/samformer/_samformer_v2_pkg.py @@ -2,10 +2,10 @@ Samformer package container. """ -from pytorch_forecasting.models.base._base_object import _BasePtForecasterV2 +from pytorch_forecasting.base._base_pkg import Base_pkg -class Samformer_pkg_v2(_BasePtForecasterV2): +class Samformer_pkg_v2(Base_pkg): """Samformer package container.""" _tags = { @@ -21,83 +21,13 @@ def get_cls(cls): return Samformer @classmethod - def _get_test_datamodule_from(cls, trainer_kwargs): - """Create test dataloaders from trainer_kwargs - following v1 pattern.""" + def get_datamodule_cls(cls): + """Get the underlying DataModule class.""" from pytorch_forecasting.data.data_module import ( EncoderDecoderTimeSeriesDataModule, ) - from pytorch_forecasting.tests._data_scenarios import ( - data_with_covariates_v2, - make_datasets_v2, - ) - - data_with_covariates = data_with_covariates_v2() - - data_loader_default_kwargs = dict( - target="target", - group_ids=["agency_encoded", "sku_encoded"], - add_relative_time_idx=True, - ) - - data_loader_kwargs = trainer_kwargs.get("data_loader_kwargs", {}) - data_loader_default_kwargs.update(data_loader_kwargs) - datasets_info = make_datasets_v2( - data_with_covariates, **data_loader_default_kwargs - ) - - training_dataset = datasets_info["training_dataset"] - validation_dataset = datasets_info["validation_dataset"] - training_max_time_idx = datasets_info["training_max_time_idx"] - - max_encoder_length = data_loader_kwargs.get("max_encoder_length", 4) - max_prediction_length = data_loader_kwargs.get("max_prediction_length", 3) - add_relative_time_idx = data_loader_kwargs.get("add_relative_time_idx", True) - batch_size = data_loader_kwargs.get("batch_size", 2) - - train_datamodule = EncoderDecoderTimeSeriesDataModule( - time_series_dataset=training_dataset, - max_encoder_length=max_encoder_length, - max_prediction_length=max_prediction_length, - add_relative_time_idx=add_relative_time_idx, - batch_size=batch_size, - train_val_test_split=(0.8, 0.2, 0.0), - ) - - val_datamodule = EncoderDecoderTimeSeriesDataModule( - time_series_dataset=validation_dataset, - max_encoder_length=max_encoder_length, - max_prediction_length=max_prediction_length, - min_prediction_idx=training_max_time_idx, - add_relative_time_idx=add_relative_time_idx, - batch_size=batch_size, - train_val_test_split=(0.0, 1.0, 0.0), - ) - - test_datamodule = EncoderDecoderTimeSeriesDataModule( - time_series_dataset=validation_dataset, - max_encoder_length=max_encoder_length, - max_prediction_length=max_prediction_length, - min_prediction_idx=training_max_time_idx, - add_relative_time_idx=add_relative_time_idx, - batch_size=1, - train_val_test_split=(0.0, 0.0, 1.0), - ) - - train_datamodule.setup("fit") - val_datamodule.setup("fit") - test_datamodule.setup("test") - - train_dataloader = train_datamodule.train_dataloader() - val_dataloader = val_datamodule.val_dataloader() - test_dataloader = test_datamodule.test_dataloader() - - return { - "train": train_dataloader, - "val": val_dataloader, - "test": test_dataloader, - "data_module": train_datamodule, - } + return EncoderDecoderTimeSeriesDataModule @classmethod def get_test_train_params(cls): @@ -115,7 +45,7 @@ def get_test_train_params(cls): from pytorch_forecasting.metrics import QuantileLoss - return [ + params = [ { # "loss": nn.MSELoss(), "hidden_size": 32, @@ -134,3 +64,13 @@ def get_test_train_params(cls): "use_revin": False, }, ] + + default_dm_cfg = {"max_encoder_length": 4, "max_prediction_length": 3} + + for param in params: + current_dm_cfg = param.get("datamodule_cfg", {}) + default_dm_cfg.update(current_dm_cfg) + + param["datamodule_cfg"] = default_dm_cfg + + return params diff --git a/pytorch_forecasting/models/temporal_fusion_transformer/_tft_pkg_v2.py b/pytorch_forecasting/models/temporal_fusion_transformer/_tft_pkg_v2.py index 8c95daa6b..d121eba6e 100644 --- a/pytorch_forecasting/models/temporal_fusion_transformer/_tft_pkg_v2.py +++ b/pytorch_forecasting/models/temporal_fusion_transformer/_tft_pkg_v2.py @@ -1,9 +1,9 @@ """TFT package container.""" -from pytorch_forecasting.models.base import _BasePtForecasterV2 +from pytorch_forecasting.base._base_pkg import Base_pkg -class TFT_pkg_v2(_BasePtForecasterV2): +class TFT_pkg_v2(Base_pkg): """TFT package container.""" _tags = { @@ -23,83 +23,13 @@ def get_cls(cls): return TFT @classmethod - def _get_test_datamodule_from(cls, trainer_kwargs): - """Create test dataloaders from trainer_kwargs - following v1 pattern.""" + def get_datamodule_cls(cls): + """Get the underlying DataModule class.""" from pytorch_forecasting.data.data_module import ( EncoderDecoderTimeSeriesDataModule, ) - from pytorch_forecasting.tests._data_scenarios import ( - data_with_covariates_v2, - make_datasets_v2, - ) - - data_with_covariates = data_with_covariates_v2() - - data_loader_default_kwargs = dict( - target="target", - group_ids=["agency_encoded", "sku_encoded"], - add_relative_time_idx=True, - ) - - data_loader_kwargs = trainer_kwargs.get("data_loader_kwargs", {}) - data_loader_default_kwargs.update(data_loader_kwargs) - - datasets_info = make_datasets_v2( - data_with_covariates, **data_loader_default_kwargs - ) - - training_dataset = datasets_info["training_dataset"] - validation_dataset = datasets_info["validation_dataset"] - training_max_time_idx = datasets_info["training_max_time_idx"] - - max_encoder_length = data_loader_kwargs.get("max_encoder_length", 4) - max_prediction_length = data_loader_kwargs.get("max_prediction_length", 3) - add_relative_time_idx = data_loader_kwargs.get("add_relative_time_idx", True) - batch_size = data_loader_kwargs.get("batch_size", 2) - train_datamodule = EncoderDecoderTimeSeriesDataModule( - time_series_dataset=training_dataset, - max_encoder_length=max_encoder_length, - max_prediction_length=max_prediction_length, - add_relative_time_idx=add_relative_time_idx, - batch_size=batch_size, - train_val_test_split=(0.8, 0.2, 0.0), - ) - - val_datamodule = EncoderDecoderTimeSeriesDataModule( - time_series_dataset=validation_dataset, - max_encoder_length=max_encoder_length, - max_prediction_length=max_prediction_length, - min_prediction_idx=training_max_time_idx, - add_relative_time_idx=add_relative_time_idx, - batch_size=batch_size, - train_val_test_split=(0.0, 1.0, 0.0), - ) - - test_datamodule = EncoderDecoderTimeSeriesDataModule( - time_series_dataset=validation_dataset, - max_encoder_length=max_encoder_length, - max_prediction_length=max_prediction_length, - min_prediction_idx=training_max_time_idx, - add_relative_time_idx=add_relative_time_idx, - batch_size=1, - train_val_test_split=(0.0, 0.0, 1.0), - ) - - train_datamodule.setup("fit") - val_datamodule.setup("fit") - test_datamodule.setup("test") - - train_dataloader = train_datamodule.train_dataloader() - val_dataloader = val_datamodule.val_dataloader() - test_dataloader = test_datamodule.test_dataloader() - - return { - "train": train_dataloader, - "val": val_dataloader, - "test": test_dataloader, - "data_module": train_datamodule, - } + return EncoderDecoderTimeSeriesDataModule @classmethod def get_test_train_params(cls): @@ -113,19 +43,17 @@ def get_test_train_params(cls): `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance. `create_test_instance` uses the first (or only) dictionary in `params` """ - return [ + params = [ {}, dict( hidden_size=25, attention_head_size=5, ), - dict( - data_loader_kwargs=dict(max_encoder_length=5, max_prediction_length=3) - ), + dict(datamodule_cfg=dict(max_encoder_length=5, max_prediction_length=3)), dict( hidden_size=24, attention_head_size=8, - data_loader_kwargs=dict( + datamodule_cfg=dict( max_encoder_length=5, max_prediction_length=3, add_relative_time_idx=False, @@ -133,7 +61,17 @@ def get_test_train_params(cls): ), dict( hidden_size=12, - data_loader_kwargs=dict(max_encoder_length=7, max_prediction_length=10), + datamodule_cfg=dict(max_encoder_length=7, max_prediction_length=10), ), dict(attention_head_size=2), ] + + default_dm_cfg = {"max_encoder_length": 4, "max_prediction_length": 3} + + for param in params: + current_dm_cfg = param.get("datamodule_cfg", {}) + default_dm_cfg.update(current_dm_cfg) + + param["datamodule_cfg"] = default_dm_cfg + + return params diff --git a/pytorch_forecasting/models/tide/_tide_dsipts/_tide_v2_pkg.py b/pytorch_forecasting/models/tide/_tide_dsipts/_tide_v2_pkg.py index d3cf70454..6b2780053 100644 --- a/pytorch_forecasting/models/tide/_tide_dsipts/_tide_v2_pkg.py +++ b/pytorch_forecasting/models/tide/_tide_dsipts/_tide_v2_pkg.py @@ -1,9 +1,9 @@ """TIDE package container.""" -from pytorch_forecasting.models.base._base_object import _BasePtForecasterV2 +from pytorch_forecasting.base._base_pkg import Base_pkg -class TIDE_pkg_v2(_BasePtForecasterV2): +class TIDE_pkg_v2(Base_pkg): """TIDE package container.""" _tags = { @@ -19,83 +19,13 @@ def get_cls(cls): return TIDE @classmethod - def _get_test_datamodule_from(cls, trainer_kwargs): - """Create test dataloaders from trainer_kwargs - following v1 pattern.""" + def get_datamodule_cls(cls): + """Get the underlying DataModule class.""" from pytorch_forecasting.data.data_module import ( EncoderDecoderTimeSeriesDataModule, ) - from pytorch_forecasting.tests._data_scenarios import ( - data_with_covariates_v2, - make_datasets_v2, - ) - - data_with_covariates = data_with_covariates_v2() - - data_loader_default_kwargs = dict( - target="target", - group_ids=["agency_encoded", "sku_encoded"], - add_relative_time_idx=True, - ) - - data_loader_kwargs = trainer_kwargs.get("data_loader_kwargs", {}) - data_loader_default_kwargs.update(data_loader_kwargs) - - datasets_info = make_datasets_v2( - data_with_covariates, **data_loader_default_kwargs - ) - - training_dataset = datasets_info["training_dataset"] - validation_dataset = datasets_info["validation_dataset"] - training_max_time_idx = datasets_info["training_max_time_idx"] - - max_encoder_length = data_loader_kwargs.get("max_encoder_length", 4) - max_prediction_length = data_loader_kwargs.get("max_prediction_length", 3) - add_relative_time_idx = data_loader_kwargs.get("add_relative_time_idx", True) - batch_size = data_loader_kwargs.get("batch_size", 2) - - train_datamodule = EncoderDecoderTimeSeriesDataModule( - time_series_dataset=training_dataset, - max_encoder_length=max_encoder_length, - max_prediction_length=max_prediction_length, - add_relative_time_idx=add_relative_time_idx, - batch_size=batch_size, - train_val_test_split=(0.8, 0.2, 0.0), - ) - - val_datamodule = EncoderDecoderTimeSeriesDataModule( - time_series_dataset=validation_dataset, - max_encoder_length=max_encoder_length, - max_prediction_length=max_prediction_length, - min_prediction_idx=training_max_time_idx, - add_relative_time_idx=add_relative_time_idx, - batch_size=batch_size, - train_val_test_split=(0.0, 1.0, 0.0), - ) - - test_datamodule = EncoderDecoderTimeSeriesDataModule( - time_series_dataset=validation_dataset, - max_encoder_length=max_encoder_length, - max_prediction_length=max_prediction_length, - min_prediction_idx=training_max_time_idx, - add_relative_time_idx=add_relative_time_idx, - batch_size=1, - train_val_test_split=(0.0, 0.0, 1.0), - ) - train_datamodule.setup("fit") - val_datamodule.setup("fit") - test_datamodule.setup("test") - - train_dataloader = train_datamodule.train_dataloader() - val_dataloader = val_datamodule.val_dataloader() - test_dataloader = test_datamodule.test_dataloader() - - return { - "train": train_dataloader, - "val": val_dataloader, - "test": test_dataloader, - "data_module": train_datamodule, - } + return EncoderDecoderTimeSeriesDataModule @classmethod def get_test_train_params(cls): @@ -111,7 +41,7 @@ def get_test_train_params(cls): """ from pytorch_forecasting.metrics import MAE, MAPE - return [ + params = [ dict( hidden_size=16, d_model=8, @@ -125,7 +55,7 @@ def get_test_train_params(cls): n_add_enc=2, n_add_dec=2, dropout_rate=0.2, - data_loader_kwargs=dict(max_encoder_length=5, max_prediction_length=3), + datamodule_cfg=dict(max_encoder_length=5, max_prediction_length=3), loss=MAE(), ), dict( @@ -134,7 +64,16 @@ def get_test_train_params(cls): n_add_enc=3, n_add_dec=2, dropout_rate=0.1, - data_loader_kwargs=dict(max_encoder_length=4, max_prediction_length=2), + datamodule_cfg=dict(max_encoder_length=4, max_prediction_length=2), loss=MAPE(), ), ] + default_dm_cfg = {"max_encoder_length": 4, "max_prediction_length": 3} + + for param in params: + current_dm_cfg = param.get("datamodule_cfg", {}) + default_dm_cfg.update(current_dm_cfg) + + param["datamodule_cfg"] = default_dm_cfg + + return params diff --git a/pytorch_forecasting/models/timexer/_timexer_pkg_v2.py b/pytorch_forecasting/models/timexer/_timexer_pkg_v2.py index a0e4b8aa7..edff00024 100644 --- a/pytorch_forecasting/models/timexer/_timexer_pkg_v2.py +++ b/pytorch_forecasting/models/timexer/_timexer_pkg_v2.py @@ -2,10 +2,10 @@ Metadata container for TimeXer v2. """ -from pytorch_forecasting.models.base._base_object import _BasePtForecasterV2 +from pytorch_forecasting.base._base_pkg import Base_pkg -class TimeXer_pkg_v2(_BasePtForecasterV2): +class TimeXer_pkg_v2(Base_pkg): """TimeXer metadata container.""" _tags = { @@ -25,77 +25,11 @@ def get_cls(cls): return TimeXer @classmethod - def _get_test_datamodule_from(cls, trainer_kwargs): - """Create test dataloaders from trainer_kwargs - following v1 pattern.""" + def get_datamodule_cls(cls): + """Get the underlying DataModule class.""" from pytorch_forecasting.data._tslib_data_module import TslibDataModule - from pytorch_forecasting.tests._data_scenarios import ( - data_with_covariates_v2, - make_datasets_v2, - ) - data_with_covariates = data_with_covariates_v2() - - data_loader_default_kwargs = dict( - target="target", - group_ids=["agency_encoded", "sku_encoded"], - add_relative_time_idx=True, - ) - - data_loader_kwargs = trainer_kwargs.get("data_loader_kwargs", {}) - data_loader_default_kwargs.update(data_loader_kwargs) - - datasets_info = make_datasets_v2( - data_with_covariates, **data_loader_default_kwargs - ) - - training_dataset = datasets_info["training_dataset"] - validation_dataset = datasets_info["validation_dataset"] - - context_length = data_loader_kwargs.get("context_length", 12) - prediction_length = data_loader_kwargs.get("prediction_length", 4) - batch_size = data_loader_kwargs.get("batch_size", 2) - - train_datamodule = TslibDataModule( - time_series_dataset=training_dataset, - context_length=context_length, - prediction_length=prediction_length, - add_relative_time_idx=data_loader_kwargs.get("add_relative_time_idx", True), - batch_size=batch_size, - train_val_test_split=(0.8, 0.2, 0.0), - ) - - val_datamodule = TslibDataModule( - time_series_dataset=validation_dataset, - context_length=context_length, - prediction_length=prediction_length, - add_relative_time_idx=data_loader_kwargs.get("add_relative_time_idx", True), - batch_size=batch_size, - train_val_test_split=(0.0, 1.0, 0.0), - ) - - test_datamodule = TslibDataModule( - time_series_dataset=validation_dataset, - context_length=context_length, - prediction_length=prediction_length, - add_relative_time_idx=data_loader_kwargs.get("add_relative_time_idx", True), - batch_size=1, - train_val_test_split=(0.0, 0.0, 1.0), - ) - - train_datamodule.setup("fit") - val_datamodule.setup("fit") - test_datamodule.setup("test") - - train_dataloader = train_datamodule.train_dataloader() - val_dataloader = val_datamodule.val_dataloader() - test_dataloader = test_datamodule.test_dataloader() - - return { - "train": train_dataloader, - "val": val_dataloader, - "test": test_dataloader, - "data_module": train_datamodule, - } + return TslibDataModule @classmethod def get_test_train_params(cls): @@ -111,17 +45,17 @@ def get_test_train_params(cls): """ from pytorch_forecasting.metrics import QuantileLoss - return [ + params = [ {}, dict( hidden_size=64, n_heads=4, ), - dict(data_loader_kwargs=dict(context_length=12, prediction_length=3)), + dict(datamodule_cfg=dict(context_length=12, prediction_length=3)), dict( hidden_size=32, n_heads=2, - data_loader_kwargs=dict( + datamodule_cfg=dict( context_length=12, prediction_length=3, add_relative_time_idx=False, @@ -130,7 +64,7 @@ def get_test_train_params(cls): dict( hidden_size=128, patch_length=12, - data_loader_kwargs=dict(context_length=16, prediction_length=4), + datamodule_cfg=dict(context_length=16, prediction_length=4), ), dict( n_heads=2, @@ -156,10 +90,19 @@ def get_test_train_params(cls): factor=2, activation="relu", dropout=0.05, - data_loader_kwargs=dict( + datamodule_cfg=dict( context_length=16, prediction_length=4, ), loss=QuantileLoss(quantiles=[0.1, 0.5, 0.9]), ), ] + default_dm_cfg = {"context_length": 12, "prediction_length": 4} + + for param in params: + current_dm_cfg = param.get("datamodule_cfg", {}) + default_dm_cfg.update(current_dm_cfg) + + param["datamodule_cfg"] = default_dm_cfg + + return params diff --git a/pytorch_forecasting/tests/test_all_estimators_v2.py b/pytorch_forecasting/tests/test_all_estimators_v2.py index 9c28c5d0a..da511e153 100644 --- a/pytorch_forecasting/tests/test_all_estimators_v2.py +++ b/pytorch_forecasting/tests/test_all_estimators_v2.py @@ -1,6 +1,7 @@ """Automated tests based on the skbase test suite template.""" import shutil +from typing import Any, Optional import lightning.pytorch as pl from lightning.pytorch.callbacks import EarlyStopping @@ -8,6 +9,8 @@ import torch import torch.nn as nn +from pytorch_forecasting.base._base_pkg import Base_pkg +from pytorch_forecasting.data import TimeSeries from pytorch_forecasting.metrics import SMAPE from pytorch_forecasting.tests.test_all_estimators import ( EstimatorFixtureGenerator, @@ -20,77 +23,68 @@ def _integration( - estimator_cls, - dataloaders, - tmp_path, - data_loader_kwargs={}, - clip_target: bool = False, - trainer_kwargs=None, + estimator_cls: type[Base_pkg], + test_data: dict[str, TimeSeries], + model_cfg: dict[str, Any], + datamodule_cfg: dict[str, Any], + tmp_path: str, + trainer_cfg: Optional[dict[str, Any]] = None, **kwargs, ): - train_dataloader = dataloaders["train"] - val_dataloader = dataloaders["val"] - test_dataloader = dataloaders["test"] + train_data = test_data["train"] + predict_data = test_data["predict"] - early_stop_callback = EarlyStopping( - monitor="val_loss", min_delta=1e-4, patience=1, verbose=False, mode="min" - ) + default_model_cfg = {"loss": SMAPE()} + + default_datamodule_cfg = { + "train_val_test_split": (0.8, 0.2), + "add_relative_time_idx": True, + "batch_size": 2, + } logger = TensorBoardLogger(tmp_path) - if trainer_kwargs is None: - trainer_kwargs = {} - trainer = pl.Trainer( - max_epochs=3, - gradient_clip_val=0.1, - callbacks=[early_stop_callback], - enable_checkpointing=True, - default_root_dir=tmp_path, - limit_train_batches=2, - limit_val_batches=2, - limit_test_batches=2, - logger=logger, - **trainer_kwargs, - ) - training_data_module = dataloaders.get("data_module") - metadata = training_data_module.metadata - - assert isinstance( - metadata, dict - ), f"Expected metadata to be dict, got {type(metadata)}" - - if "loss" in kwargs: - loss = kwargs["loss"] - kwargs.pop("loss") - else: - loss = SMAPE() - - net = estimator_cls( - metadata=metadata, - loss=loss, - **kwargs, + default_trainer_cfg = { + "max_epochs": 3, + "gradient_clip_val": 0.1, + "enable_checkpointing": True, + "default_root_dir": tmp_path, + "limit_train_batches": 2, + "limit_val_batches": 2, + "logger": logger, + } + default_model_cfg.update(model_cfg) + default_datamodule_cfg.update(datamodule_cfg) + if trainer_cfg is not None: + default_trainer_cfg.update(trainer_cfg) + + pkg = estimator_cls( + model_cfg=default_model_cfg, + trainer_cfg=default_trainer_cfg, + datamodule_cfg=default_datamodule_cfg, ) - trainer.fit( - net, - train_dataloaders=train_dataloader, - val_dataloaders=val_dataloader, - ) - test_outputs = trainer.test(net, dataloaders=test_dataloader) - assert len(test_outputs) > 0 - - # todo: add the predict pipeline and make this test cleaner - x, y = next(iter(test_dataloader)) - net.eval() - with torch.no_grad(): - output = net(x) - net.train() - prediction = output["prediction"] - n_dims = prediction.ndim - assert n_dims == 3, ( - f"Prediction output must be 3D, but got {n_dims}D tensor " - f"with shape {output.shape}" + pkg.fit(train_data) + + predictions = pkg.predict( + predict_data, + mode="raw", ) + assert predictions is not None + assert isinstance(predictions, dict) + assert "prediction" in predictions + + pred_tensor = predictions["prediction"] + assert isinstance(pred_tensor, torch.Tensor) + assert pred_tensor.ndim == 3, f"Prediction must be 3D, got {pred_tensor.ndim}D" + + expected_pred_len = datamodule_cfg.get("prediction_length") + if expected_pred_len: + assert pred_tensor.shape[1] == expected_pred_len, ( + f"Pred length mismatch: expected {expected_pred_len}, " + f"got {pred_tensor.shape[1]}" + ) + shutil.rmtree(tmp_path, ignore_errors=True) @@ -111,10 +105,19 @@ def test_integration( trainer_kwargs, tmp_path, ): - object_class = object_pkg.get_cls() - dataloaders = object_pkg._get_test_datamodule_from(trainer_kwargs) - - _integration(object_class, dataloaders, tmp_path, **trainer_kwargs) + params_copy = trainer_kwargs.copy() + datamodule_cfg = params_copy.pop("datamodule_cfg", {}) + model_cfg = params_copy + + test_data = object_pkg.get_test_data(**datamodule_cfg) + + _integration( + estimator_cls=object_pkg, + test_data=test_data, + model_cfg=model_cfg, + datamodule_cfg=datamodule_cfg, + tmp_path=tmp_path, + ) def test_pkg_linkage(self, object_pkg, object_class): """Test that the package is linked correctly.""" From 882caba53245bcdfe33d672ca40df78d32244e97 Mon Sep 17 00:00:00 2001 From: Aryan Saini Date: Sat, 18 Oct 2025 23:33:28 +0530 Subject: [PATCH 04/13] update base model --- pytorch_forecasting/models/base/_base_model_v2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_forecasting/models/base/_base_model_v2.py b/pytorch_forecasting/models/base/_base_model_v2.py index 2de069d58..5b2de1d39 100644 --- a/pytorch_forecasting/models/base/_base_model_v2.py +++ b/pytorch_forecasting/models/base/_base_model_v2.py @@ -143,7 +143,7 @@ def to_prediction(self, out: dict[str, Any], **kwargs) -> torch.Tensor: def to_quantiles(self, out: dict[str, Any], **kwargs) -> torch.Tensor: """Converts raw model output to quantile forecasts.""" # todo: add MultiLoss support - quantiles = kwargs.get("quantiles") # Allow overriding default quantiles + quantiles = kwargs.get("quantiles") q = quantiles or self.loss.quantiles return self.loss.to_quantiles(out["prediction"], quantiles=q) From c53f88193986a4d528d042a58be4b6a646bdf622 Mon Sep 17 00:00:00 2001 From: Aryan Saini Date: Sat, 18 Oct 2025 23:35:51 +0530 Subject: [PATCH 05/13] update base model --- pytorch_forecasting/base/_base_pkg.py | 2 +- pytorch_forecasting/models/base/_base_model_v2.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pytorch_forecasting/base/_base_pkg.py b/pytorch_forecasting/base/_base_pkg.py index 340e9e742..98b19dba1 100644 --- a/pytorch_forecasting/base/_base_pkg.py +++ b/pytorch_forecasting/base/_base_pkg.py @@ -69,7 +69,7 @@ def get_datamodule_cls(cls): raise NotImplementedError("Subclasses must implement `get_datamodule_cls`.") @classmethod - def get_test_data(cls, **kwargs): + def get_test_dataset_from(cls, **kwargs): """ Creates and returns D1 TimeSeries dataSet objects for testing. """ diff --git a/pytorch_forecasting/models/base/_base_model_v2.py b/pytorch_forecasting/models/base/_base_model_v2.py index 5b2de1d39..b919b6282 100644 --- a/pytorch_forecasting/models/base/_base_model_v2.py +++ b/pytorch_forecasting/models/base/_base_model_v2.py @@ -123,7 +123,6 @@ def predict( trainer_kwargs = kwargs.pop("trainer_kwargs", {}) predict_callback = PredictCallback(mode=mode, return_info=return_info, **kwargs) - # Ensure callbacks list exists and append the new one callbacks = trainer_kwargs.get("callbacks", []) if not isinstance(callbacks, list): callbacks = [callbacks] From f8d06fe749e8d8ae99f4252e20c903a1997bffd3 Mon Sep 17 00:00:00 2001 From: Aryan Saini Date: Sun, 19 Oct 2025 00:04:24 +0530 Subject: [PATCH 06/13] update test_integration --- pytorch_forecasting/tests/test_all_estimators_v2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_forecasting/tests/test_all_estimators_v2.py b/pytorch_forecasting/tests/test_all_estimators_v2.py index da511e153..86b819fc8 100644 --- a/pytorch_forecasting/tests/test_all_estimators_v2.py +++ b/pytorch_forecasting/tests/test_all_estimators_v2.py @@ -109,7 +109,7 @@ def test_integration( datamodule_cfg = params_copy.pop("datamodule_cfg", {}) model_cfg = params_copy - test_data = object_pkg.get_test_data(**datamodule_cfg) + test_data = object_pkg.get_test_dataset_from(**datamodule_cfg) _integration( estimator_cls=object_pkg, From 5024fcb9ee661b5324d954be5faa11b114eef14b Mon Sep 17 00:00:00 2001 From: Aryan Saini Date: Sun, 2 Nov 2025 01:56:59 +0530 Subject: [PATCH 07/13] hadnle kwargs --- pytorch_forecasting/callbacks/predict.py | 8 ++--- .../models/base/_base_model_v2.py | 29 +++++++++++++------ 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/pytorch_forecasting/callbacks/predict.py b/pytorch_forecasting/callbacks/predict.py index 883a92f8b..0d4dab719 100644 --- a/pytorch_forecasting/callbacks/predict.py +++ b/pytorch_forecasting/callbacks/predict.py @@ -30,12 +30,12 @@ def __init__( self, mode: str = "prediction", return_info: Optional[list[str]] = None, - **kwargs, + mode_kwargs: dict[str, Any] = None, ): super().__init__(write_interval="epoch") self.mode = mode self.return_info = return_info or [] - self.kwargs = kwargs + self.mode_kwargs = mode_kwargs or {} self._reset_data() def _reset_data(self, result: bool = True): @@ -60,9 +60,9 @@ def on_predict_batch_end( if self.mode == "raw": processed_output = outputs elif self.mode == "prediction": - processed_output = pl_module.to_prediction(outputs, **self.kwargs) + processed_output = pl_module.to_prediction(outputs, **self.mode_kwargs) elif self.mode == "quantiles": - processed_output = pl_module.to_quantiles(outputs, **self.kwargs) + processed_output = pl_module.to_quantiles(outputs, **self.mode_kwargs) else: raise ValueError(f"Invalid prediction mode: {self.mode}") diff --git a/pytorch_forecasting/models/base/_base_model_v2.py b/pytorch_forecasting/models/base/_base_model_v2.py index b919b6282..e0affe943 100644 --- a/pytorch_forecasting/models/base/_base_model_v2.py +++ b/pytorch_forecasting/models/base/_base_model_v2.py @@ -99,7 +99,8 @@ def predict( dataloader: DataLoader, mode: str = "prediction", return_info: Optional[list[str]] = None, - **kwargs, + mode_kwargs: dict[str, Any] = None, + trainer_kwargs: dict[str, Any] = None, ) -> dict[str, torch.Tensor]: """ Generate predictions for new data using the `lightning.Trainer`. @@ -112,16 +113,20 @@ def predict( The prediction mode ("prediction", "quantiles", or "raw"). return_info : list[str], optional A list of additional information to return. - **kwargs : - Additional arguments for `to_prediction`/`to_quantiles` or `Trainer`. + mode_kwargs : dict[str, Any] + Additional arguments for `to_prediction`/`to_quantiles`. + trainer_kwargs: dict[str, Any] + Additional arguments for `Trainer`. Returns ------- dict[str, torch.Tensor] A dictionary of prediction results. """ - trainer_kwargs = kwargs.pop("trainer_kwargs", {}) - predict_callback = PredictCallback(mode=mode, return_info=return_info, **kwargs) + trainer_kwargs = trainer_kwargs or {} + predict_callback = PredictCallback( + mode=mode, return_info=return_info, mode_kwargs=mode_kwargs + ) callbacks = trainer_kwargs.get("callbacks", []) if not isinstance(callbacks, list): @@ -137,14 +142,20 @@ def predict( def to_prediction(self, out: dict[str, Any], **kwargs) -> torch.Tensor: """Converts raw model output to point forecasts.""" # todo: add MultiLoss support - return self.loss.to_prediction(out["prediction"]) + try: + out = self.loss.to_prediction(out["prediction"], **kwargs) + except TypeError: # in case passed kwargs do not exist + out = self.loss.to_prediction(out["prediction"]) + return out def to_quantiles(self, out: dict[str, Any], **kwargs) -> torch.Tensor: """Converts raw model output to quantile forecasts.""" # todo: add MultiLoss support - quantiles = kwargs.get("quantiles") - q = quantiles or self.loss.quantiles - return self.loss.to_quantiles(out["prediction"], quantiles=q) + try: + out = self.loss.to_quantiles(out["prediction"], **kwargs) + except TypeError: # in case passed kwargs do not exist + out = self.loss.to_quantiles(out["prediction"]) + return out def training_step( self, batch: tuple[dict[str, torch.Tensor]], batch_idx: int From 8e048cd385428480ef6059e2c3abede6088f7a2d Mon Sep 17 00:00:00 2001 From: Aryan Saini Date: Sun, 7 Dec 2025 00:50:34 +0530 Subject: [PATCH 08/13] add tests for checkpoints and predict modes --- pytorch_forecasting/base/_base_pkg.py | 113 +++++++++++--- .../models/tide/_tide_dsipts/_tide_v2.py | 2 +- .../tests/test_all_estimators_v2.py | 140 ------------------ .../tests/test_all_v2/__init__.py | 0 .../tests/test_all_v2/_test_integration.py | 35 +++++ .../test_all_v2/test_all_estimators_v2.py | 134 +++++++++++++++++ .../tests/test_all_v2/utils.py | 61 ++++++++ .../tests/test_class_register.py | 4 +- 8 files changed, 324 insertions(+), 165 deletions(-) delete mode 100644 pytorch_forecasting/tests/test_all_estimators_v2.py create mode 100644 pytorch_forecasting/tests/test_all_v2/__init__.py create mode 100644 pytorch_forecasting/tests/test_all_v2/_test_integration.py create mode 100644 pytorch_forecasting/tests/test_all_v2/test_all_estimators_v2.py create mode 100644 pytorch_forecasting/tests/test_all_v2/utils.py diff --git a/pytorch_forecasting/base/_base_pkg.py b/pytorch_forecasting/base/_base_pkg.py index 98b19dba1..03df99ec9 100644 --- a/pytorch_forecasting/base/_base_pkg.py +++ b/pytorch_forecasting/base/_base_pkg.py @@ -7,6 +7,7 @@ from lightning.pytorch.core.datamodule import LightningDataModule import torch from torch.utils.data import DataLoader +import yaml from pytorch_forecasting.data import TimeSeries from pytorch_forecasting.models.base._base_object import _BasePtForecasterV2 @@ -39,24 +40,71 @@ class Base_pkg(_BasePtForecasterV2): def __init__( self, - model_cfg: Optional[dict[str, Any]] = None, - trainer_cfg: Optional[dict[str, Any]] = None, + model_cfg: Optional[Union[dict[str, Any], str, Path]] = None, + trainer_cfg: Optional[Union[dict[str, Any], str, Path]] = None, datamodule_cfg: Optional[Union[dict[str, Any], str, Path]] = None, ckpt_path: Optional[Union[str, Path]] = None, ): - self.model_cfg = model_cfg or {} - self.trainer_cfg = trainer_cfg or {} self.ckpt_path = Path(ckpt_path) if ckpt_path else None + self.model_cfg = self._load_config( + model_cfg, ckpt_path=self.ckpt_path, auto_file_name="model_cfg.pkl" + ) + print(self.model_cfg) - if isinstance(datamodule_cfg, (str, Path)): - with open(datamodule_cfg, "rb") as f: - self.datamodule_cfg = pickle.load(f) # noqa : S301 - else: - self.datamodule_cfg = datamodule_cfg or {} + self.datamodule_cfg = self._load_config( + datamodule_cfg, + ckpt_path=self.ckpt_path, + auto_file_name="datamodule_cfg.pkl", + ) + self.trainer_cfg = self._load_config(trainer_cfg) + self.metadata = self._load_config( + None, ckpt_path=self.ckpt_path, auto_file_name="metadata.pkl" + ) self.model = None self.trainer = None self.datamodule = None + if self.ckpt_path: + print(self.metadata) + self._build_model(metadata=self.metadata, **self.model_cfg) + else: + self.model = None + + @staticmethod + def _load_config( + config: Union[dict, str, Path, None], + ckpt_path: Optional[Union[str, Path]] = None, + auto_file_name: Optional[str] = None, + ) -> dict: + """ + Loads configuration from a dictionary, YAML file, or Pickle file. + """ + if config is None: + if ckpt_path and auto_file_name: + path = Path(ckpt_path).parent / auto_file_name + if path.exists(): + with open(path, "rb") as f: + return pickle.load(f) # noqa : S301 + return {} + + if isinstance(config, dict): + return config + + path = Path(config) + if not path.exists(): + raise FileNotFoundError(f"Configuration file not found: {path}") + + suffix = path.suffix.lower() + print(suffix) + + if suffix in [".yaml", ".yml"]: + with open(path) as f: + return yaml.safe_load(f) or {} + + else: + raise ValueError( + f"Unsupported config format: {suffix}. Use .yaml, .yml, or .pkl" + ) @classmethod def get_cls(cls): @@ -87,11 +135,13 @@ def get_test_dataset_from(cls, **kwargs): "predict": datasets_info["validation_dataset"], } - def _build_model(self, metadata: dict): + def _build_model(self, metadata: dict, **kwargs): """Instantiates the model, either from a checkpoint or from config.""" model_cls = self.get_cls() if self.ckpt_path: - self.model = model_cls.load_from_checkpoint(self.ckpt_path) + self.model = model_cls.load_from_checkpoint( + self.ckpt_path, metadata=metadata, **kwargs + ) elif self.model_cfg: self.model = model_cls(**self.model_cfg, metadata=metadata) else: @@ -123,12 +173,27 @@ def _load_dataloader( "Expected TimeSeriesDataSet, LightningDataModule, or DataLoader." ) + def _save_artifact(self, output_dir: Path): + """Save all configuration artifacts.""" + output_dir.mkdir(parents=True, exist_ok=True) + + with open(output_dir / "datamodule_cfg.pkl", "wb") as f: + pickle.dump(self.datamodule_cfg, f) + + with open(output_dir / "model_cfg.pkl", "wb") as f: + pickle.dump(self.model_cfg, f) + + if self.datamodule is not None and hasattr(self.datamodule, "metadata"): + with open(output_dir / "metadata.pkl", "wb") as f: + pickle.dump(self.datamodule.metadata, f) + def fit( self, data: Union[TimeSeries, LightningDataModule], # todo: we should create a base data_module for different data_modules save_ckpt: bool = True, ckpt_dir: Union[str, Path] = "checkpoints", + ckpt_kwargs: Optional[dict[str, Any]] = None, **trainer_fit_kwargs, ): """ @@ -143,6 +208,8 @@ def fit( If True, save the best model checkpoint and the `datamodule_cfg`. ckpt_dir : Union[str, Path], default="checkpoints" Directory to save artifacts. + ckpt_kwargs : dict, optional + Keyword arguments passed to ``ModelCheckpoint``. **trainer_fit_kwargs : Additional keyword arguments passed to `trainer.fit()`. @@ -170,13 +237,16 @@ def fit( if save_ckpt: ckpt_dir = Path(ckpt_dir) ckpt_dir.mkdir(parents=True, exist_ok=True) - checkpoint_cb = ModelCheckpoint( - dirpath=ckpt_dir, - filename="best-{epoch}-{val_loss:.2f}", - save_top_k=1, - monitor="val_loss", - mode="min", - ) + default_ckpt_kwargs = { + "dirpath": ckpt_dir, + "filename": "best-{epoch}-{step}", + "save_top_k": 1, + "monitor": "val_loss", + "mode": "min", + } + if ckpt_kwargs: + default_ckpt_kwargs.update(ckpt_kwargs) + checkpoint_cb = ModelCheckpoint(**default_ckpt_kwargs) callbacks.append(checkpoint_cb) trainer_init_cfg = self.trainer_cfg.copy() trainer_init_cfg.pop("callbacks", None) @@ -186,11 +256,8 @@ def fit( self.trainer.fit(self.model, datamodule=self.datamodule, **trainer_fit_kwargs) if save_ckpt and checkpoint_cb: best_model_path = Path(checkpoint_cb.best_model_path) - dm_cfg_path = best_model_path.parent / "datamodule_cfg.pkl" - with open(dm_cfg_path, "wb") as f: - pickle.dump(self.datamodule_cfg, f) - print(f"Best model saved to: {best_model_path}") - print(f"DataModule config saved to: {dm_cfg_path}") + self._save_artifact(best_model_path.parent) + print(f"Artifacts saved in: {best_model_path.parent}") return best_model_path return None diff --git a/pytorch_forecasting/models/tide/_tide_dsipts/_tide_v2.py b/pytorch_forecasting/models/tide/_tide_dsipts/_tide_v2.py index 70620928e..f49caaf59 100644 --- a/pytorch_forecasting/models/tide/_tide_dsipts/_tide_v2.py +++ b/pytorch_forecasting/models/tide/_tide_dsipts/_tide_v2.py @@ -79,7 +79,7 @@ def __init__( """ super().__init__(loss=loss) - self.save_hyperparameters(logger=False) + self.save_hyperparameters(ignore=["loss", "logging_metrics", "metadata"]) self.dropout = dropout_rate self.persistence_weight = persistence_weight diff --git a/pytorch_forecasting/tests/test_all_estimators_v2.py b/pytorch_forecasting/tests/test_all_estimators_v2.py deleted file mode 100644 index 86b819fc8..000000000 --- a/pytorch_forecasting/tests/test_all_estimators_v2.py +++ /dev/null @@ -1,140 +0,0 @@ -"""Automated tests based on the skbase test suite template.""" - -import shutil -from typing import Any, Optional - -import lightning.pytorch as pl -from lightning.pytorch.callbacks import EarlyStopping -from lightning.pytorch.loggers import TensorBoardLogger -import torch -import torch.nn as nn - -from pytorch_forecasting.base._base_pkg import Base_pkg -from pytorch_forecasting.data import TimeSeries -from pytorch_forecasting.metrics import SMAPE -from pytorch_forecasting.tests.test_all_estimators import ( - EstimatorFixtureGenerator, - EstimatorPackageConfig, -) - -# whether to test only estimators from modules that are changed w.r.t. main -# default is False, can be set to True by pytest --only_changed_modules True flag -ONLY_CHANGED_MODULES = False - - -def _integration( - estimator_cls: type[Base_pkg], - test_data: dict[str, TimeSeries], - model_cfg: dict[str, Any], - datamodule_cfg: dict[str, Any], - tmp_path: str, - trainer_cfg: Optional[dict[str, Any]] = None, - **kwargs, -): - train_data = test_data["train"] - predict_data = test_data["predict"] - - default_model_cfg = {"loss": SMAPE()} - - default_datamodule_cfg = { - "train_val_test_split": (0.8, 0.2), - "add_relative_time_idx": True, - "batch_size": 2, - } - - logger = TensorBoardLogger(tmp_path) - default_trainer_cfg = { - "max_epochs": 3, - "gradient_clip_val": 0.1, - "enable_checkpointing": True, - "default_root_dir": tmp_path, - "limit_train_batches": 2, - "limit_val_batches": 2, - "logger": logger, - } - default_model_cfg.update(model_cfg) - default_datamodule_cfg.update(datamodule_cfg) - if trainer_cfg is not None: - default_trainer_cfg.update(trainer_cfg) - - pkg = estimator_cls( - model_cfg=default_model_cfg, - trainer_cfg=default_trainer_cfg, - datamodule_cfg=default_datamodule_cfg, - ) - - pkg.fit(train_data) - - predictions = pkg.predict( - predict_data, - mode="raw", - ) - - assert predictions is not None - assert isinstance(predictions, dict) - assert "prediction" in predictions - - pred_tensor = predictions["prediction"] - assert isinstance(pred_tensor, torch.Tensor) - assert pred_tensor.ndim == 3, f"Prediction must be 3D, got {pred_tensor.ndim}D" - - expected_pred_len = datamodule_cfg.get("prediction_length") - if expected_pred_len: - assert pred_tensor.shape[1] == expected_pred_len, ( - f"Pred length mismatch: expected {expected_pred_len}, " - f"got {pred_tensor.shape[1]}" - ) - - shutil.rmtree(tmp_path, ignore_errors=True) - - -class TestAllPtForecastersV2(EstimatorPackageConfig, EstimatorFixtureGenerator): - """Generic tests for all objects in the mini package.""" - - object_type_filter = "forecaster_pytorch_v2" - - def test_doctest_examples(self, object_class): - """Runs doctests for estimator class.""" - from skbase.utils.doctest_run import run_doctest - - run_doctest(object_class, name=f"class {object_class.__name__}") - - def test_integration( - self, - object_pkg, - trainer_kwargs, - tmp_path, - ): - params_copy = trainer_kwargs.copy() - datamodule_cfg = params_copy.pop("datamodule_cfg", {}) - model_cfg = params_copy - - test_data = object_pkg.get_test_dataset_from(**datamodule_cfg) - - _integration( - estimator_cls=object_pkg, - test_data=test_data, - model_cfg=model_cfg, - datamodule_cfg=datamodule_cfg, - tmp_path=tmp_path, - ) - - def test_pkg_linkage(self, object_pkg, object_class): - """Test that the package is linked correctly.""" - # check name method - msg = ( - f"Package {object_pkg}.name() does not match class " - f"name {object_class.__name__}. " - "The expected package name is " - f"{object_class.__name__}_pkg." - ) - assert object_pkg.name() == object_class.__name__, msg - - # check naming convention - msg = ( - f"Package {object_pkg.__name__} does not match class " - f"name {object_class.__name__}. " - "The expected package name is " - f"{object_class.__name__}_pkg." - ) - assert object_pkg.__name__ == object_class.__name__ + "_pkg_v2", msg diff --git a/pytorch_forecasting/tests/test_all_v2/__init__.py b/pytorch_forecasting/tests/test_all_v2/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/pytorch_forecasting/tests/test_all_v2/_test_integration.py b/pytorch_forecasting/tests/test_all_v2/_test_integration.py new file mode 100644 index 000000000..83c1bdc78 --- /dev/null +++ b/pytorch_forecasting/tests/test_all_v2/_test_integration.py @@ -0,0 +1,35 @@ +from typing import Any + +import torch + +from pytorch_forecasting.base._base_pkg import Base_pkg +from pytorch_forecasting.data import TimeSeries + + +def _integration( + pkg: Base_pkg, + test_data: dict[str, TimeSeries], + datamodule_cfg: dict[str, Any], + **kwargs, +): + """Test integration of models with the `TimeSeries` and datamodules""" + pkg.fit(test_data["train"]) + + predictions = pkg.predict( + test_data["predict"], + mode="raw", + ) + assert predictions is not None + assert isinstance(predictions, dict) + assert "prediction" in predictions + + pred_tensor = predictions["prediction"] + assert isinstance(pred_tensor, torch.Tensor) + assert pred_tensor.ndim == 3, f"Prediction must be 3D, got {pred_tensor.ndim}D" + + expected_pred_len = datamodule_cfg.get("prediction_length") + if expected_pred_len: + assert pred_tensor.shape[1] == expected_pred_len, ( + f"Pred length mismatch: expected {expected_pred_len}, " + f"got {pred_tensor.shape[1]}" + ) diff --git a/pytorch_forecasting/tests/test_all_v2/test_all_estimators_v2.py b/pytorch_forecasting/tests/test_all_v2/test_all_estimators_v2.py new file mode 100644 index 000000000..87123028b --- /dev/null +++ b/pytorch_forecasting/tests/test_all_v2/test_all_estimators_v2.py @@ -0,0 +1,134 @@ +"""Automated tests based on the skbase test suite template.""" + +import os +from pathlib import Path +import shutil + +import torch + +from pytorch_forecasting.tests.test_all_estimators import ( + EstimatorFixtureGenerator, + EstimatorPackageConfig, +) +from pytorch_forecasting.tests.test_all_v2._test_integration import _integration +from pytorch_forecasting.tests.test_all_v2.utils import _setup_pkg_and_data + +# whether to test only estimators from modules that are changed w.r.t. main +# default is False, can be set to True by pytest --only_changed_modules True flag +ONLY_CHANGED_MODULES = False + + +class TestAllPtForecastersV2(EstimatorPackageConfig, EstimatorFixtureGenerator): + """Generic tests for all objects in the mini package.""" + + object_type_filter = "forecaster_pytorch_v2" + + def test_doctest_examples(self, object_class): + """Runs doctests for estimator class.""" + from skbase.utils.doctest_run import run_doctest + + run_doctest(object_class, name=f"class {object_class.__name__}") + + def test_integration( + self, + object_pkg, + trainer_kwargs, + tmp_path, + ): + pkg, test_data, dm_cfg = _setup_pkg_and_data( + object_pkg, trainer_kwargs, tmp_path + ) + + _integration(pkg, test_data, dm_cfg) + + shutil.rmtree(tmp_path, ignore_errors=True) + + def test_checkpointing(self, object_pkg, trainer_kwargs, tmp_path): + """Test that the package can save a checkpoint and reload from it.""" + pkg, test_data, _ = _setup_pkg_and_data(object_pkg, trainer_kwargs, tmp_path) + + ckpt_dir = Path(tmp_path) / "checkpoints" + best_model_path = pkg.fit( + test_data["train"], + save_ckpt=True, + ckpt_dir=ckpt_dir, + ckpt_kwargs={"monitor": "train_loss_epoch"}, + ) + + assert best_model_path is not None + assert os.path.exists(best_model_path) + + dm_cfg_path = Path(best_model_path).parent / "model_cfg.pkl" + assert ( + dm_cfg_path.exists() + ), "datamodule_cfg.pkl was not saved alongside checkpoint" + + pkg_loaded = object_pkg(ckpt_path=best_model_path) + + predictions = pkg_loaded.predict(test_data["predict"], mode="prediction") + + assert predictions is not None + assert "prediction" in predictions + shutil.rmtree(tmp_path, ignore_errors=True) + + def test_predict_modes(self, object_pkg, trainer_kwargs, tmp_path): + """Test different prediction modes and return_info.""" + pkg, test_data, _ = _setup_pkg_and_data(object_pkg, trainer_kwargs, tmp_path) + + pkg.fit(test_data["train"], save_ckpt=False) + predict_data = test_data["predict"] + + # mode="raw" + raw_out = pkg.predict(predict_data, mode="raw") + raw_pred_tensor = raw_out["prediction"] + assert any(isinstance(v, torch.Tensor) for v in raw_out.values()) + assert ( + raw_pred_tensor.ndim == 3 + ), f"Prediction must be 3D, got {raw_pred_tensor.ndim}D" + + # mode="quantiles" + quantile_out = pkg.predict(predict_data, mode="quantiles") + quanitle_pred_tensor = quantile_out["prediction"] + assert isinstance(quanitle_pred_tensor, torch.Tensor) + assert ( + quanitle_pred_tensor.ndim == 3 + ), f"Prediction must be 3D, got {quanitle_pred_tensor.ndim}D" + + # mode="prediction" + pred_out = pkg.predict(predict_data, mode="prediction") + pred_tensor = pred_out["prediction"] + assert isinstance(pred_tensor, torch.Tensor) + assert pred_tensor.ndim == 2, f"Prediction must be 3D, got {pred_tensor.ndim}D" + + return_info_keys = ["index", "x"] + info_out = pkg.predict( + predict_data, mode="prediction", return_info=return_info_keys + ) + + for key in return_info_keys: + assert key in info_out, f"Requested key '{key}' missing from output" + + assert info_out["index"] is not None + assert isinstance(info_out["x"], dict) + + shutil.rmtree(tmp_path, ignore_errors=True) + + def test_pkg_linkage(self, object_pkg, object_class): + """Test that the package is linked correctly.""" + # check name method + msg = ( + f"Package {object_pkg}.name() does not match class " + f"name {object_class.__name__}. " + "The expected package name is " + f"{object_class.__name__}_pkg." + ) + assert object_pkg.name() == object_class.__name__, msg + + # check naming convention + msg = ( + f"Package {object_pkg.__name__} does not match class " + f"name {object_class.__name__}. " + "The expected package name is " + f"{object_class.__name__}_pkg." + ) + assert object_pkg.__name__ == object_class.__name__ + "_pkg_v2", msg diff --git a/pytorch_forecasting/tests/test_all_v2/utils.py b/pytorch_forecasting/tests/test_all_v2/utils.py new file mode 100644 index 000000000..a8cb714dc --- /dev/null +++ b/pytorch_forecasting/tests/test_all_v2/utils.py @@ -0,0 +1,61 @@ +from typing import Any + +from lightning.pytorch.loggers import TensorBoardLogger + +from pytorch_forecasting.base._base_pkg import Base_pkg +from pytorch_forecasting.data import TimeSeries +from pytorch_forecasting.metrics import SMAPE + + +def _setup_pkg_and_data( + estimator_cls: type[Base_pkg], + trainer_kwargs: dict[str, Any], + tmp_path: str, +) -> tuple[Base_pkg, dict[str, TimeSeries], dict[str, Any]]: + """ + Helper to initialize the Package, Datasets, and Configs. + + Returns + ------- + pkg : Base_pkg + The initialized model package. + test_data : dict + Dictionary containing 'train' and 'predict' TimeSeries datasets. + datamodule_cfg : dict + The final datamodule configuration used. + """ + params_copy = trainer_kwargs.copy() + datamodule_cfg = params_copy.pop("datamodule_cfg", {}) + model_cfg = params_copy + + if "loss" not in model_cfg: + model_cfg["loss"] = SMAPE() + + default_datamodule_cfg = { + "train_val_test_split": (0.8, 0.2), + "add_relative_time_idx": True, + "batch_size": 2, + } + default_datamodule_cfg.update(datamodule_cfg) + + logger = TensorBoardLogger(str(tmp_path)) + trainer_cfg = { + "max_epochs": 2, + "gradient_clip_val": 0.1, + "enable_checkpointing": True, + "default_root_dir": str(tmp_path), + "limit_train_batches": 2, + "limit_val_batches": 1, + "accelerator": "cpu", + "logger": logger, + } + + test_data = estimator_cls.get_test_dataset_from(**default_datamodule_cfg) + + pkg = estimator_cls( + model_cfg=model_cfg, + trainer_cfg=trainer_cfg, + datamodule_cfg=default_datamodule_cfg, + ) + + return pkg, test_data, default_datamodule_cfg diff --git a/pytorch_forecasting/tests/test_class_register.py b/pytorch_forecasting/tests/test_class_register.py index 2a1052125..a9699fb99 100644 --- a/pytorch_forecasting/tests/test_class_register.py +++ b/pytorch_forecasting/tests/test_class_register.py @@ -20,7 +20,9 @@ def get_test_class_registry(): keys are scitypes, values are test classes TestAll[Scitype] """ from pytorch_forecasting.tests.test_all_estimators import TestAllPtForecasters - from pytorch_forecasting.tests.test_all_estimators_v2 import TestAllPtForecastersV2 + from pytorch_forecasting.tests.test_all_v2.test_all_estimators_v2 import ( + TestAllPtForecastersV2, + ) testclass_dict = dict() testclass_dict["forecaster_pytorch_v1"] = TestAllPtForecasters From 5072689f40f5eb96b7a8619d41bd7df3a79d1a47 Mon Sep 17 00:00:00 2001 From: Aryan Saini Date: Sun, 7 Dec 2025 00:53:18 +0530 Subject: [PATCH 09/13] update docstring --- pytorch_forecasting/base/_base_pkg.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pytorch_forecasting/base/_base_pkg.py b/pytorch_forecasting/base/_base_pkg.py index 03df99ec9..6bfd00323 100644 --- a/pytorch_forecasting/base/_base_pkg.py +++ b/pytorch_forecasting/base/_base_pkg.py @@ -29,10 +29,12 @@ class Base_pkg(_BasePtForecasterV2): Configs to initialise ``lightning.Trainer``. Defaults to {}. datamodule_cfg : Union[dict, str, Path], optional Configs to initialise a ``LightningDataModule``. + - If dict, the keys and values are used as configuration parameters. - If str or Path, it should be a path to a ``.pkl`` file containing the serialized configuration dictionary. Required for reproducibility when loading a model for inference. Defaults to {}. + ckpt_path : Union[str, Path], optional Path to the checkpoint from which to load the model. If provided, `model_cfg` is ignored. Defaults to None. From 64f7e7db8aad25c59b2630ac9d959d5e056503f2 Mon Sep 17 00:00:00 2001 From: Aryan Saini Date: Sun, 7 Dec 2025 23:21:25 +0530 Subject: [PATCH 10/13] add examples --- docs/source/tutorials/ptf_V2_example.ipynb | 8167 ++++++++++++++++++-- 1 file changed, 7441 insertions(+), 726 deletions(-) diff --git a/docs/source/tutorials/ptf_V2_example.ipynb b/docs/source/tutorials/ptf_V2_example.ipynb index 81313151d..8ee9fd87e 100644 --- a/docs/source/tutorials/ptf_V2_example.ipynb +++ b/docs/source/tutorials/ptf_V2_example.ipynb @@ -1,813 +1,7528 @@ { - "cells": [ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "rzVbXsEBxnF-" + }, + "source": [ + "# Example Notebook for a basic vignette for `pytorch-forecasting v2` Model Training and Inference" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "yt0uZV7Px-40" + }, + "source": [ + "
\n", + ":warning: The \"Data Pipeline\" showcased here is part of an experimental rework of the `pytorch-forecasting` data layer, planned for release in v2.0.0. The API is currently unstable and subject to change without prior notice. This notebook serves as a basic demonstration of the intended workflow and is not recommended for use in production environments. Feedback and suggestions are highly encouraged — please share them in issue 1736.\n", + "
\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "r15UunnLoxnK" + }, + "source": [ + "In this notebook, we demonstrate how to train and evaluate the **Temporal Fusion Transformer (TFT)** using the new `TimeSeries` and `DataModule` API from the v2 pipeline.\n", + "We can do this in 2 ways:\n", + "1. **High-level package API:**\n", + "\n", + " This approach handles data loading, dataloader creation, and model training internally. It provides a simple, `scikit-learn`-like `fit` → `predict` workflow.\n", + " Users can still configure key training options (such as the `trainer`, callbacks, and training parameters) but cannot plug in fully custom `trainer` implementations or override internal pipeline logic.\n", + "\n", + "2. **Low-level 3-stage pipeline**:\n", + "This involves explicitly constructing:\n", + " * a `TimeSeries` object\n", + "\n", + " * a `DataModule`\n", + "\n", + " * the model (e.g., `TFT`)\n", + " \n", + " This workflow is ideal if you need custom setups such as custom trainers, callbacks, or advanced data preprocessing.\n", + " It requires a deeper understanding of how the three layers (TimeSeries, DataModule, and the model) interact, but offers maximum flexibility." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "QyMFNk4MyY_b" + }, + "source": [ + "# Create Synthetic data\n", + "We generate a synthetic dataset using `load_toydata` that creates a `pandas` DataFrame with just numerical values as for now **the pipeline assumes the data to be numerical only**." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "id": "RkgOT4kiy_RU" + }, + "outputs": [], + "source": [ + "from pytorch_forecasting.data.examples import load_toydata" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 206 + }, + "id": "WX-FRdusJSVN", + "outputId": "2ad916b8-2fd9-4318-afb1-2bda84d284d7" + }, + "outputs": [ { - "cell_type": "markdown", - "metadata": { - "id": "rzVbXsEBxnF-" + "data": { + "application/vnd.google.colaboratory.intrinsic+json": { + "summary": "{\n \"name\": \"data_df\",\n \"rows\": 4900,\n \"fields\": [\n {\n \"column\": \"series_id\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 28,\n \"min\": 0,\n \"max\": 99,\n \"num_unique_values\": 100,\n \"samples\": [\n 83,\n 53,\n 70\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"time_idx\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 14,\n \"min\": 0,\n \"max\": 48,\n \"num_unique_values\": 49,\n \"samples\": [\n 13,\n 45,\n 47\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"x\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.6712252870750063,\n \"min\": -1.2780952045426857,\n \"max\": 1.3163602917006327,\n \"num_unique_values\": 4900,\n \"samples\": [\n 0.19335967827533446,\n 0.8492207493147326,\n -0.9687640491099185\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"y\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.6753351884449413,\n \"min\": -1.2780952045426857,\n \"max\": 1.3163602917006327,\n \"num_unique_values\": 4900,\n \"samples\": [\n 0.6981263626070341,\n 0.7052787051636003,\n -0.861386757323439\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"category\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1,\n \"min\": 0,\n \"max\": 4,\n \"num_unique_values\": 5,\n \"samples\": [\n 1,\n 4,\n 2\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"future_known_feature\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.6741140972121411,\n \"min\": -0.9991351502732795,\n \"max\": 1.0,\n \"num_unique_values\": 49,\n \"samples\": [\n 0.26749882862458735,\n -0.2107957994307797,\n -0.01238866346289056\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"static_feature\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0.2792423704109133,\n \"min\": 0.031153133884698536,\n \"max\": 0.9662188410416612,\n \"num_unique_values\": 100,\n \"samples\": [\n 0.24602577096925082,\n 0.8680231736929984,\n 0.6913124004679789\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"static_feature_cat\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0,\n \"min\": 0,\n \"max\": 2,\n \"num_unique_values\": 3,\n \"samples\": [\n 0,\n 1,\n 2\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}", + "type": "dataframe", + "variable_name": "data_df" }, - "source": [ - "# `pytorch-forecasting v2` Model Training and Inference - Beta API" + "text/html": [ + "\n", + "
\n", + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
series_idtime_idxxycategoryfuture_known_featurestatic_featurestatic_feature_cat
000-0.0306430.14828001.0000000.0392130
1010.1482800.43302900.9950040.0392130
2020.4330290.74251100.9800670.0392130
3030.7425110.72927000.9553360.0392130
4040.7292700.62860400.9210610.0392130
\n", + "
\n", + "
\n", + "\n", + "
\n", + " \n", + "\n", + " \n", + "\n", + " \n", + "
\n", + "\n", + "\n", + "
\n", + " \n", + "\n", + "\n", + "\n", + " \n", + "
\n", + "\n", + "
\n", + "
\n" + ], + "text/plain": [ + " series_id time_idx x y category future_known_feature \\\n", + "0 0 0 -0.030643 0.148280 0 1.000000 \n", + "1 0 1 0.148280 0.433029 0 0.995004 \n", + "2 0 2 0.433029 0.742511 0 0.980067 \n", + "3 0 3 0.742511 0.729270 0 0.955336 \n", + "4 0 4 0.729270 0.628604 0 0.921061 \n", + "\n", + " static_feature static_feature_cat \n", + "0 0.039213 0 \n", + "1 0.039213 0 \n", + "2 0.039213 0 \n", + "3 0.039213 0 \n", + "4 0.039213 0 " ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "num_series = 100 # Number of individual time series to generate\n", + "seq_length = 50 # Length of each time series\n", + "data_df = load_toydata(num_series, seq_length)\n", + "data_df.head()" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "_8TgLH82runO" + }, + "source": [ + "# High-level API\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "A1cqKCRur4oj" + }, + "source": [ + "## Steps\n", + "* Create the `TimeSeries` object\n", + "* Create `configs` for model, `datamodule`, `trainer` etc.\n", + "* Create the `model_pkg` object\n", + "* perform `pkg.fit` and `pkg.predict`.\n", + "\n", + "## Create Dataset object\n", + "\n", + "`TimeSeries` returns the raw data in terms of tensors .\n", + "\n", + "---\n", + "\n", + "`TimeSeries` dataset's Key arguments:\n", + "- `data`: DataFrame with sequence data.\n", + "- `time`: integer typed column denoting the time index within `data`.\n", + "- `target`: Column(s) in `data` denoting the forecasting target.\n", + "- `group`: List of column names identifying a time series instance within `data`.\n", + "- `num`: List of numerical features.\n", + "- `cat`: List of categorical features.\n", + "- `known`: Features known in future\n", + "- `unknown`: Features not known in the future\n", + "- `static`: List of variables that do not change over time,\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "id": "u8OPR0HntXqR" + }, + "outputs": [], + "source": [ + "from pytorch_forecasting.data.timeseries import TimeSeries" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, + "id": "6a_oy4VjtrHQ", + "outputId": "54678fb8-864e-4f32-eeb9-83697946a3e5" + }, + "outputs": [ { - "cell_type": "markdown", - "metadata": { - "id": "yt0uZV7Px-40" - }, - "source": [ - "
\n", - ":warning: The vignette showcased here is part of an experimental rework of the `pytorch-forecasting` data layer, planned for release in v2.0.0. The API is currently unstable and subject to change without prior notice.\n", - "\n", - "Feedback and suggestions are highly encouraged — please share them in issue 1736.\n", - "
\n" - ] + "name": "stderr", + "output_type": "stream", + "text": [ + "/content/pytorch-forecasting/pytorch_forecasting/data/timeseries/_timeseries_v2.py:105: UserWarning: TimeSeries is part of an experimental rework of the pytorch-forecasting data layer, scheduled for release with v2.0.0. The API is not stable and may change without prior warning. For beta testing, but not for stable production use. Feedback and suggestions are very welcome in pytorch-forecasting issue 1736, https://github.com/sktime/pytorch-forecasting/issues/1736\n", + " warn(\n" + ] + } + ], + "source": [ + "# create `TimeSeries` dataset that returns the raw data in terms of tensors\n", + "dataset = TimeSeries(\n", + " data=data_df,\n", + " time=\"time_idx\",\n", + " target=\"y\",\n", + " group=[\"series_id\"],\n", + " num=[\"x\", \"future_known_feature\", \"static_feature\"],\n", + " cat=[\"category\", \"static_feature_cat\"],\n", + " known=[\"future_known_feature\"],\n", + " unknown=[\"x\", \"category\"],\n", + " static=[\"static_feature\", \"static_feature_cat\"],\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "EoS6W9zh6wCj" + }, + "source": [ + "## Create the configs\n" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "id": "MKPXPUcC5dTY" + }, + "outputs": [], + "source": [ + "from sklearn.preprocessing import StandardScaler\n", + "from pytorch_forecasting.data.encoders import (\n", + " EncoderNormalizer,\n", + " NaNLabelEncoder,\n", + " TorchNormalizer,\n", + ")\n", + "from pytorch_forecasting.metrics import MAE, SMAPE" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "WYl9-oZz6nk6" + }, + "source": [ + "Here we use `EncoderDecoderTimeSeriesDataModule`\n", + "\n", + "\n", + "`EncoderDecoderTimeSeriesDataModule` key arguments:\n", + "- `time_series_dataset`: `TimeSeries` dataset instance\n", + "- `max_encoder_length` : Maximum length of the encoder input sequence.\n", + "- `max_prediction_length` : Maximum length of the decoder output sequence.\n", + "- `batch_size` : Batch size for DataLoader.\n", + "- `categorical_encoders` : Dictionary of categorical encoders.\n", + "- `scalers` : Dictionary of feature scalers.\n", + "- `target_normalizer`: Normalizer for the target variable." + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "id": "YGMShzfyttp_" + }, + "outputs": [], + "source": [ + "datamodule_cfg = dict(\n", + " max_encoder_length=30,\n", + " max_prediction_length=1,\n", + " batch_size=32,\n", + " categorical_encoders={\n", + " \"category\": NaNLabelEncoder(add_nan=True),\n", + " \"static_feature_cat\": NaNLabelEncoder(add_nan=True),\n", + " },\n", + " scalers={\n", + " \"x\": StandardScaler(),\n", + " \"future_known_feature\": StandardScaler(),\n", + " \"static_feature\": StandardScaler(),\n", + " },\n", + " target_normalizer=TorchNormalizer(),\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Pi5Qkznh6t3y" + }, + "source": [ + "We would use `TFT` model in this tutorial" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "id": "q6Thm13ct7OV" + }, + "outputs": [], + "source": [ + "model_cfg = dict(\n", + " loss=MAE(),\n", + " logging_metrics=[MAE(), SMAPE()],\n", + " optimizer=\"adam\",\n", + " optimizer_params={\"lr\": 1e-3},\n", + " lr_scheduler=\"reduce_lr_on_plateau\",\n", + " lr_scheduler_params={\"mode\": \"min\", \"factor\": 0.1, \"patience\": 10},\n", + " hidden_size=64,\n", + " num_layers=2,\n", + " attention_head_size=4,\n", + " dropout=0.1,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "id": "Stfuc_xCuON6" + }, + "outputs": [], + "source": [ + "trainer_cfg = dict(\n", + " max_epochs=5,\n", + " accelerator=\"auto\",\n", + " devices=1,\n", + " enable_progress_bar=True,\n", + " log_every_n_steps=10,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "id": "XS_ND8UAubdN" + }, + "outputs": [], + "source": [ + "from pytorch_forecasting.models.temporal_fusion_transformer._tft_pkg_v2 import (\n", + " TFT_pkg_v2,\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "6yoqI8907DG4" + }, + "source": [ + "## Create the `model_pkg` object\n", + "\n", + "This `pkg` class acts as a wrapper around the whole ML pipeline in `pytorch-forecasting` and we can simply just define the `pkg` class and then use `pkg.fit` and `pkg.predict` to perform the \"fit\", \"predict\" mechanisms." + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, + "id": "aOxng4Rguwj2", + "outputId": "2c50fcad-f990-4aae-f0bb-5dbdd6a87377" + }, + "outputs": [ { - "cell_type": "markdown", - "metadata": { - "id": "6D9ARyp05R0t" - }, - "source": [ - "In this vignette, we demonstrate how to train and evaluate the **Temporal Fusion Transformer (TFT)** using the new `TimeSeries` and `DataModule` API from the v2 pipeline.\n", - "\n", - "\n", - "## Steps\n", - "\n", - "1. **Load Data** \n", - "2. **Create Dataset & DataModule** \n", - "3. **Initialize, Train & Run Inference with the Model**\n", - "\n", - "\n", - "\n", - "### Load Data\n", - "\n", - "We generate a synthetic dataset using `load_toydata` which returns a `pandas` DataFrame with purely numerical values. \n", - "*(Note: The current pipeline assumes all inputs are numerical only.)*\n", - "\n", - "\n", - "\n", - "\n", - "### Create Dataset & DataModule\n", - "\n", - "- `TimeSeries` returns the raw data in terms of tensors .\n", - "- `DataModule` wraps the dataset, handles splits, preprocessing, batching, and exposes `metadata` for the model initialisation.\n", - "\n", - "\n", - "\n", - "### Initialize the Model\n", - "\n", - "We initialize the TFT model using the `metadata` provided by the `DataModule`. This metadata includes all required dimensional info for the encoder, decoder, and static inputs.\n", - "\n", - "\n", - "\n", - "### Train the Model\n", - "\n", - "We use a `Trainer` from PyTorch Lightning to train the model\n", - "\n", - "### Run Inference\n", - "\n", - "After training, we can make predictions using the trained model\n" - ] + "name": "stdout", + "output_type": "stream", + "text": [ + "{'loss': MAE(), 'logging_metrics': [MAE(), SMAPE()], 'optimizer': 'adam', 'optimizer_params': {'lr': 0.001}, 'lr_scheduler': 'reduce_lr_on_plateau', 'lr_scheduler_params': {'mode': 'min', 'factor': 0.1, 'patience': 10}, 'hidden_size': 64, 'num_layers': 2, 'attention_head_size': 4, 'dropout': 0.1}\n" + ] + } + ], + "source": [ + "model_pkg = TFT_pkg_v2(\n", + " model_cfg=model_cfg,\n", + " trainer_cfg=trainer_cfg,\n", + " datamodule_cfg=datamodule_cfg,\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 976, + "referenced_widgets": [ + "4ecdea6764d145118ab53e59451d2b0c", + "e7b969aa6d8e433d9aeeac4357bc425d", + "42707b895305490b82cd644250e689fa", + "19c3c106d5a9489cae445a0b5fc88183", + "a6e5908902eb40e997e6086287f28f2a", + "f23d99cc4f01426eb4fc8d41fc8f4b16", + "df8d7458b0fa4f508d4ce357fc95c609", + "464464a47d604d708be37e18edec4810", + "c7ca9662eae04999b21de91c183a0856", + "e82943533ad54539a777d6adae271d0f", + "e0fa236745204d5ba2dbc1ff2c51f1a2", + "c52bb8ff12db4df3a05cf1da7b5470f7", + "273fb7ccddeb476f9c76bd1be44a6ae0", + "922dfb34c7494b20a874e294c07447e0", + "96eda6cd2fbc47b9a29d2cf176332058", + "d2ed70b544924436b185f79d0cd90862", + "aff8baef21494ccf99bf092fc3daaae0", + "640d3876c2ce49de9757962b5b5b0e32", + "f99327891eeb424b9df4fe04a6bedcfb", + "04804ca4c425464db2754abf3cf95568", + "386a2097c02f4af6ba239e385f4b0b47", + "7e95bdbc3a6c46bf8b1e96bdecfa7303", + "572629c64cfd46a983f1a8c6483a2cf1", + "61f356a200c5470db777e7e0f9e8c520", + "4905c6d809274aa39a984e3e458fc89a", + "b16522c88ebb435f96c05315ef91ebbb", + "65cce98698644285896363e509ae6139", + "a4a4c07f117e46989cb4877a5d2dd9e0", + "3f8cc20607db40c7acb4110feba9ab0d", + "3c5c1f55d5a64838b94fc0fbd85097c6", + "4f5cce37b6ac430e85757dd06b06953a", + "942645c506ea436fb598455d84c8a970", + "969a3ddfaed84150944d697307ababe4", + "955c5e9c139148a1a352d17202fe097f", + "f0fbcbcf02e443bc99a469cf4c7f8131", + "72fb23e179594f35a68418e2e0ee65fc", + "7808bf48e45940cfa0d4bccae784d730", + "ed0358a45ec14ce687fc02904a815e38", + "67a3d79f1b2e4e03b9a564286c04d5d4", + "27fd0da590314bb68dfac5b7c72d6584", + "15e539660a2547f49fb2cf8a6143f5fa", + "c46b831b37a347868f1d35d0dbbfd923", + "3f985da9d6a245c5b54dbb47926a4fd4", + "5ab64c01efb84e75af1a8aaf6675f5bf", + "8d0747756fd2434399ae8d233a82d607", + "f77d800d097b494ca3e945abdaedd75c", + "05a14444ea4043dea69a4e7185e66cb1", + "b775518f409449928c3211260d7223c0", + "2db9a1e74ad14139af235f1a2a146e0a", + "2bcdfdf1b12c495aa8b425c88fcfbd1b", + "d71a01b309e948239a16062097ee76a2", + "006cdf49ce55411bb072c2670d87773f", + "5b3be082628244948284a40bea451ff1", + "bf96e25bd5d64892a329b624961abeb8", + "b5e879fa1fee4d0ba30ac5af07d1d8c5", + "78f2d725dcb34deca5407c277c384d8d", + "e1dc997d76d54eb9a9245530a60c2cd9", + "8fa00a6415b74091a012bc5fff543f42", + "c74c472cdf174a28a4ca3fed1b312332", + "409d65e2b79f49318c580d9835ffc29c", + "568141e0b45f44ff9b497c6474d8019f", + "1a889d0b55bb4e6d80d5f170297a6262", + "679072fe36f5404588879eab670e01e2", + "ab72364dc8cf433e907c40df3e7be9e9", + "d56c627297bd435fbbc60317066084f9", + "6a62c54d7d7b4f689dc31e57aaa20411", + "3ab523d60fd249a7bcece32280872abd", + "ef8e78e4f8a248dcbbc2ea3e464c5922", + "56685ebbfd244154bd1829dec6f0db0b", + "dc5f9a923d27492cb382691ec01a1ddc", + "58995b1bd1c24433a3aca0ab53c6b8bf", + "9082a1b6eb3a4d14b4c92eedec1c2404", + "13eb0c5265ad48d08b3f8e46a55896f0", + "f91e202108684aa9af76fdf3e9d83206", + "f617590dcd184fd99f98515940ac85af", + "33a1e5f21b694e3bb62d2c0d73aa65e3", + "8c8c8832e16c4d489e0df7514dc78f6a" + ] }, + "id": "c27Qj4QAvFwx", + "outputId": "21bbd594-d92e-498b-bd02-71829295c483" + }, + "outputs": [ { - "cell_type": "markdown", - "metadata": { - "id": "QyMFNk4MyY_b" - }, - "source": [ - "# 1. Load Data\n", - "We generate a synthetic dataset using `load_toydata` that creates a `pandas` DataFrame with just numerical values as for now **the pipeline assumes the data to be numerical only**." - ] + "name": "stderr", + "output_type": "stream", + "text": [ + "/content/pytorch-forecasting/pytorch_forecasting/data/data_module.py:129: UserWarning: EncoderDecoderTimeSeriesDataModule is part of an experimental rework of the pytorch-forecasting data layer, scheduled for release with v2.0.0. The API is not stable and may change without prior warning. For beta testing, but not for stable production use. Feedback and suggestions are very welcome in pytorch-forecasting issue 1736, https://github.com/sktime/pytorch-forecasting/issues/1736\n", + " warn(\n", + "/content/pytorch-forecasting/pytorch_forecasting/models/base/_base_model_v2.py:64: UserWarning: The Model 'TFT' is part of an experimental reworkof the pytorch-forecasting model layer, scheduled for release with v2.0.0. The API is not stable and may change without prior warning. This class is intended for beta testing and as a basic skeleton, but not for stable production use. Feedback and suggestions are very welcome in pytorch-forecasting issue 1736, https://github.com/sktime/pytorch-forecasting/issues/1736\n", + " warn(\n", + "INFO: GPU available: True (cuda), used: True\n", + "INFO:lightning.pytorch.utilities.rank_zero:GPU available: True (cuda), used: True\n", + "INFO: TPU available: False, using: 0 TPU cores\n", + "INFO:lightning.pytorch.utilities.rank_zero:TPU available: False, using: 0 TPU cores\n", + "INFO: LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]\n", + "INFO:lightning.pytorch.accelerators.cuda:LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]\n", + "INFO: \n", + " | Name | Type | Params | Mode \n", + "---------------------------------------------------------------------\n", + "0 | loss | MAE | 0 | train\n", + "1 | encoder_var_selection | Sequential | 709 | train\n", + "2 | decoder_var_selection | Sequential | 193 | train\n", + "3 | static_context_linear | Linear | 192 | train\n", + "4 | lstm_encoder | LSTM | 51.5 K | train\n", + "5 | lstm_decoder | LSTM | 50.4 K | train\n", + "6 | self_attention | MultiheadAttention | 16.6 K | train\n", + "7 | pre_output | Linear | 4.2 K | train\n", + "8 | output_layer | Linear | 65 | train\n", + "---------------------------------------------------------------------\n", + "123 K Trainable params\n", + "0 Non-trainable params\n", + "123 K Total params\n", + "0.495 Total estimated model params size (MB)\n", + "18 Modules in train mode\n", + "0 Modules in eval mode\n", + "INFO:lightning.pytorch.callbacks.model_summary:\n", + " | Name | Type | Params | Mode \n", + "---------------------------------------------------------------------\n", + "0 | loss | MAE | 0 | train\n", + "1 | encoder_var_selection | Sequential | 709 | train\n", + "2 | decoder_var_selection | Sequential | 193 | train\n", + "3 | static_context_linear | Linear | 192 | train\n", + "4 | lstm_encoder | LSTM | 51.5 K | train\n", + "5 | lstm_decoder | LSTM | 50.4 K | train\n", + "6 | self_attention | MultiheadAttention | 16.6 K | train\n", + "7 | pre_output | Linear | 4.2 K | train\n", + "8 | output_layer | Linear | 65 | train\n", + "---------------------------------------------------------------------\n", + "123 K Trainable params\n", + "0 Non-trainable params\n", + "123 K Total params\n", + "0.495 Total estimated model params size (MB)\n", + "18 Modules in train mode\n", + "0 Modules in eval mode\n" + ] }, { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "id": "RkgOT4kiy_RU" + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "4ecdea6764d145118ab53e59451d2b0c", + "version_major": 2, + "version_minor": 0 }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/aryan/pytorch-forecasting/pytorch_forecasting/models/base/_base_model.py:28: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", - " from tqdm.autonotebook import tqdm\n" - ] - } - ], - "source": [ - "from pytorch_forecasting.data.examples import load_toydata" + "text/plain": [ + "Sanity Checking: | | 0/? [00:00\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
series_idtime_idxxycategoryfuture_known_featurestatic_featurestatic_feature_cat
0000.1677120.17215401.0000000.3005090
1010.1721540.46723300.9950040.3005090
2020.4672330.55495200.9800670.3005090
3030.5549520.74652900.9553360.3005090
4040.7465290.71174500.9210610.3005090
\n", - "" - ], - "text/plain": [ - " series_id time_idx x y category future_known_feature \\\n", - "0 0 0 0.167712 0.172154 0 1.000000 \n", - "1 0 1 0.172154 0.467233 0 0.995004 \n", - "2 0 2 0.467233 0.554952 0 0.980067 \n", - "3 0 3 0.554952 0.746529 0 0.955336 \n", - "4 0 4 0.746529 0.711745 0 0.921061 \n", - "\n", - " static_feature static_feature_cat \n", - "0 0.300509 0 \n", - "1 0.300509 0 \n", - "2 0.300509 0 \n", - "3 0.300509 0 \n", - "4 0.300509 0 " - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "num_series = 100 # Number of individual time series to generate\n", - "seq_length = 50 # Length of each time series\n", - "data_df = load_toydata(num_series, seq_length)\n", - "data_df.head()" + "text/plain": [ + "Training: | | 0/? [00:00 Date: Sun, 7 Dec 2025 23:24:38 +0530 Subject: [PATCH 11/13] add examples --- docs/source/tutorials/ptf_V2_example.ipynb | 5764 -------------------- 1 file changed, 5764 deletions(-) diff --git a/docs/source/tutorials/ptf_V2_example.ipynb b/docs/source/tutorials/ptf_V2_example.ipynb index 8ee9fd87e..9cee1c05a 100644 --- a/docs/source/tutorials/ptf_V2_example.ipynb +++ b/docs/source/tutorials/ptf_V2_example.ipynb @@ -1757,5770 +1757,6 @@ }, "language_info": { "name": "python" - }, - "widgets": { - "application/vnd.jupyter.widget-state+json": { - "006cdf49ce55411bb072c2670d87773f": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": "2", - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "00e7ff7f5a1646e887b35fb22ab4a8b0": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "0108dec7eb894503ba2e7e1bd33e814b": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": "2", - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "01487f5cfc2e4a79b5b310c7732cba16": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": "inline-flex", - "flex": null, - "flex_flow": "row wrap", - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": "hidden", - "width": "100%" - } - }, - "01d5bef8db0c42a7a82f9600a6ee7549": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "04804ca4c425464db2754abf3cf95568": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "05a14444ea4043dea69a4e7185e66cb1": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "ProgressView", - "bar_style": "", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_006cdf49ce55411bb072c2670d87773f", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_5b3be082628244948284a40bea451ff1", - "tabbable": null, - "tooltip": null, - "value": 1 - } - }, - "06458336850c4c838ad02188538c6c64": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": "2", - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "0b59e2c8901d40d79ceb08156d1c4e1d": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": "2", - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "0d957465db5048e2b4a1a144a29b2d6f": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "10f011e768704402a8d46f6377c6364e": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "ProgressView", - "bar_style": "", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_41b14de355a04031ad4deabdadc6f9fe", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_c12b35d0715a4ae580557cd6c17740c8", - "tabbable": null, - "tooltip": null, - "value": 1 - } - }, - "12b11fd7fb53408e92e79ad50cfdd433": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "12cb9f1a3f5b4111a995bba45ea38ca3": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "13053e2cc53b4d86a18835d3cf62d9a0": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_68689a954b69463ba4a2f02ed26d41a9", - "placeholder": "​", - "style": "IPY_MODEL_fb5c4ef912a54a96a4aaacbd9b7d0517", - "tabbable": null, - "tooltip": null, - "value": " 42/42 [00:07<00:00,  5.41it/s, v_num=7, train_loss_step=0.117, val_loss=0.102, val_MAE=0.102, val_SMAPE=0.416, train_loss_epoch=0.115, train_MAE=0.115, train_SMAPE=0.427]" - } - }, - "1380306827ec4169a896b9ffcbeb8c2c": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "13eb0c5265ad48d08b3f8e46a55896f0": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "15e539660a2547f49fb2cf8a6143f5fa": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": "2", - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "168a880240964d0194f1b986eacbcd29": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "ProgressView", - "bar_style": "", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_37db4be2353f436abf3ec0a71dca8e39", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_2daef716eda64487837f300db34039da", - "tabbable": null, - "tooltip": null, - "value": 1 - } - }, - "19c3c106d5a9489cae445a0b5fc88183": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_e82943533ad54539a777d6adae271d0f", - "placeholder": "​", - "style": "IPY_MODEL_e0fa236745204d5ba2dbc1ff2c51f1a2", - "tabbable": null, - "tooltip": null, - "value": " 2/2 [00:00<00:00,  2.97it/s]" - } - }, - "1a889d0b55bb4e6d80d5f170297a6262": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "2012c67eef9d43099e0566c866d24043": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "ProgressView", - "bar_style": "", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_26963ab219a447f2a53313948576286d", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_870e865f5c3c48d88971b7d4a0f18f1f", - "tabbable": null, - "tooltip": null, - "value": 1 - } - }, - "2151663ad02a429cac5a52a90371ce95": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": "2", - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "21e78da0f7204d5e8ccfc92cc39be9ae": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "26963ab219a447f2a53313948576286d": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": "2", - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "273fb7ccddeb476f9c76bd1be44a6ae0": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_aff8baef21494ccf99bf092fc3daaae0", - "placeholder": "​", - "style": "IPY_MODEL_640d3876c2ce49de9757962b5b5b0e32", - "tabbable": null, - "tooltip": null, - "value": "Epoch 4: 100%" - } - }, - "27fd0da590314bb68dfac5b7c72d6584": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "29be52da8ab2448e902bf9a9a264e5dd": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "2a26b76eeffe4cf899776c4913552d1f": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "2bcdfdf1b12c495aa8b425c88fcfbd1b": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "2c0e791c673e4df3b964a8315ab47fe2": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_2e49603fb8454b538257b9297507122d", - "placeholder": "​", - "style": "IPY_MODEL_2a26b76eeffe4cf899776c4913552d1f", - "tabbable": null, - "tooltip": null, - "value": " 9/9 [00:00<00:00, 17.65it/s]" - } - }, - "2d9aeac5b4d6406b95f41030b3902ead": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "2daef716eda64487837f300db34039da": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "2db9a1e74ad14139af235f1a2a146e0a": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": "inline-flex", - "flex": null, - "flex_flow": "row wrap", - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": "hidden", - "width": "100%" - } - }, - "2e49603fb8454b538257b9297507122d": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "2e9e4d42c79943d6b898f71a64c77d2a": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_c58ffcd54aff4df5bee07cbd5fc0ac9e", - "placeholder": "​", - "style": "IPY_MODEL_0d957465db5048e2b4a1a144a29b2d6f", - "tabbable": null, - "tooltip": null, - "value": "Predicting DataLoader 0: 100%" - } - }, - "30485ca293ea4d7ba1591727897f2e28": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": "2", - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "33a1e5f21b694e3bb62d2c0d73aa65e3": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "34b327966f2b4573a30331a4ca2bad36": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_2d9aeac5b4d6406b95f41030b3902ead", - "placeholder": "​", - "style": "IPY_MODEL_fdd3021d0aba4ea19d02b9fde8e01e6c", - "tabbable": null, - "tooltip": null, - "value": "Sanity Checking DataLoader 0: 100%" - } - }, - "34ff67844e7742bcb40b5fc0d4d6c475": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_f856cbb51d3c4b31bf7ca98d7f387fc7", - "placeholder": "​", - "style": "IPY_MODEL_4ca73580d9ae4cd190da8d2e36e27a89", - "tabbable": null, - "tooltip": null, - "value": " 9/9 [00:00<00:00, 15.73it/s]" - } - }, - "374f1f4cb472482eaad8c7a00eaf3217": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_dc3ad9baee4b4f58b69a3af4891deb4d", - "placeholder": "​", - "style": "IPY_MODEL_6b5a84943e524c559a68099c05220f2c", - "tabbable": null, - "tooltip": null, - "value": " 60/60 [00:03<00:00, 15.65it/s]" - } - }, - "377ab5bbba5a46c3bb65d29ff2eac00b": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "ProgressView", - "bar_style": "", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_0108dec7eb894503ba2e7e1bd33e814b", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_6ab9f5c0352f4da7acda358e07fd7793", - "tabbable": null, - "tooltip": null, - "value": 1 - } - }, - "37994d5bc49f4e70985436884f91c290": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_2e9e4d42c79943d6b898f71a64c77d2a", - "IPY_MODEL_c2baeafd63d84115a4adc58542390e6a", - "IPY_MODEL_2c0e791c673e4df3b964a8315ab47fe2" - ], - "layout": "IPY_MODEL_d0ebcd6e60bd4cb1b0004e20d4cbf868", - "tabbable": null, - "tooltip": null - } - }, - "37db4be2353f436abf3ec0a71dca8e39": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": "2", - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "386a2097c02f4af6ba239e385f4b0b47": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "3ab523d60fd249a7bcece32280872abd": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_ef8e78e4f8a248dcbbc2ea3e464c5922", - "IPY_MODEL_56685ebbfd244154bd1829dec6f0db0b", - "IPY_MODEL_dc5f9a923d27492cb382691ec01a1ddc" - ], - "layout": "IPY_MODEL_58995b1bd1c24433a3aca0ab53c6b8bf", - "tabbable": null, - "tooltip": null - } - }, - "3c5c1f55d5a64838b94fc0fbd85097c6": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": "2", - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "3f8cc20607db40c7acb4110feba9ab0d": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "3f985da9d6a245c5b54dbb47926a4fd4": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "409d65e2b79f49318c580d9835ffc29c": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": "inline-flex", - "flex": null, - "flex_flow": "row wrap", - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": "hidden", - "width": "100%" - } - }, - "418156a6b73246dc86e8fce9112c14ea": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "41b14de355a04031ad4deabdadc6f9fe": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": "2", - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "42707b895305490b82cd644250e689fa": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "ProgressView", - "bar_style": "", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_464464a47d604d708be37e18edec4810", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_c7ca9662eae04999b21de91c183a0856", - "tabbable": null, - "tooltip": null, - "value": 1 - } - }, - "464464a47d604d708be37e18edec4810": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": "2", - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "4905c6d809274aa39a984e3e458fc89a": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "ProgressView", - "bar_style": "", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_3c5c1f55d5a64838b94fc0fbd85097c6", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_4f5cce37b6ac430e85757dd06b06953a", - "tabbable": null, - "tooltip": null, - "value": 1 - } - }, - "4b0ccc7bbcc146a5bccc9b41483fb505": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "4ca73580d9ae4cd190da8d2e36e27a89": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "4e2b7089a69644e9a1ff3afd7524d491": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_1380306827ec4169a896b9ffcbeb8c2c", - "placeholder": "​", - "style": "IPY_MODEL_828c025cedfc483e9fb0af4f7c7b9393", - "tabbable": null, - "tooltip": null, - "value": "Validation DataLoader 0: 100%" - } - }, - "4ecdea6764d145118ab53e59451d2b0c": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_e7b969aa6d8e433d9aeeac4357bc425d", - "IPY_MODEL_42707b895305490b82cd644250e689fa", - "IPY_MODEL_19c3c106d5a9489cae445a0b5fc88183" - ], - "layout": "IPY_MODEL_a6e5908902eb40e997e6086287f28f2a", - "tabbable": null, - "tooltip": null - } - }, - "4f5cce37b6ac430e85757dd06b06953a": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "51382e4f2efc4f9ea25254c3ccc07ba0": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "53ebd9b8a8e54e93a572dd807d9fafd4": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "ProgressView", - "bar_style": "", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_06458336850c4c838ad02188538c6c64", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_6ffbcceb8ca6487dbcd7e1b03f78d957", - "tabbable": null, - "tooltip": null, - "value": 1 - } - }, - "56685ebbfd244154bd1829dec6f0db0b": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "ProgressView", - "bar_style": "", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_f91e202108684aa9af76fdf3e9d83206", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_f617590dcd184fd99f98515940ac85af", - "tabbable": null, - "tooltip": null, - "value": 1 - } - }, - "568141e0b45f44ff9b497c6474d8019f": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "572629c64cfd46a983f1a8c6483a2cf1": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_61f356a200c5470db777e7e0f9e8c520", - "IPY_MODEL_4905c6d809274aa39a984e3e458fc89a", - "IPY_MODEL_b16522c88ebb435f96c05315ef91ebbb" - ], - "layout": "IPY_MODEL_65cce98698644285896363e509ae6139", - "tabbable": null, - "tooltip": null - } - }, - "58995b1bd1c24433a3aca0ab53c6b8bf": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": "inline-flex", - "flex": null, - "flex_flow": "row wrap", - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": "hidden", - "width": "100%" - } - }, - "5ab64c01efb84e75af1a8aaf6675f5bf": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "5b3be082628244948284a40bea451ff1": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "5cad874f97cb4132a987dc1908bba9aa": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "5e40761af7644c9aa7861c62c75ed441": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "61f356a200c5470db777e7e0f9e8c520": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_a4a4c07f117e46989cb4877a5d2dd9e0", - "placeholder": "​", - "style": "IPY_MODEL_3f8cc20607db40c7acb4110feba9ab0d", - "tabbable": null, - "tooltip": null, - "value": "Validation DataLoader 0: 100%" - } - }, - "640d3876c2ce49de9757962b5b5b0e32": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "64622e3cde0543918d827a5bccee0abd": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "65cce98698644285896363e509ae6139": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": "inline-flex", - "flex": null, - "flex_flow": "row wrap", - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": "hidden", - "width": "100%" - } - }, - "66628b3d61634d44b911582f00355793": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "679072fe36f5404588879eab670e01e2": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": "2", - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "67a3d79f1b2e4e03b9a564286c04d5d4": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "68689a954b69463ba4a2f02ed26d41a9": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "690e2dc613364e5b9e3f204c76798f12": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": "inline-flex", - "flex": null, - "flex_flow": "row wrap", - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": "hidden", - "width": "100%" - } - }, - "6a62c54d7d7b4f689dc31e57aaa20411": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "6ab9f5c0352f4da7acda358e07fd7793": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "6ae72c38fbe742ac850b2cb60d7faa2e": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "6b5a84943e524c559a68099c05220f2c": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "6cfa122301624a2e9efd2364d1d114bb": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_4b0ccc7bbcc146a5bccc9b41483fb505", - "placeholder": "​", - "style": "IPY_MODEL_6df22cc241a843ccab44daa16db38136", - "tabbable": null, - "tooltip": null, - "value": " 9/9 [00:00<00:00, 13.98it/s]" - } - }, - "6df22cc241a843ccab44daa16db38136": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "6ffbcceb8ca6487dbcd7e1b03f78d957": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "70518e8f3e704fed9d91cf2eb28546d6": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": "2", - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "72fb23e179594f35a68418e2e0ee65fc": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "ProgressView", - "bar_style": "", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_15e539660a2547f49fb2cf8a6143f5fa", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_c46b831b37a347868f1d35d0dbbfd923", - "tabbable": null, - "tooltip": null, - "value": 1 - } - }, - "762d1c8b6c2a4b7996c0ed9dfabe8f8c": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_d57a2d0bbbb246f9b049024de69cea94", - "placeholder": "​", - "style": "IPY_MODEL_ed8f3f06633c4f249a8311e311118c97", - "tabbable": null, - "tooltip": null, - "value": "Validation DataLoader 0: 100%" - } - }, - "7808bf48e45940cfa0d4bccae784d730": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_3f985da9d6a245c5b54dbb47926a4fd4", - "placeholder": "​", - "style": "IPY_MODEL_5ab64c01efb84e75af1a8aaf6675f5bf", - "tabbable": null, - "tooltip": null, - "value": " 9/9 [00:00<00:00, 16.19it/s]" - } - }, - "78f2d725dcb34deca5407c277c384d8d": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_e1dc997d76d54eb9a9245530a60c2cd9", - "IPY_MODEL_8fa00a6415b74091a012bc5fff543f42", - "IPY_MODEL_c74c472cdf174a28a4ca3fed1b312332" - ], - "layout": "IPY_MODEL_409d65e2b79f49318c580d9835ffc29c", - "tabbable": null, - "tooltip": null - } - }, - "7cce8e0bd68b4fe69a1e67f4b695c31f": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "ProgressView", - "bar_style": "", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_70518e8f3e704fed9d91cf2eb28546d6", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_5cad874f97cb4132a987dc1908bba9aa", - "tabbable": null, - "tooltip": null, - "value": 1 - } - }, - "7e95bdbc3a6c46bf8b1e96bdecfa7303": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "7f23a8e77dce4f38a764c7637fe10b78": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "7f3b3e4f12e04abc9baf01711628f447": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "ProgressView", - "bar_style": "success", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_2151663ad02a429cac5a52a90371ce95", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_f07bfb9fa06342389b5fec3fb19d59f1", - "tabbable": null, - "tooltip": null, - "value": 1 - } - }, - "803a672f660842f6ab949ea62fc9e44e": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_969658209b1043c59b4c931280fd2f5f", - "IPY_MODEL_7cce8e0bd68b4fe69a1e67f4b695c31f", - "IPY_MODEL_e2039b30418048d8a030037d2f711498" - ], - "layout": "IPY_MODEL_690e2dc613364e5b9e3f204c76798f12", - "tabbable": null, - "tooltip": null - } - }, - "828c025cedfc483e9fb0af4f7c7b9393": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "83af6fa1a89c44398eaa18bc89031fa8": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_762d1c8b6c2a4b7996c0ed9dfabe8f8c", - "IPY_MODEL_53ebd9b8a8e54e93a572dd807d9fafd4", - "IPY_MODEL_6cfa122301624a2e9efd2364d1d114bb" - ], - "layout": "IPY_MODEL_a4a42a7c37fd4d22b2af0495f6b77292", - "tabbable": null, - "tooltip": null - } - }, - "86d1a5f363394cc18785ac88a22d76d3": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_c5db7875e835420cb238605415521449", - "IPY_MODEL_7f3b3e4f12e04abc9baf01711628f447", - "IPY_MODEL_13053e2cc53b4d86a18835d3cf62d9a0" - ], - "layout": "IPY_MODEL_a7637150a8614da1a9df8e820c3a5195", - "tabbable": null, - "tooltip": null - } - }, - "870e865f5c3c48d88971b7d4a0f18f1f": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "87c0a054bd0a4cc38bdaa2ef39bb30ae": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_f8bb72058f0141c69e0dac07c0ad4bbd", - "IPY_MODEL_377ab5bbba5a46c3bb65d29ff2eac00b", - "IPY_MODEL_34ff67844e7742bcb40b5fc0d4d6c475" - ], - "layout": "IPY_MODEL_ab042b4a1b0644c9819cc0d21ca1f13f", - "tabbable": null, - "tooltip": null - } - }, - "8c09917e05734fd4ac283d3f6ec98de3": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": "inline-flex", - "flex": null, - "flex_flow": "row wrap", - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": "hidden", - "width": "100%" - } - }, - "8c8c8832e16c4d489e0df7514dc78f6a": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "8d0747756fd2434399ae8d233a82d607": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_f77d800d097b494ca3e945abdaedd75c", - "IPY_MODEL_05a14444ea4043dea69a4e7185e66cb1", - "IPY_MODEL_b775518f409449928c3211260d7223c0" - ], - "layout": "IPY_MODEL_2db9a1e74ad14139af235f1a2a146e0a", - "tabbable": null, - "tooltip": null - } - }, - "8fa00a6415b74091a012bc5fff543f42": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "ProgressView", - "bar_style": "", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_679072fe36f5404588879eab670e01e2", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_ab72364dc8cf433e907c40df3e7be9e9", - "tabbable": null, - "tooltip": null, - "value": 1 - } - }, - "9082a1b6eb3a4d14b4c92eedec1c2404": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "922dfb34c7494b20a874e294c07447e0": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "ProgressView", - "bar_style": "success", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_f99327891eeb424b9df4fe04a6bedcfb", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_04804ca4c425464db2754abf3cf95568", - "tabbable": null, - "tooltip": null, - "value": 1 - } - }, - "942645c506ea436fb598455d84c8a970": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "955c5e9c139148a1a352d17202fe097f": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_f0fbcbcf02e443bc99a469cf4c7f8131", - "IPY_MODEL_72fb23e179594f35a68418e2e0ee65fc", - "IPY_MODEL_7808bf48e45940cfa0d4bccae784d730" - ], - "layout": "IPY_MODEL_ed0358a45ec14ce687fc02904a815e38", - "tabbable": null, - "tooltip": null - } - }, - "969658209b1043c59b4c931280fd2f5f": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_eda10823474b40949452e97f0259009f", - "placeholder": "​", - "style": "IPY_MODEL_51382e4f2efc4f9ea25254c3ccc07ba0", - "tabbable": null, - "tooltip": null, - "value": "Validation DataLoader 0: 100%" - } - }, - "969a3ddfaed84150944d697307ababe4": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "96eda6cd2fbc47b9a29d2cf176332058": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_386a2097c02f4af6ba239e385f4b0b47", - "placeholder": "​", - "style": "IPY_MODEL_7e95bdbc3a6c46bf8b1e96bdecfa7303", - "tabbable": null, - "tooltip": null, - "value": " 42/42 [00:04<00:00,  9.34it/s, v_num=0, train_loss_step=0.142, val_loss=0.110, val_MAE=0.110, val_SMAPE=0.403, train_loss_epoch=0.115, train_MAE=0.115, train_SMAPE=0.414]" - } - }, - "9d5419fc33de4216807044da7fe61524": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_4e2b7089a69644e9a1ff3afd7524d491", - "IPY_MODEL_10f011e768704402a8d46f6377c6364e", - "IPY_MODEL_f542ed5ec0204587a03813849b712b2e" - ], - "layout": "IPY_MODEL_e1c67f9cef4a4bb79411efc427122c2c", - "tabbable": null, - "tooltip": null - } - }, - "a4a42a7c37fd4d22b2af0495f6b77292": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": "inline-flex", - "flex": null, - "flex_flow": "row wrap", - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": "hidden", - "width": "100%" - } - }, - "a4a4c07f117e46989cb4877a5d2dd9e0": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "a553dd138d714a18af6c0713e1b43897": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_34b327966f2b4573a30331a4ca2bad36", - "IPY_MODEL_2012c67eef9d43099e0566c866d24043", - "IPY_MODEL_abd2f8bdab144398b139ba1653e325b7" - ], - "layout": "IPY_MODEL_8c09917e05734fd4ac283d3f6ec98de3", - "tabbable": null, - "tooltip": null - } - }, - "a6c3a711dc41433a8b255a68f9b3a8a2": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": "inline-flex", - "flex": null, - "flex_flow": "row wrap", - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": "100%" - } - }, - "a6e5908902eb40e997e6086287f28f2a": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": "inline-flex", - "flex": null, - "flex_flow": "row wrap", - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": "hidden", - "width": "100%" - } - }, - "a7637150a8614da1a9df8e820c3a5195": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": "inline-flex", - "flex": null, - "flex_flow": "row wrap", - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": "100%" - } - }, - "a9e0349ab6494ec09a6f909e152f685d": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_f648ccd5714f4f0fa5f9710d6a26a5a8", - "IPY_MODEL_168a880240964d0194f1b986eacbcd29", - "IPY_MODEL_d44ceef01cd24e9aa3090b6f85d784aa" - ], - "layout": "IPY_MODEL_01487f5cfc2e4a79b5b310c7732cba16", - "tabbable": null, - "tooltip": null - } - }, - "ab042b4a1b0644c9819cc0d21ca1f13f": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": "inline-flex", - "flex": null, - "flex_flow": "row wrap", - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": "hidden", - "width": "100%" - } - }, - "ab72364dc8cf433e907c40df3e7be9e9": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "abd2f8bdab144398b139ba1653e325b7": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_66628b3d61634d44b911582f00355793", - "placeholder": "​", - "style": "IPY_MODEL_6ae72c38fbe742ac850b2cb60d7faa2e", - "tabbable": null, - "tooltip": null, - "value": " 2/2 [00:00<00:00, 16.83it/s]" - } - }, - "ad5be790369941ea9aa51bc297740f54": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "ProgressView", - "bar_style": "success", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_30485ca293ea4d7ba1591727897f2e28", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_5e40761af7644c9aa7861c62c75ed441", - "tabbable": null, - "tooltip": null, - "value": 1 - } - }, - "aff8baef21494ccf99bf092fc3daaae0": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "b16522c88ebb435f96c05315ef91ebbb": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_942645c506ea436fb598455d84c8a970", - "placeholder": "​", - "style": "IPY_MODEL_969a3ddfaed84150944d697307ababe4", - "tabbable": null, - "tooltip": null, - "value": " 9/9 [00:00<00:00, 10.67it/s]" - } - }, - "b5e879fa1fee4d0ba30ac5af07d1d8c5": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "b775518f409449928c3211260d7223c0": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_bf96e25bd5d64892a329b624961abeb8", - "placeholder": "​", - "style": "IPY_MODEL_b5e879fa1fee4d0ba30ac5af07d1d8c5", - "tabbable": null, - "tooltip": null, - "value": " 9/9 [00:00<00:00, 14.42it/s]" - } - }, - "b8ca7fe5fc534f3bbecc9130102a3129": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_12cb9f1a3f5b4111a995bba45ea38ca3", - "placeholder": "​", - "style": "IPY_MODEL_d89abdeee4a6494abc9be8dd1da0ec0c", - "tabbable": null, - "tooltip": null, - "value": "Predicting DataLoader 0: 100%" - } - }, - "bc0b2a7717d14663bafd06df6462469f": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "bf96e25bd5d64892a329b624961abeb8": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "c12b35d0715a4ae580557cd6c17740c8": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "c232241e3ca24eddb2dae0f9ceb7e114": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_b8ca7fe5fc534f3bbecc9130102a3129", - "IPY_MODEL_ad5be790369941ea9aa51bc297740f54", - "IPY_MODEL_374f1f4cb472482eaad8c7a00eaf3217" - ], - "layout": "IPY_MODEL_a6c3a711dc41433a8b255a68f9b3a8a2", - "tabbable": null, - "tooltip": null - } - }, - "c2baeafd63d84115a4adc58542390e6a": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "FloatProgressModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "FloatProgressModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "ProgressView", - "bar_style": "success", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_0b59e2c8901d40d79ceb08156d1c4e1d", - "max": 1, - "min": 0, - "orientation": "horizontal", - "style": "IPY_MODEL_da6a1fefd37b4a74a77eaf48d09a1d1b", - "tabbable": null, - "tooltip": null, - "value": 1 - } - }, - "c46b831b37a347868f1d35d0dbbfd923": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "c52bb8ff12db4df3a05cf1da7b5470f7": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HBoxModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HBoxModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HBoxView", - "box_style": "", - "children": [ - "IPY_MODEL_273fb7ccddeb476f9c76bd1be44a6ae0", - "IPY_MODEL_922dfb34c7494b20a874e294c07447e0", - "IPY_MODEL_96eda6cd2fbc47b9a29d2cf176332058" - ], - "layout": "IPY_MODEL_d2ed70b544924436b185f79d0cd90862", - "tabbable": null, - "tooltip": null - } - }, - "c58ffcd54aff4df5bee07cbd5fc0ac9e": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "c5db7875e835420cb238605415521449": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_bc0b2a7717d14663bafd06df6462469f", - "placeholder": "​", - "style": "IPY_MODEL_418156a6b73246dc86e8fce9112c14ea", - "tabbable": null, - "tooltip": null, - "value": "Epoch 4: 100%" - } - }, - "c74c472cdf174a28a4ca3fed1b312332": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_d56c627297bd435fbbc60317066084f9", - "placeholder": "​", - "style": "IPY_MODEL_6a62c54d7d7b4f689dc31e57aaa20411", - "tabbable": null, - "tooltip": null, - "value": " 9/9 [00:00<00:00, 13.11it/s]" - } - }, - "c7ca9662eae04999b21de91c183a0856": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "d0ebcd6e60bd4cb1b0004e20d4cbf868": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": "inline-flex", - "flex": null, - "flex_flow": "row wrap", - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": "100%" - } - }, - "d2ed70b544924436b185f79d0cd90862": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": "inline-flex", - "flex": null, - "flex_flow": "row wrap", - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": "100%" - } - }, - "d3e3d7deb36441539c459e24ab2d8aa3": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "d44ceef01cd24e9aa3090b6f85d784aa": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_21e78da0f7204d5e8ccfc92cc39be9ae", - "placeholder": "​", - "style": "IPY_MODEL_12b11fd7fb53408e92e79ad50cfdd433", - "tabbable": null, - "tooltip": null, - "value": " 9/9 [00:01<00:00,  8.98it/s]" - } - }, - "d56c627297bd435fbbc60317066084f9": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "d57a2d0bbbb246f9b049024de69cea94": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "d71a01b309e948239a16062097ee76a2": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "d89abdeee4a6494abc9be8dd1da0ec0c": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "da6a1fefd37b4a74a77eaf48d09a1d1b": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "dc3ad9baee4b4f58b69a3af4891deb4d": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "dc5f9a923d27492cb382691ec01a1ddc": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_33a1e5f21b694e3bb62d2c0d73aa65e3", - "placeholder": "​", - "style": "IPY_MODEL_8c8c8832e16c4d489e0df7514dc78f6a", - "tabbable": null, - "tooltip": null, - "value": " 9/9 [00:00<00:00, 15.40it/s]" - } - }, - "de1138c4a27d44dabe2179511b31160e": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "df8d7458b0fa4f508d4ce357fc95c609": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "e0fa236745204d5ba2dbc1ff2c51f1a2": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "e1c67f9cef4a4bb79411efc427122c2c": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": "inline-flex", - "flex": null, - "flex_flow": "row wrap", - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": "hidden", - "width": "100%" - } - }, - "e1dc997d76d54eb9a9245530a60c2cd9": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_568141e0b45f44ff9b497c6474d8019f", - "placeholder": "​", - "style": "IPY_MODEL_1a889d0b55bb4e6d80d5f170297a6262", - "tabbable": null, - "tooltip": null, - "value": "Validation DataLoader 0: 100%" - } - }, - "e2039b30418048d8a030037d2f711498": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_29be52da8ab2448e902bf9a9a264e5dd", - "placeholder": "​", - "style": "IPY_MODEL_de1138c4a27d44dabe2179511b31160e", - "tabbable": null, - "tooltip": null, - "value": " 9/9 [00:00<00:00,  9.37it/s]" - } - }, - "e7b969aa6d8e433d9aeeac4357bc425d": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_f23d99cc4f01426eb4fc8d41fc8f4b16", - "placeholder": "​", - "style": "IPY_MODEL_df8d7458b0fa4f508d4ce357fc95c609", - "tabbable": null, - "tooltip": null, - "value": "Sanity Checking DataLoader 0: 100%" - } - }, - "e82943533ad54539a777d6adae271d0f": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "ed0358a45ec14ce687fc02904a815e38": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": "inline-flex", - "flex": null, - "flex_flow": "row wrap", - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": "hidden", - "width": "100%" - } - }, - "ed8f3f06633c4f249a8311e311118c97": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "eda10823474b40949452e97f0259009f": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "ef8e78e4f8a248dcbbc2ea3e464c5922": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_9082a1b6eb3a4d14b4c92eedec1c2404", - "placeholder": "​", - "style": "IPY_MODEL_13eb0c5265ad48d08b3f8e46a55896f0", - "tabbable": null, - "tooltip": null, - "value": "Validation DataLoader 0: 100%" - } - }, - "f07bfb9fa06342389b5fec3fb19d59f1": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "f0fbcbcf02e443bc99a469cf4c7f8131": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_67a3d79f1b2e4e03b9a564286c04d5d4", - "placeholder": "​", - "style": "IPY_MODEL_27fd0da590314bb68dfac5b7c72d6584", - "tabbable": null, - "tooltip": null, - "value": "Validation DataLoader 0: 100%" - } - }, - "f23d99cc4f01426eb4fc8d41fc8f4b16": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "f542ed5ec0204587a03813849b712b2e": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_d3e3d7deb36441539c459e24ab2d8aa3", - "placeholder": "​", - "style": "IPY_MODEL_7f23a8e77dce4f38a764c7637fe10b78", - "tabbable": null, - "tooltip": null, - "value": " 9/9 [00:00<00:00, 15.87it/s]" - } - }, - "f617590dcd184fd99f98515940ac85af": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "ProgressStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "ProgressStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "bar_color": null, - "description_width": "" - } - }, - "f648ccd5714f4f0fa5f9710d6a26a5a8": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_64622e3cde0543918d827a5bccee0abd", - "placeholder": "​", - "style": "IPY_MODEL_00e7ff7f5a1646e887b35fb22ab4a8b0", - "tabbable": null, - "tooltip": null, - "value": "Validation DataLoader 0: 100%" - } - }, - "f77d800d097b494ca3e945abdaedd75c": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_2bcdfdf1b12c495aa8b425c88fcfbd1b", - "placeholder": "​", - "style": "IPY_MODEL_d71a01b309e948239a16062097ee76a2", - "tabbable": null, - "tooltip": null, - "value": "Validation DataLoader 0: 100%" - } - }, - "f856cbb51d3c4b31bf7ca98d7f387fc7": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": null, - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "f8bb72058f0141c69e0dac07c0ad4bbd": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLModel", - "state": { - "_dom_classes": [], - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": "2.0.0", - "_view_name": "HTMLView", - "description": "", - "description_allow_html": false, - "layout": "IPY_MODEL_01d5bef8db0c42a7a82f9600a6ee7549", - "placeholder": "​", - "style": "IPY_MODEL_ffb26eb93aa049b1a2a808c60dc9508a", - "tabbable": null, - "tooltip": null, - "value": "Validation DataLoader 0: 100%" - } - }, - "f91e202108684aa9af76fdf3e9d83206": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": "2", - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "f99327891eeb424b9df4fe04a6bedcfb": { - "model_module": "@jupyter-widgets/base", - "model_module_version": "2.0.0", - "model_name": "LayoutModel", - "state": { - "_model_module": "@jupyter-widgets/base", - "_model_module_version": "2.0.0", - "_model_name": "LayoutModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "LayoutView", - "align_content": null, - "align_items": null, - "align_self": null, - "border_bottom": null, - "border_left": null, - "border_right": null, - "border_top": null, - "bottom": null, - "display": null, - "flex": "2", - "flex_flow": null, - "grid_area": null, - "grid_auto_columns": null, - "grid_auto_flow": null, - "grid_auto_rows": null, - "grid_column": null, - "grid_gap": null, - "grid_row": null, - "grid_template_areas": null, - "grid_template_columns": null, - "grid_template_rows": null, - "height": null, - "justify_content": null, - "justify_items": null, - "left": null, - "margin": null, - "max_height": null, - "max_width": null, - "min_height": null, - "min_width": null, - "object_fit": null, - "object_position": null, - "order": null, - "overflow": null, - "padding": null, - "right": null, - "top": null, - "visibility": null, - "width": null - } - }, - "fb5c4ef912a54a96a4aaacbd9b7d0517": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "fdd3021d0aba4ea19d02b9fde8e01e6c": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - }, - "ffb26eb93aa049b1a2a808c60dc9508a": { - "model_module": "@jupyter-widgets/controls", - "model_module_version": "2.0.0", - "model_name": "HTMLStyleModel", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": "2.0.0", - "_model_name": "HTMLStyleModel", - "_view_count": null, - "_view_module": "@jupyter-widgets/base", - "_view_module_version": "2.0.0", - "_view_name": "StyleView", - "background": null, - "description_width": "", - "font_size": null, - "text_color": null - } - } - } } }, "nbformat": 4, From c1e34269020ab69b53b51310dfdacd00ee4d3fc7 Mon Sep 17 00:00:00 2001 From: Aryan Saini Date: Sun, 7 Dec 2025 23:30:10 +0530 Subject: [PATCH 12/13] add comments --- docs/source/tutorials/ptf_V2_example.ipynb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/source/tutorials/ptf_V2_example.ipynb b/docs/source/tutorials/ptf_V2_example.ipynb index 9cee1c05a..1fd928db8 100644 --- a/docs/source/tutorials/ptf_V2_example.ipynb +++ b/docs/source/tutorials/ptf_V2_example.ipynb @@ -670,7 +670,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", @@ -938,7 +938,7 @@ } ], "source": [ - "model_pkg.fit(dataset)" + "model_pkg.fit(dataset) # You can also pass in a DataModule here" ] }, { @@ -956,7 +956,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", @@ -1011,7 +1011,8 @@ } ], "source": [ - "preds = model_pkg.predict(dataset, return_info=[\"index\", \"x\", \"y\"])" + "preds = model_pkg.predict(dataset, return_info=[\"index\", \"x\", \"y\"])\n", + "# You can also pass in a DataModule or Dataloader here" ] }, { From ba74f1e1c8e811fd2230ca6c9ffb324d4237b280 Mon Sep 17 00:00:00 2001 From: Aryan Saini Date: Sun, 7 Dec 2025 23:46:32 +0530 Subject: [PATCH 13/13] update notebook --- docs/source/tutorials/ptf_V2_example.ipynb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/source/tutorials/ptf_V2_example.ipynb b/docs/source/tutorials/ptf_V2_example.ipynb index 1fd928db8..1419b8360 100644 --- a/docs/source/tutorials/ptf_V2_example.ipynb +++ b/docs/source/tutorials/ptf_V2_example.ipynb @@ -1660,7 +1660,17 @@ }, { "cell_type": "code", - "execution_count": 62, + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "data_module.setup(stage=\"test\")\n", + "test_dataloader = data_module.test_dataloader()" + ] + }, + { + "cell_type": "code", + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", @@ -1713,7 +1723,7 @@ } ], "source": [ - "preds = model.predict(data_module.test_dataloader(), return_info=[\"index\", \"x\", \"y\"])" + "preds = model.predict(test_dataloader, return_info=[\"index\", \"x\", \"y\"])" ] }, {