Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
decentralizepy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab is being updated to the latest version (v17.9.2). No downtime is expected.
Show more breadcrumbs
Milos Vujasinovic
decentralizepy
Commits
dd0fa01a
Commit
dd0fa01a
authored
3 years ago
by
Rishi Sharma
Browse files
Options
Downloads
Patches
Plain Diff
Add RandomAlpha, Regular Graph
parent
7b367239
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/decentralizepy/sharing/PartialModel.py
+3
-1
3 additions, 1 deletion
src/decentralizepy/sharing/PartialModel.py
with
3 additions
and
1 deletion
src/decentralizepy/sharing/PartialModel.py
+
3
−
1
View file @
dd0fa01a
...
@@ -159,6 +159,8 @@ class PartialModel(Sharing):
...
@@ -159,6 +159,8 @@ class PartialModel(Sharing):
m
[
"
params
"
]
=
T_topk
.
numpy
()
m
[
"
params
"
]
=
T_topk
.
numpy
()
m
[
"
send_partial
"
]
=
True
assert
len
(
m
[
"
indices
"
])
==
len
(
m
[
"
params
"
])
assert
len
(
m
[
"
indices
"
])
==
len
(
m
[
"
params
"
])
logging
.
info
(
"
Elements sending: {}
"
.
format
(
len
(
m
[
"
indices
"
])))
logging
.
info
(
"
Elements sending: {}
"
.
format
(
len
(
m
[
"
indices
"
])))
...
@@ -185,7 +187,7 @@ class PartialModel(Sharing):
...
@@ -185,7 +187,7 @@ class PartialModel(Sharing):
state_dict of received
state_dict of received
"""
"""
if
self
.
alpha
>
self
.
metadata_cap
:
# Share fully
if
"
send_partial
"
not
in
m
:
return
super
().
deserialized_model
(
m
)
return
super
().
deserialized_model
(
m
)
with
torch
.
no_grad
():
with
torch
.
no_grad
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment