Skip to content

Conversation

@yf225
Copy link
Contributor

@yf225 yf225 commented Nov 7, 2019

Stack from ghstack:

This PR makes all non-input arguments to functionals part of its options parameters, so that we won't break backward compatibility even if we add or reorder some of the non-input arguments to functionals in the future.

Differential Revision: D18378526

@yf225 yf225 requested review from pbelevich and removed request for ebetica and goldsborough November 7, 2019 20:28
@kostmo
Copy link
Member

kostmo commented Nov 7, 2019

CircleCI build failures summary

As of commit 2c9c40c:

  • 1/19 broken upstream at merge base 3b43cfd (grid view)
    • You may want to rebase on the viable/strict branch (see age history).
  • 18/19 failures introduced in this PR
  • 0/19 recognized as flaky

Here are the reasons each build failed.


This comment was automatically generated by Dr. CI.
Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker.

This comment has been revised 14 time(s).

…tions"

Make all non-input arguments to functionals part of its options

gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
Will Feng added 3 commits November 8, 2019 13:02
…tions"

Make all non-input arguments to functionals part of its options

gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
…tions"

Make all non-input arguments to functionals part of its options

gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
…tions"

Make all non-input arguments to functionals part of its options

gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
Will Feng added 3 commits November 8, 2019 16:19
…tions"

Make all non-input arguments to functionals part of its options

gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
…tions"

Make all non-input arguments to functionals part of its options

gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
…tions"

Make all non-input arguments to functionals part of its options

gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
…tions"

Make all non-input arguments to functionals part of its options

gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
…tions"

Make all non-input arguments to functionals part of its options

gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
@yf225 yf225 requested a review from pbelevich November 11, 2019 21:32
@yf225 yf225 changed the title Make all non-input arguments to functionals part of its options Make all non-input arguments to functionals part of its options, and pass functional options by const-ref when possible Nov 11, 2019
@yf225 yf225 added the module: cpp Related to C++ API label Nov 11, 2019
Copy link
Contributor

@pbelevich pbelevich left a comment

Choose a reason for hiding this comment

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

/// Options for the `BatchNorm` module.
struct TORCH_API BatchNormFuncOptions {

Should be functional instead of module

…tions, and pass functional options by const-ref when possible"

Make all non-input arguments to functionals part of its options

gh-metadata: pytorch pytorch 29404 gh/yf225/41/head
@yf225
Copy link
Contributor Author

yf225 commented Nov 12, 2019

/// Options for the `BatchNorm` module.
struct TORCH_API BatchNormFuncOptions {

Should be functional instead of module

Thanks for the catch! I will fix this in a follow-up doc cleaning PR

@facebook-github-bot
Copy link
Contributor

@yf225 merged this pull request in 9f879ef.

facebook-github-bot pushed a commit that referenced this pull request Nov 14, 2019
Summary:
Pull Request resolved: #29673

Following #29364 and #29404, this PR makes `F::EmbeddingFuncOptions` and `F::EmbeddingBagFuncOptions` separate classes from `torch::nn::EmbeddingOptions` and `torch::nn::EmbeddingBagOptions`, so that it's easier to enforce that arguments such as `num_embeddings` and `embedding_dim` are required for `torch::nn::EmbeddingOptions` and `torch::nn::EmbeddingBagOptions`.

Test Plan: Imported from OSS

Differential Revision: D18462540

Pulled By: yf225

fbshipit-source-id: f2abf431e48675b0a9d7f6f398cdb90ff9037c35
@facebook-github-bot facebook-github-bot deleted the gh/yf225/41/head branch November 16, 2019 15:17
csarofeen pushed a commit to mruberry/pytorch that referenced this pull request Nov 18, 2019
…9673)

Summary:
Pull Request resolved: pytorch#29673

Following pytorch#29364 and pytorch#29404, this PR makes `F::EmbeddingFuncOptions` and `F::EmbeddingBagFuncOptions` separate classes from `torch::nn::EmbeddingOptions` and `torch::nn::EmbeddingBagOptions`, so that it's easier to enforce that arguments such as `num_embeddings` and `embedding_dim` are required for `torch::nn::EmbeddingOptions` and `torch::nn::EmbeddingBagOptions`.

Test Plan: Imported from OSS

Differential Revision: D18462540

Pulled By: yf225

fbshipit-source-id: f2abf431e48675b0a9d7f6f398cdb90ff9037c35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: cpp Related to C++ API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants