Skip to content

Conversation

@osalpekar
Copy link
Member

@osalpekar osalpekar commented Sep 30, 2020

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:
Screen Shot 2020-09-29 at 11 42 33 PM

Differential Revision: D24005598

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]
@dr-ci
Copy link

dr-ci bot commented Sep 30, 2020

💊 CI failures summary and remediations

As 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.

See how this bot performed.

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]
osalpekar added a commit that referenced this pull request Sep 30, 2020
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]
osalpekar added a commit that referenced this pull request Sep 30, 2020
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/)
@osalpekar osalpekar requested a review from jiayisuse September 30, 2020 04:35
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]
osalpekar added a commit that referenced this pull request Sep 30, 2020
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
Copy link

codecov bot commented Sep 30, 2020

Codecov Report

Merging #45543 into gh/osalpekar/90/base will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@                   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     
Impacted Files Coverage Δ
torch/testing/_internal/expecttest.py 77.55% <0.00%> (-1.03%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1efdbfa...8ff4521. Read the comment docs.

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]
osalpekar added a commit that referenced this pull request Sep 30, 2020
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
Copy link
Contributor

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.

Comment on lines 354 to 358
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``.
Copy link
Contributor

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.

Copy link
Member Author

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.

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`
Copy link
Contributor

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?

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).
Copy link
Contributor

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]
osalpekar added a commit that referenced this pull request Oct 1, 2020
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]
osalpekar added a commit that referenced this pull request Oct 1, 2020
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]
module, "Store")
module, "Store",
R"(
Base class for the 3 store implementations: (:class:`~torch.distributed.TCPStore`,
Copy link
Contributor

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]
osalpekar added a commit that referenced this pull request Oct 2, 2020
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/)
osalpekar added a commit to osalpekar/pytorch that referenced this pull request Oct 2, 2020
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
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 3799ba8.

@facebook-github-bot facebook-github-bot deleted the gh/osalpekar/90/head branch October 6, 2020 14:21
malfet pushed a commit that referenced this pull request Oct 6, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants