-
Notifications
You must be signed in to change notification settings - Fork 773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaking: change num_output with quantiles in TFT (mxnet) #2879
Breaking: change num_output with quantiles in TFT (mxnet) #2879
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @baniasbaabe, thanks for the PR! I generally agree with this change, I only have a couple of comments inline.
Note that this would be a breaking change: if merged, it will not be included in a release before 0.14.0.
src/gluonts/mx/model/tft/_network.py
Outdated
@@ -151,7 +151,8 @@ def __init__( | |||
d_var: int, | |||
d_hidden: int, | |||
n_head: int, | |||
n_output: int, | |||
#n_output: int, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be removed instead of commented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it sneaked into it :)
src/gluonts/mx/model/tft/_network.py
Outdated
([i / 10, 1.0 - i / 10] for i in range(1, (n_output + 1) // 2)), | ||
[0.5], | ||
) | ||
# self.n_output = n_output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
@baniasbaabe just out of curiosity, is there any particular reason to prefer the MXNet implementation of TFT over the PyTorch one? |
I'm not a big fan of MXNet, but there are indeed some organizations that rely on MXNet and maybe build their model pipelines around it. Most of the gluonts models were MXNet based some versions ago :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @baniasbaabe, and sorry it took a bit long but this can be merged 🚀 I just added minor styling changes
Issue #, if available:
Description of changes:
The TFT model with MXNet implementation, the quantiles are calculated based on
num_outputs
. This is a bit counter-intuitive, so why can I not give the model custom quantiles? Another limitation was that the automatically calculated quantiles could return negative values for highnum_outputs
. So I change the attribute toquantiles
where you can give the model a list of floats (like MQCNN).By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Please tag this pr with at least one of these labels to make our release process faster: BREAKING, new feature, bug fix, other change, dev setup