-
Notifications
You must be signed in to change notification settings - Fork 608
API life cycle and deprecation policy in official documentation #4529
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/4529
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 69865ad with merge base f1b741e ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D60692061 |
This pull request was exported from Phabricator. Differential Revision: D60692061 |
…rch#4529) Summary: Pull Request resolved: pytorch#4529 For reviewers: to comment easily, please review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing Differential Revision: D60692061
358a793
to
026d0b1
Compare
This pull request was exported from Phabricator. Differential Revision: D60692061 |
…rch#4529) Summary: Pull Request resolved: pytorch#4529 This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs. The doc has some TODO items we can either address in this diff or with follow-up diffs. For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing Differential Revision: D60692061
026d0b1
to
e6b8fec
Compare
This pull request was exported from Phabricator. Differential Revision: D60692061 |
…rch#4529) Summary: Pull Request resolved: pytorch#4529 This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs. The doc has some TODO items we can either address in this diff or with follow-up diffs. For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing Differential Revision: D60692061
e6b8fec
to
2a8207f
Compare
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.
The structure looks great; thanks for adding this.
This pull request was exported from Phabricator. Differential Revision: D60692061 |
2a8207f
to
313ade0
Compare
…rch#4529) Summary: Pull Request resolved: pytorch#4529 This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs. The doc has some TODO items we can either address in this diff or with follow-up diffs. ***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing*** Differential Revision: D60692061
This pull request was exported from Phabricator. Differential Revision: D60692061 |
…rch#4529) Summary: Pull Request resolved: pytorch#4529 This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs. The doc has some TODO items we can either address in this diff or with follow-up diffs. ***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing*** Differential Revision: D60692061
313ade0
to
dd99c24
Compare
This pull request was exported from Phabricator. Differential Revision: D60692061 |
…rch#4529) Summary: Pull Request resolved: pytorch#4529 This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs. The doc has some TODO items we can either address in this diff or with follow-up diffs. ***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing*** Differential Revision: D60692061
dd99c24
to
0d4355c
Compare
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 for the changes! Remaining comments are about consistency throughout the doc.
docs/source/api-life-cycle.md
Outdated
</td> | ||
</tr> | ||
<tr> | ||
<td>Android |
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.
Instead of "Android" and "Apple", it'd be more consistent to have rows for "Java", "Swift", "Objective C". The first column of this table is really "Language".
docs/source/api-life-cycle.md
Outdated
<tr> | ||
<td>Android | ||
</td> | ||
<td>Deprecated: use <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Deprecated.html">java.lang.Deprecated</a> |
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.
Consistency: This uses non-italicized "Deprecated" and "Experimental", but the first row italicizes them. The C++ row doesn't even mention "Deprecated" or "Experimental" directly. And the Android/Apple rows only seem to talk about deprecated code, not experimental code.
Ideally, each row of this table would be consistent with all of the other rows.
docs/source/api-life-cycle.md
Outdated
/** | ||
<p> | ||
* @deprecated Use `newMethod` instead. | ||
<p> | ||
*/ |
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.
Would be nice to make these code blocks, though I don't know if that works in a table.
/** | |
<p> | |
* @deprecated Use `newMethod` instead. | |
<p> | |
*/ | |
/** | |
<pre><code> | |
<p> | |
* @deprecated Use `newMethod` instead. | |
<p> | |
</code></pre> | |
*/ |
Or maybe triple-backquote will work here.
Same for the swift example
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.
Using <code>
and <p>
doesn't render very well in chrome (see screenshot). Does <pre><code>
work like https://stackoverflow.com/a/4611735 suggests?

docs/source/api-life-cycle.md
Outdated
</td> | ||
<td>Deprecated: use <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Deprecated.html">java.lang.Deprecated</a> | ||
<p> | ||
Experimental: use <a href="https://developer.android.com/reference/androidx/annotation/RequiresOptIn">androidx.annotation.RequiresOptIn</a> |
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.
Maybe point to https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:docs/api_guidelines/annotations.md as well (or instead), which give more guidance about using this annotation.
docs/source/api-life-cycle.md
Outdated
<p> | ||
/** | ||
<p> | ||
Warning: This API is experimental |
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.
Our style guide prefers full sentences, ending with periods.
Warning: This API is experimental | |
Warning: This API is experimental. |
This pull request was exported from Phabricator. Differential Revision: D60692061 |
0d4355c
to
140e08e
Compare
…rch#4529) Summary: Pull Request resolved: pytorch#4529 This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs. The doc has some TODO items we can either address in this diff or with follow-up diffs. ***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing*** Differential Revision: D60692061
This pull request was exported from Phabricator. Differential Revision: D60692061 |
…rch#4529) Summary: Pull Request resolved: pytorch#4529 This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs. The doc has some TODO items we can either address in this diff or with follow-up diffs. ***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing*** Differential Revision: D60692061
140e08e
to
d92f447
Compare
This pull request was exported from Phabricator. Differential Revision: D60692061 |
d92f447
to
c2e551e
Compare
…rch#4529) Summary: Pull Request resolved: pytorch#4529 This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs. The doc has some TODO items we can either address in this diff or with follow-up diffs. ***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing*** Differential Revision: D60692061
This pull request was exported from Phabricator. Differential Revision: D60692061 |
…rch#4529) Summary: Pull Request resolved: pytorch#4529 This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs. The doc has some TODO items we can either address in this diff or with follow-up diffs. ***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing*** Differential Revision: D60692061
c2e551e
to
3109a00
Compare
…rch#4529) Summary: Pull Request resolved: pytorch#4529 This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs. The doc has some TODO items we can either address in this diff or with follow-up diffs. ***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing*** Differential Revision: D60692061
3109a00
to
81279d8
Compare
This pull request was exported from Phabricator. Differential Revision: D60692061 |
This pull request was exported from Phabricator. Differential Revision: D60692061 |
…rch#4529) Summary: Pull Request resolved: pytorch#4529 This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs. The doc has some TODO items we can either address in this diff or with follow-up diffs. ***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing*** Differential Revision: D60692061
81279d8
to
2528d75
Compare
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 for all of the changes. A couple final issues, but I'll approve now to move things along.
docs/source/api-life-cycle.md
Outdated
/** | ||
<p> | ||
* @deprecated Use `newMethod` instead. | ||
<p> | ||
*/ |
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.
Using <code>
and <p>
doesn't render very well in chrome (see screenshot). Does <pre><code>
work like https://stackoverflow.com/a/4611735 suggests?

<code>__attribute__((deprecated("Use newMethod instead")));</code> | ||
<p> | ||
<p> | ||
<code>__attribute__((experimental("Use newMethod instead")));</code> (TODO not yet implemented) |
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.
I don't know if it's possible to implement an attribute like this; they're typically defined by the toolchain.
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.
@shoumikhin Could you comment on this please? I've chatted with Anthony offline and IIUC, there's a mapping between the Objective-C annotations and the CPP macros. So if the CPP __ET_DEPRECATED
and __ET_EXPERIMENTAL
can be implemented, then we can implement these.
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.
Oh I meant we can use the deprecated annotation for experental features too, since there's no dedicated experimental annotation available. Thus __ET_EXPERIMENTAL is gonna be defined the same as deprecated, but with a different error message.
…rch#4529) Summary: Pull Request resolved: pytorch#4529 This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs. The doc has some TODO items we can either address in this diff or with follow-up diffs. ***For Meta reviewers: to comment easily, you can review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing*** Reviewed By: dbort Differential Revision: D60692061
This pull request was exported from Phabricator. Differential Revision: D60692061 |
2528d75
to
69865ad
Compare
Differential Revision: D60692061 Pull Request resolved: pytorch#4529
Summary:
This diff adds a new page to the ET public documentation site that establishes the API life cycle and deprecation policy. It's also been linked to from related docs.
The doc has some TODO items we can either address in this diff or with follow-up diffs.
For Meta reviewers: to comment easily, please review in https://docs.google.com/document/d/1FJmsWoP544bF0Xe3SeREcLAbKPqgrxulScBdak0UoVs/edit?usp=sharing
Differential Revision: D60692061