-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Dist] enable to specify sort_etype for sample_etype_neighbours #4212
Conversation
To trigger regression tests:
|
…o sortEtypesInDistGraph
@@ -227,6 +227,7 @@ def initialize(ip_config, num_servers=1, num_workers=0, | |||
'Please define DGL_CONF_PATH to run DistGraph server' | |||
formats = os.environ.get('DGL_GRAPH_FORMAT', 'csc').split(',') | |||
formats = [f.strip() for f in formats] | |||
sort_etypes = os.environ.get('DGL_SORT_ETYPES', '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the corresponding doc for this new environment variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have corresponding doc? where is it?
the main question is why we should expose the sort_etypes flag to users? if we provide this interface, users need to specify this flag and the graph format correctly. this will be very confusing to users. |
Enabling |
python/dgl/distributed/dist_graph.py
Outdated
@@ -339,6 +344,12 @@ def __init__(self, server_id, ip_config, num_servers, | |||
# Create the graph formats specified the users. | |||
self.client_g = self.client_g.formats(graph_format) | |||
self.client_g.create_formats_() | |||
if sort_etypes == 'csr': | |||
self.client_g = sort_csr_by_tag( | |||
self.client_g, tag=self.client_g.edata[ETYPE], tag_type='edge') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jermainewang @zheng-da Is sorting like this correct ? Is passing tag with g.edata[ETYPE]
correct? Do I need to sort the inner edges only?
…#4212) * [Dist] enable to specify sort_etype for sample_etype_neighbours * fix lint * pass argument instead of env * fix lint and doc string * refine args * remove unnecessary lines * debug only * debug add sort time log * change interface * fix typo Co-authored-by: Xin Yao <xiny@nvidia.com>
Description
follow-up for #4150.
Checklist
Please feel free to remove inapplicable items for your PR.
or have been fixed to be compatible with this change
Changes