Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
bb6cec23
Unverified
Commit
bb6cec23
authored
Mar 07, 2022
by
Rhett Ying
Committed by
GitHub
Mar 06, 2022
Browse files
[BugFix] fix incorrect name when fetch data in sparse optim (#3808)
parent
8f0136b0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
python/dgl/distributed/nn/pytorch/sparse_emb.py
python/dgl/distributed/nn/pytorch/sparse_emb.py
+11
-0
python/dgl/distributed/optim/pytorch/sparse_optim.py
python/dgl/distributed/optim/pytorch/sparse_optim.py
+1
-1
No files found.
python/dgl/distributed/nn/pytorch/sparse_emb.py
View file @
bb6cec23
...
@@ -130,6 +130,17 @@ class DistEmbedding:
...
@@ -130,6 +130,17 @@ class DistEmbedding:
"""
"""
return
self
.
_tensor
.
tensor_name
return
self
.
_tensor
.
tensor_name
@
property
def
data_name
(
self
):
"""Return the data name of the embeddings
Returns
-------
str
The data name of the embeddings
"""
return
self
.
_tensor
.
_name
@
property
@
property
def
kvstore
(
self
):
def
kvstore
(
self
):
"""Return the kvstore client
"""Return the kvstore client
...
...
python/dgl/distributed/optim/pytorch/sparse_optim.py
View file @
bb6cec23
...
@@ -74,7 +74,7 @@ class DistSparseGradOptimizer(abc.ABC):
...
@@ -74,7 +74,7 @@ class DistSparseGradOptimizer(abc.ABC):
# will send grad to each corresponding trainer
# will send grad to each corresponding trainer
if
self
.
_world_size
>
1
:
if
self
.
_world_size
>
1
:
# get idx split from kvstore
# get idx split from kvstore
idx_split
=
kvstore
.
get_partid
(
name
,
idics
)
idx_split
=
kvstore
.
get_partid
(
emb
.
data_
name
,
idics
)
idx_split_size
=
[]
idx_split_size
=
[]
idics_list
=
[]
idics_list
=
[]
grad_list
=
[]
grad_list
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment