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
8292bf32
Unverified
Commit
8292bf32
authored
Jul 25, 2022
by
Rhett Ying
Committed by
GitHub
Jul 25, 2022
Browse files
[Dist] remove deprecated arguments from initialize() (#4284)
parent
6e1be69a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
21 deletions
+6
-21
python/dgl/distributed/dist_context.py
python/dgl/distributed/dist_context.py
+6
-21
No files found.
python/dgl/distributed/dist_context.py
View file @
8292bf32
...
@@ -173,28 +173,19 @@ class CustomPool:
...
@@ -173,28 +173,19 @@ class CustomPool:
self
.
process_list
[
i
].
join
()
self
.
process_list
[
i
].
join
()
def
initialize
(
ip_config
,
num_servers
=
1
,
num_workers
=
0
,
def
initialize
(
ip_config
,
max_queue_size
=
MAX_QUEUE_SIZE
,
max_queue_size
=
MAX_QUEUE_SIZE
,
net_type
=
'socket'
,
net_type
=
'socket'
,
num_worker_threads
=
1
):
num_worker_threads
=
1
):
"""Initialize DGL's distributed module
"""Initialize DGL's distributed module
This function initializes DGL's distributed module. It acts differently in server
This function initializes DGL's distributed module. It acts differently in server
or client modes. In the server mode, it runs the server code and never returns.
or client modes. In the server mode, it runs the server code and never returns.
In the client mode, it builds connections with servers for communication and
In the client mode, it builds connections with servers for communication and
creates worker processes for distributed sampling. `num_workers` specifies
creates worker processes for distributed sampling.
the number of sampling worker processes per trainer process.
Users also have to provide the number of server processes on each machine in order
to connect to all the server processes in the cluster of machines correctly.
Parameters
Parameters
----------
----------
ip_config: str
ip_config: str
File path of ip_config file
File path of ip_config file
num_servers : int
The number of server processes on each machine. This argument is deprecated in DGL 0.7.0.
num_workers: int
Number of worker process on each machine. The worker processes are used
for distributed sampling. This argument is deprecated in DGL 0.7.0.
max_queue_size : int
max_queue_size : int
Maximal size (bytes) of client queue buffer (~20 GB on default).
Maximal size (bytes) of client queue buffer (~20 GB on default).
...
@@ -205,7 +196,7 @@ def initialize(ip_config, num_servers=1, num_workers=0,
...
@@ -205,7 +196,7 @@ def initialize(ip_config, num_servers=1, num_workers=0,
Default: ``'socket'``
Default: ``'socket'``
num_worker_threads: int
num_worker_threads: int
The number of threads in
a work
er process.
The number of
OMP
threads in
each sampl
er process.
Note
Note
----
----
...
@@ -240,14 +231,8 @@ def initialize(ip_config, num_servers=1, num_workers=0,
...
@@ -240,14 +231,8 @@ def initialize(ip_config, num_servers=1, num_workers=0,
serv
.
start
()
serv
.
start
()
sys
.
exit
()
sys
.
exit
()
else
:
else
:
if
os
.
environ
.
get
(
'DGL_NUM_SAMPLER'
)
is
not
None
:
num_workers
=
int
(
os
.
environ
.
get
(
'DGL_NUM_SAMPLER'
,
0
))
num_workers
=
int
(
os
.
environ
.
get
(
'DGL_NUM_SAMPLER'
))
num_servers
=
int
(
os
.
environ
.
get
(
'DGL_NUM_SERVER'
,
1
))
else
:
num_workers
=
0
if
os
.
environ
.
get
(
'DGL_NUM_SERVER'
)
is
not
None
:
num_servers
=
int
(
os
.
environ
.
get
(
'DGL_NUM_SERVER'
))
else
:
num_servers
=
1
group_id
=
int
(
os
.
environ
.
get
(
'DGL_GROUP_ID'
,
0
))
group_id
=
int
(
os
.
environ
.
get
(
'DGL_GROUP_ID'
,
0
))
rpc
.
reset
()
rpc
.
reset
()
global
SAMPLER_POOL
global
SAMPLER_POOL
...
...
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