Skip to content

Commit

Permalink
[GPartition] Rename the input argument for dispatch (#931)
Browse files Browse the repository at this point in the history
*Issue #, if available:*

*Description of changes:*

We now reverse the meaning of the original ``--do-dispatch`` input
argument.

Successfully test with 
```
python3 -m graphstorm.gpartition.dist_partition_graph \
    --input-path ./test-gsprocessing/ \
    --metadata-filename updated_row_counts_metadata.json \
    --output-path ./gspartition-example/ \
    --num-parts 1 \
    --dgl-tool-path ./dgl/tools \
    --partition-algorithm random \
    --ip-config ip_list.txt \
    --ssh-port 2222 \
    --partition-assignment-only
```

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.

---------

Co-authored-by: xiang song(charlie.song) <[email protected]>
  • Loading branch information
jalencato and classicsong authored Jul 24, 2024
1 parent e7208d9 commit a996b71
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions python/graphstorm/gpartition/dist_partition_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def main():
part_end - part_start,
)

if args.do_dispatch:
if not args.partition_assignment_only:
run_build_dglgraph(
args.input_path,
part_assignment_dir,
Expand All @@ -165,9 +165,11 @@ def main():
dirs_exist_ok=True,
)


logging.info('Partition assignment and DGL graph creation took %f seconds',
if not args.partition_assignment_only:
logging.info('Partition assignment and DGL graph creation took %f seconds',
time.time() - start)
else:
logging.info('Partition assignment took %f seconds', time.time() - start)

def parse_args() -> argparse.Namespace:
"""Parses arguments for the script"""
Expand All @@ -189,7 +191,9 @@ def parse_args() -> argparse.Namespace:
argparser.add_argument("--ip-config", type=str,
help=("A file storing a list of IPs, one line for "
"each instance of the partition cluster."))
argparser.add_argument("--do-dispatch", action='store_true')
argparser.add_argument("--partition-assignment-only", action='store_true',
help="Only generate partition assignments for nodes, \
the process will not build the partitioned DGL graph")
argparser.add_argument("--logging-level", type=str, default="info",
help="The logging level. The possible values: debug, info, warning, \
error. The default value is info.")
Expand Down

0 comments on commit a996b71

Please sign in to comment.