Hi team tried to run Colab with transfer learning ...
# general
v
Hi team tried to run Colab with transfer learning from Nixtla github over weekend but got error. https://colab.research.google.com/drive/1uFCO2UBpH-5l2fk3KmxfU0oupsOC6v2n?authuser=0&pli=1#scrollTo=I4eQDyW08bjm how can one fix this please?
m
Hi! Sure. Let us take a look and come back to you.
👍 2
c
I think separate classes for
MQ_*
are no longer the approach, dropped in favour of the MQ loss function. Try on the import line:
Copy code
from neuralforecast.models import NHITS

from neuralforecast.losses.pytorch import MQLoss
and then further down pass the class the loss function:
Copy code
levels = [5, 50, 95]
model = NHITS(..., loss=MQLoss(level=levels))
m
Thanks! @Kin Gtz. Olivares, any more pointers?
c
if there's interest I can look at putting up an MR that brings https://github.com/Nixtla/transfer-learning-time-series/blob/main/nbs/Transfer_Learning.ipynb up to date with
v1.0.0
k
Indeed @Valeriy and @Chris Gervais We deprecated the creation of MQmodels in favor of the modularity of the loss input parameter. Cristian and I are working on replicating the transfer learning experiments with the refactored neuralforecast code In case you want to continue running the previous experiments use !pip install neuralforecast==0.1.0 We will let you know when the new version is ready!
👍 4
m
@Chris Gervais, thanks for offering help. We will definitely come back to you. ;)
v
Thanks @Max (Nixtla) @Kin Gtz. Olivares and @Chris Gervais
m
Guys, we just merged the notebook.
🙌 1
k
Hi @Chris Gervais and @Valeriy Here is a working example of Transfer-learning where we pretrain on M4 and test on Box-Cox AirPassengers improving StatsForecast AutoARIMA: https://nixtla.github.io/neuralforecast/examples/transfer_learning.html
🙏 1
c
amazing, will try to check it out this week and circle back if we have questions / feedback
v
Great stuff