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

Remove asserts on loc and scale in distributions that do not support them #734

Merged
merged 1 commit into from
Mar 30, 2020

Conversation

lostella
Copy link
Contributor

@lostella lostella commented Mar 30, 2020

Issue #, if available: fixes #641

Description of changes: For some distributions, it doesn't make sense to prescribe a "loc" or "scale" by which to translate and scale the distribution arguments. However, networks that do compute a location/scale for the (past) data (and potentially use them to scale the network inputs) may provide this information to the DistributionOutput class when invoking the distribution method: in these cases, we currently raise an exception. This is not ideal, because it means that you cannot excange a distribution family that does support loc/scale for one that doesn't, on top of the same network. I think the best solution is to simply ignore loc and scale in DistributionOutput classes that don't support them.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@mbohlkeschneider mbohlkeschneider left a comment

Choose a reason for hiding this comment

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

I think the general problem here, is that we somehow need to assume that the user/developer understands the underpinnings of the network/distribution interplay here. I think in the long run, it is better to have standardized blocks for networks that compute the loc/scale from past data and pass them as a composed TransformedDistribution.

@lostella lostella merged commit 2e20016 into awslabs:master Mar 30, 2020
@lostella lostella deleted the remove-loc-scale-asserts branch March 30, 2020 18:43
lfywork added a commit to lfywork/gluon-ts that referenced this pull request Apr 3, 2020
remove asserts on loc and scale (awslabs#734)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DeepAREstimator can't use DirichletMultinomialOutput anymore due to an assertion error
2 participants