-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[Docs] Adding Store API Docs #45543
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
[Docs] Adding Store API Docs #45543
Conversation
This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing although we exposed a lightly-used (but potentially useful) Python API for our distributed key-value store. Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/) [ghstack-poisoned]
This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing altogether even though we exposed a Python API for our distributed key-value store. This Store API could be useful for users looking for a quick way to share information across workers when using PyTorch distributed. Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/) [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 8ff4521 (more details on the Dr. CI page): Commit 8ff4521 was recently pushed. Waiting for builds... This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 21 times. |
This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing altogether even though we exposed a Python API for our distributed key-value store. This Store API could be useful for users looking for a quick way to share information across workers when using PyTorch distributed. Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/) [ghstack-poisoned]
Pull Request resolved: #45543 This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing although we exposed a lightly-used (but potentially useful) Python API for our distributed key-value store. ghstack-source-id: 113195095 Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/)
This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing altogether even though we exposed a Python API for our distributed key-value store. This Store API could be useful for users looking for a quick way to share information across workers when using PyTorch distributed. Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/) [ghstack-poisoned]
This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing altogether even though we exposed a Python API for our distributed key-value store. This Store API could be useful for users looking for a quick way to share information across workers when using PyTorch distributed. Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/) [ghstack-poisoned]
Pull Request resolved: #45543 This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing although we exposed a lightly-used (but potentially useful) Python API for our distributed key-value store. ghstack-source-id: 113198095 Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/)
This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing altogether even though we exposed a Python API for our distributed key-value store. This Store API could be useful for users looking for a quick way to share information across workers when using PyTorch distributed. Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/) [ghstack-poisoned]
Pull Request resolved: #45543 This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing although we exposed a lightly-used (but potentially useful) Python API for our distributed key-value store. ghstack-source-id: 113202777 Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/)
Codecov Report
@@ Coverage Diff @@
## gh/osalpekar/90/base #45543 +/- ##
========================================================
- Coverage 68.50% 68.49% -0.01%
========================================================
Files 408 408
Lines 52484 52484
========================================================
- Hits 35952 35951 -1
- Misses 16532 16533 +1
Continue to review full report at Codecov.
|
This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing altogether even though we exposed a Python API for our distributed key-value store. This Store API could be useful for users looking for a quick way to share information across workers when using PyTorch distributed. Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/) [ghstack-poisoned]
This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing altogether even though we exposed a Python API for our distributed key-value store. This Store API could be useful for users looking for a quick way to share information across workers when using PyTorch distributed. Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/) [ghstack-poisoned]
Pull Request resolved: #45543 This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing although we exposed a lightly-used (but potentially useful) Python API for our distributed key-value store. ghstack-source-id: 113256371 Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/)
| Key-Value Stores: :class:`~torch.distributed.TCPStore`, | ||
| :class:`~torch.distributed.FileStore`, and :class:`~torch.distributed.HashStore`. | ||
|
|
||
| .. autoclass:: TCPStore |
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.
Should we also add Store here? Similar to torch.optim where there is documentation about the base class.
torch/csrc/distributed/c10d/init.cpp
Outdated
| add(key: str, amount: int) -> None | ||
| The first call to add for a given ``key`` creates a counter associated | ||
| with ``key`` in the store, initialized to ``amount``. Subsequent calls to add | ||
| with the same ``key`` increment the counter by the specified ``amount``. |
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.
What is the behavior if the key is already present via set call? We should document that as well.
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.
It seems to throw an exception - will make a note about it in the docs.
torch/csrc/distributed/c10d/init.cpp
Outdated
| num_keys() -> int | ||
| Returns the number of keys set in the store. Note that this number will typically | ||
| be one greater than the number of keys added by :meth:`~torch.distributed.store.get` |
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.
This should be set and not get?
torch/csrc/distributed/c10d/init.cpp
Outdated
| shared_ptr_class_<::c10d::HashStore>(module, "HashStore", store) | ||
| shared_ptr_class_<::c10d::HashStore>(module, "HashStore", store, | ||
| R"( | ||
| A thread-safe store implementation based on an underlying hashmap (C++ std::unordered_map). |
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.
Don't add implementation details like c++ unordered_map. Also, mention that this store can only be used within the same process and not across processes.
This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing altogether even though we exposed a Python API for our distributed key-value store. This Store API could be useful for users looking for a quick way to share information across workers when using PyTorch distributed. Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/) [ghstack-poisoned]
Pull Request resolved: #45543 This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing although we exposed a lightly-used (but potentially useful) Python API for our distributed key-value store. ghstack-source-id: 113373590 Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/)
This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing altogether even though we exposed a Python API for our distributed key-value store. This Store API could be useful for users looking for a quick way to share information across workers when using PyTorch distributed. Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/) [ghstack-poisoned]
This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing altogether even though we exposed a Python API for our distributed key-value store. This Store API could be useful for users looking for a quick way to share information across workers when using PyTorch distributed. Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/) [ghstack-poisoned]
This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing altogether even though we exposed a Python API for our distributed key-value store. This Store API could be useful for users looking for a quick way to share information across workers when using PyTorch distributed. Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/) [ghstack-poisoned]
This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing altogether even though we exposed a Python API for our distributed key-value store. This Store API could be useful for users looking for a quick way to share information across workers when using PyTorch distributed. Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/) [ghstack-poisoned]
Pull Request resolved: #45543 This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing although we exposed a lightly-used (but potentially useful) Python API for our distributed key-value store. ghstack-source-id: 113380360 Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/)
This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing altogether even though we exposed a Python API for our distributed key-value store. This Store API could be useful for users looking for a quick way to share information across workers when using PyTorch distributed. See example render below: <img width="837" alt="Screen Shot 2020-09-29 at 11 42 33 PM" src="https://user-images.githubusercontent.com/14008860/94864458-dc6b8380-03f0-11eb-9776-81a45f93f888.png"> Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/) [ghstack-poisoned]
torch/csrc/distributed/c10d/init.cpp
Outdated
| module, "Store") | ||
| module, "Store", | ||
| R"( | ||
| Base class for the 3 store implementations: (:class:`~torch.distributed.TCPStore`, |
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.
Probably just mention this is the base class for all store implementations. There could be other user implementations on top of this apart from these 3.
This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing altogether even though we exposed a Python API for our distributed key-value store. This Store API could be useful for users looking for a quick way to share information across workers when using PyTorch distributed. See example render below: <img width="837" alt="Screen Shot 2020-09-29 at 11 42 33 PM" src="https://user-images.githubusercontent.com/14008860/94864458-dc6b8380-03f0-11eb-9776-81a45f93f888.png"> Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/) [ghstack-poisoned]
Pull Request resolved: #45543 This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing although we exposed a lightly-used (but potentially useful) Python API for our distributed key-value store. ghstack-source-id: 113409195 Differential Revision: [D24005598](https://our.internmc.facebook.com/intern/diff/D24005598/)
Summary: Pull Request resolved: pytorch#45543 This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing although we exposed a lightly-used (but potentially useful) Python API for our distributed key-value store. ghstack-source-id: 113409195 Test Plan: Will verify screenshots by building the docs. Reviewed By: pritamdamania87 Differential Revision: D24005598 fbshipit-source-id: 45c3600e7c3f220710e99a0483a9ce921d75d044
|
This pull request has been merged in 3799ba8. |
Summary: Pull Request resolved: #45543 This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing although we exposed a lightly-used (but potentially useful) Python API for our distributed key-value store. ghstack-source-id: 113409195 Test Plan: Will verify screenshots by building the docs. Reviewed By: pritamdamania87 Differential Revision: D24005598 fbshipit-source-id: 45c3600e7c3f220710e99a0483a9ce921d75d044
Stack from ghstack:
This PR adds documentation for the c10d Store to the public docs. Previously these docs were missing altogether even though we exposed a Python API for our distributed key-value store. This Store API could be useful for users looking for a quick way to share information across workers when using PyTorch distributed.
See example render below:

Differential Revision: D24005598