Skip to content

Commit

Permalink
Merge pull request #997 from jdb78/feature/release
Browse files Browse the repository at this point in the history
0.10.2 release
  • Loading branch information
jdb78 committed May 23, 2022
2 parents 2f72303 + f0331b9 commit 9d8e985
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 218 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release Notes

## v0.10.2 Multivariate networks (UNRELEASED)
## v0.10.2 Multivariate networks (23/05/2022)

### Added

Expand Down
6 changes: 6 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ or to install via conda
conda install pytorch-forecasting pytorch>=1.7 -c pytorch -c conda-forge
To use the MQF2 loss (multivariate quantile loss), also execute

.. code-block::
pip install git+https://github.com/KelvinKan/CP-Flow.git@package-specific-version --no-deps
Vist :ref:`Getting started <getting-started>` to learn more about the package and detailled installation instruction.
The :ref:`Tutorials <tutorials>` section provides guidance on how to use models and implement new ones.

Expand Down
211 changes: 0 additions & 211 deletions pytorch_forecasting/models/basic_rnn/__init__.py

This file was deleted.

12 changes: 6 additions & 6 deletions pytorch_forecasting/models/nhits/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,23 +417,23 @@ def plot_interpretation(
plt.Figure: matplotlib figure
"""
if not isinstance(self.loss, MultiLoss): # not multi-target
prediction = self.to_prediction(dict(prediction=output["prediction"][[idx]].detach().cpu()))[0]
prediction = self.to_prediction(dict(prediction=output["prediction"][[idx]].detach()))[0].cpu()
block_forecasts = [
self.to_prediction(dict(prediction=block[[idx]].detach().cpu()))[0]
self.to_prediction(dict(prediction=block[[idx]].detach()))[0].cpu()
for block in output["block_forecasts"]
]
elif isinstance(output["prediction"], (tuple, list)): # multi-target
figs = []
# predictions and block forecasts need to be converted
prediction = [p[[idx]].detach().cpu() for p in output["prediction"]] # select index
prediction = [p[[idx]].detach() for p in output["prediction"]] # select index
prediction = self.to_prediction(dict(prediction=prediction)) # transform to prediction
prediction = [p[0] for p in prediction] # select first and only index
prediction = [p[0].cpu() for p in prediction] # select first and only index

block_forecasts = [
self.to_prediction(dict(prediction=[b[[idx]].detach().cpu() for b in block]))
self.to_prediction(dict(prediction=[b[[idx]].detach() for b in block]))
for block in output["block_forecasts"]
]
block_forecasts = [[b[0] for b in block] for block in block_forecasts]
block_forecasts = [[b[0].cpu() for b in block] for block in block_forecasts]

for i in range(len(self.target_names)):
if ax is not None:
Expand Down

0 comments on commit 9d8e985

Please sign in to comment.