Skip to content
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

Merged
merged 6 commits into from
Aug 30, 2023
Merged

Breaking: change num_output with quantiles in TFT (mxnet) #2879

merged 6 commits into from
Aug 30, 2023

Conversation

baniasbaabe
Copy link
Contributor

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 high num_outputs. So I change the attribute to quantiles 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

Copy link
Contributor

@lostella lostella left a 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.

@@ -151,7 +151,8 @@ def __init__(
d_var: int,
d_hidden: int,
n_head: int,
n_output: int,
#n_output: int,
Copy link
Contributor

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?

Copy link
Contributor Author

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 :)

([i / 10, 1.0 - i / 10] for i in range(1, (n_output + 1) // 2)),
[0.5],
)
# self.n_output = n_output
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@lostella lostella added the BREAKING This is a breaking change (one of pr required labels) label May 22, 2023
@lostella
Copy link
Contributor

lostella commented May 22, 2023

@baniasbaabe just out of curiosity, is there any particular reason to prefer the MXNet implementation of TFT over the PyTorch one?

@baniasbaabe
Copy link
Contributor Author

@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 :)

@lostella lostella added this to the v0.14 milestone Jun 20, 2023
@lostella lostella added the enhancement New feature or request label Aug 30, 2023
lostella
lostella previously approved these changes Aug 30, 2023
Copy link
Contributor

@lostella lostella left a 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

@lostella lostella changed the title Change num_output with quantiles Breaking: change num_output with quantiles in TFT (mxnet implementation) Aug 30, 2023
@lostella lostella added the mxnet This concerns the MXNet side of GluonTS label Aug 30, 2023
@lostella lostella changed the title Breaking: change num_output with quantiles in TFT (mxnet implementation) Breaking: change num_output with quantiles in TFT (mxnet) Aug 30, 2023
@lostella lostella merged commit b19238f into awslabs:dev Aug 30, 2023
@baniasbaabe baniasbaabe deleted the refactor/tft-with-custom-quantiles branch November 25, 2023 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BREAKING This is a breaking change (one of pr required labels) enhancement New feature or request mxnet This concerns the MXNet side of GluonTS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants