Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Distributed-for-FL
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
Show more breadcrumbs
LSDS
Teaching
Continuum-Computing
Distributed-for-FL
Commits
a145fdb9
Commit
a145fdb9
authored
8 months ago
by
nabil.abdennad
Browse files
Options
Downloads
Patches
Plain Diff
updating prompts
parent
2f9accd8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Local-Without-Prediction/docker-compose.yml
+4
-4
4 additions, 4 deletions
Local-Without-Prediction/docker-compose.yml
Local-Without-Prediction/sock.py
+3
-3
3 additions, 3 deletions
Local-Without-Prediction/sock.py
with
7 additions
and
7 deletions
Local-Without-Prediction/docker-compose.yml
+
4
−
4
View file @
a145fdb9
...
...
@@ -2,7 +2,7 @@
services
:
node0
:
image
:
image-
dfl-
bad
image
:
image-bad
container_name
:
node0
environment
:
-
RANK=0
...
...
@@ -15,7 +15,7 @@ services:
node1
:
image
:
image-
dfl-
bad
image
:
image-bad
container_name
:
node1
environment
:
-
RANK=1
...
...
@@ -28,7 +28,7 @@ services:
node2
:
image
:
image-
dfl-
bad
image
:
image-bad
container_name
:
node2
environment
:
-
RANK=2
...
...
@@ -41,7 +41,7 @@ services:
node3
:
image
:
image-
dfl-
bad
image
:
image-bad
container_name
:
node3
environment
:
-
RANK=3
...
...
This diff is collapsed.
Click to expand it.
Local-Without-Prediction/sock.py
+
3
−
3
View file @
a145fdb9
...
...
@@ -40,7 +40,7 @@ def mainProg(neighbors, rank, base_port, ip_address):
try
:
neighbor_ip
=
f
"
node
{
neighbor
}
"
send_Message
(
rank
,
neighbor_ip
,
"
REQUEST_WEIGHT
"
)
#
logger.info(f"Rank {rank} sent REQUEST_WEIGHT to {neighbor} at iteration {iteration}")
logger
.
info
(
f
"
Rank
{
rank
}
sent REQUEST_WEIGHT to
{
neighbor
}
at iteration
{
iteration
}
"
)
except
ConnectionRefusedError
as
e
:
logger
.
error
(
f
"
Exception
{
e
}
\n
Connection refused when
{
rank
}
tried to connect to
{
neighbor
}
'
s service
{
neighbor_ip
}
.
"
)
continue
...
...
@@ -52,18 +52,18 @@ def mainProg(neighbors, rank, base_port, ip_address):
data
=
conn
.
recv
(
1024
).
decode
()
message_rcvd
,
sender
=
json
.
loads
(
data
)
conn
.
close
()
logger
.
info
(
f
"
Rank
{
rank
}
-- iteration
{
iteration
}
and message received
{
message_rcvd
}
from
{
sender
}
"
)
if
message_rcvd
==
"
REQUEST_WEIGHT
"
:
# a Neighbor is asking help
try
:
sender
=
f
"
node
{
sender
}
"
send_Message
(
rank
,
sender
,
"
WEIGHTS
"
)
logger
.
info
(
f
"
Rank
{
rank
}
sent WEIGHT to
{
neighbor
}
at iteration
{
iteration
}
"
)
except
ConnectionRefusedError
as
e
:
logger
.
error
(
f
"
Exception
{
e
}
\n
Connection refused when
{
rank
}
tried to send WEIGHTS to
{
sender
}
'
s service
{
sender
}
.
"
)
continue
if
message_rcvd
==
"
WEIGHTS
"
:
#a Neighbor to whom I have sent a help REQUEST_WEIGHT just replied to my request
received_dict
[
sender
]
=
True
logger
.
info
(
f
"
I am here -- iteration
{
iteration
}
and message received
{
message_rcvd
}
from
{
sender
}
"
)
iteration
+=
1
...
...
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