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

[feat] Add sync_context and sync to nn.Metric #302

Merged
merged 49 commits into from
Jun 21, 2021
Merged
Changes from 2 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
80575de
wip
tchaton Jun 17, 2021
904ecec
add _apply_sync to nn.Metric
tchaton Jun 17, 2021
71ca9be
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 17, 2021
e4d99d8
move to context manager
tchaton Jun 17, 2021
94d3450
Merge branch 'apply_sync_fn' of https://github.com/PyTorchLightning/m…
tchaton Jun 17, 2021
bfcbc74
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 17, 2021
41a60e7
resolve flake8
tchaton Jun 17, 2021
b0498b4
Merge branch 'apply_sync_fn' of https://github.com/PyTorchLightning/m…
tchaton Jun 17, 2021
94fab1b
add sync
tchaton Jun 17, 2021
31498ef
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 17, 2021
31563dc
update
tchaton Jun 17, 2021
7d24123
Merge branch 'apply_sync_fn' of https://github.com/PyTorchLightning/m…
tchaton Jun 17, 2021
15e6d9a
update on comments
tchaton Jun 18, 2021
b3d5ec5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 18, 2021
d4367db
Merge branch 'master' into apply_sync_fn
tchaton Jun 18, 2021
fc42bbe
update
tchaton Jun 18, 2021
0dcb041
update
tchaton Jun 18, 2021
980329d
Merge branch 'apply_sync_fn' of https://github.com/PyTorchLightning/m…
tchaton Jun 18, 2021
3b4e838
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 18, 2021
140aeeb
add restore_cache
tchaton Jun 18, 2021
1cf6a44
Merge branch 'apply_sync_fn' of https://github.com/PyTorchLightning/m…
tchaton Jun 18, 2021
3ab11cd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 18, 2021
ca04cfb
add a sync test
tchaton Jun 18, 2021
f2ae287
Merge branch 'apply_sync_fn' of https://github.com/PyTorchLightning/m…
tchaton Jun 18, 2021
45b1b1f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 18, 2021
8aa2a74
resolve flake8
tchaton Jun 18, 2021
0f2ed93
resolve loading
tchaton Jun 18, 2021
de32cbf
Merge branch 'apply_sync_fn' of https://github.com/PyTorchLightning/m…
tchaton Jun 18, 2021
25bfbf3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 18, 2021
7222aa3
resolve flake8
tchaton Jun 18, 2021
6dd7705
Update torchmetrics/metric.py
tchaton Jun 18, 2021
da215ad
remove _update_signature
tchaton Jun 18, 2021
dc8e699
Merge branch 'apply_sync_fn' of https://github.com/PyTorchLightning/m…
tchaton Jun 18, 2021
fe456f2
Apply suggestions from code review
Borda Jun 18, 2021
303e829
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 18, 2021
586ae75
update on comments
tchaton Jun 18, 2021
a460801
Merge branch 'apply_sync_fn' of https://github.com/PyTorchLightning/m…
tchaton Jun 18, 2021
409e20a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 18, 2021
71fad52
add missing is_distributed_fn
tchaton Jun 18, 2021
b7e2030
Merge branch 'apply_sync_fn' of https://github.com/PyTorchLightning/m…
tchaton Jun 18, 2021
e72de7d
update on comments
tchaton Jun 18, 2021
11a3ab8
Update torchmetrics/metric.py
carmocca Jun 18, 2021
d9c0a53
resolve failing test
tchaton Jun 18, 2021
f37e77f
Merge branch 'apply_sync_fn' of https://github.com/PyTorchLightning/m…
tchaton Jun 18, 2021
6e7e3a8
Deepsource smells
carmocca Jun 18, 2021
7ee31d0
Apply suggestions from code review
Borda Jun 21, 2021
99d99e1
update
tchaton Jun 21, 2021
0df9659
Merge branch 'apply_sync_fn' of https://github.com/PyTorchLightning/m…
tchaton Jun 21, 2021
9872ddd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions torchmetrics/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ def state_dict(self, destination=None, prefix="", keep_vars=False):
current_val = [
cur_v.detach() if isinstance(cur_v, torch.Tensor) else cur_v for cur_v in current_val
]
# the tensors will be synced across processes so deepcopy to drop the references
destination[prefix + key] = deepcopy(current_val)
return destination

Expand Down