* Support for no. of chunks smaller than no. of partitions and Adding appropriate test cases.
Following changes are made with this PR.
1. Code changes for handling no. of chunks smaller than no. of partitions
2. Adding new test cases, which were previously deleted, for no. of chunks smaller than no. of partitions.
3. Also adding test cases, where multiple partitions are handled by a single process.
* Committing the missing files in this commit.
* lintrunner patch.
* lintrunner check
* lintrunner patch here.
* CI review comments.
* Implemented the following changes.
* Remove NUM_NODES_PER_CHUNK
* Remove NUM_EDGES_PER_CHUNK
* Remove the dependency between no. of edge files per edge type and no. of partitions
* Remove the dependency between no. of edge feature files per edge type and no. of partitions
* Remove the dependency between no. of edge feature files and no. of edge files per edge type.
* Remove the dependency between no. of node feature files and no. of partitions
* Add “node_type_counts”. This will be a list of integers. Each integer will represent total count of a node-type. The index in this list and the index in the “node_type” will be the same for a given node-type.
* Add “edge_type_counts”. This will be a list of integers. Each integer will represent total count of an edge-type. The index in this list and the index in the “edge_type” list will be the same for a given edge-type.
* Applying lintrunner patch.
* Adding missing keys to the metadata in the unit test framework.
* lintrunner patch.
* Resolving CI test failures due to merge conflicts.
* Applying lintrunner patch
* applying lintrunner patch
* Replacing tabspace with spaces - to satisfy lintrunner
* Fixing the CI Test Failure cases.
* Applying lintrunner patch
* lintrunner complaining about a blank line.
* Resolving issues with print statement for NoneType
* Removed tests for the arbitrary chunks tests. Since this functionality is not supported anymore.
* Addressing CI review comments.
* addressing CI review comments
* lintrunner patch
* lintrunner patch.
* Addressing CI review comments.
* lintrunner patch.
* Edge Ownership processes are computed on the fly when required.
Earlier we were storing Edge ownership processes after the dataset was retrieved from the disk. For massively large datasets, each node can handle upto 5 Billion edges, this means storing owner process-ids will consume 5 * 8 = 40GB. This memory will be hanging around until the edges are exchanged.
To reduce the memory footprint of the pipeline, we no longer store the ownership process-ids in the 'edge_data' dictionary after reading the dataset from the disk. Instead, we compute them on the fly at the time of exchanging edges.
Another optimization is not to send/receive all the messages in a one single large message. Instead we now split the total number edges into chunks, limited by 8 GB per node. And we iterate until all the chunks are exchanged.
Once all the edges are exchanged, as a sanity check, we compute the total number of edges in the system and compare it with the original value before edge shuffling, in a final assert statement before return the result to the caller.
* Applying lintrunner patch.
* [Dist] enable to chunk node/edge data into arbitrary number of chunks
* [Dist] enable to split node/edge data into arbitrary parts
* refine code
* Format boolean to uint8 forcely to avoid dist.scatter failure
* convert boolean to int8 before scatter and revert it after scatter
* refine code
* fix test
* refine code
* move test utilities into utils.py
* update comment
* fix empty data
* update
* update
* fix empty data issue
* release unnecessary mem
* release unnecessary mem
* release unnecessary mem
* release unnecessary mem
* release unnecessary mem
* remove unnecessary shuffle data
* separate array_split into standalone utility
* add example
Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>
* Flexible pipeline - Initial commit
1. Implementation of flexible pipeline feature.
2. With this implementation, the pipeline now supports multiple partitions per process. And also assumes that num_partitions is always a multiple of num_processes.
* Update test_dist_part.py
* Code changes to address review comments
* Code refactoring of exchange_features function into two functions for better readability
* Upadting test_dist_part to fix merge issues with the master branch
* corrected variable names...
* Fixed code refactoring issues.
* Provide missing function arguments to exchange_feature function
* Providing the missing function argument to fix error.
* Provide missing function argument to 'get_shuffle_nids' function.
* Repositioned a variable within its scope.
* Removed tab space which is causing the indentation problem
* Fix issue with the CI test framework, which is the root cause for the failure of the CI tests.
1. Now we read files specific to the partition-id and store this data separately, identified by the local_part_id, in the local process.
2. Similarly as above, we also differentiate the node and edge features type_ids with the same keys as above.
3. These above two changes will help up to get the appropriate feature data during the feature exchange and send to the destination process correctly.
* Correct the parametrization for the CI unit test cases.
* Addressing Rui's code review comments.
* Addressing code review comments.
* [Dist] deprecate etype and always use canonical etype for partition and load
* enable canonical etypes in dist part pipeline
* resolve rebase conflicts
* fix lint
* fix test failure
* throw exception if outdated part config is loaded
* refine
* refine
* revert unnecessary change
* fix typo
* [Dist] Reduce peak memory in DistDGL: avoid validation, release memory once loaded
* remove orig_id from ndata/edata for partition_graph()
* delete orig_id from ndata/edata in dist part pipeline
* reduce dtype size and format before saving graphs
* fix lint
* ETYPE requires to be int32/64 for CSRSortByTag
* fix test failure
* refine
* Added support for edge features.
* Added comments and removing unnecessary print statements.
* updated data_shuffle.py to remove compile error.
* Repaled python3 with python to match CI test framework.
* Removed unrelated files from the pull request.
* Isort changes.
* black changes on this file.
* Addressing CI review comments.
* Addressing CI comments.
* Removed duplicated and resolved merge conflict code.
* Addressing CI Comments from Rui.
* Addressing CI comments, and fixing merge issues.
* Addressing CI comments, code refactoring, isort and black
* [Dist] enable to partition many chunks into less partitions via pipeline
* refine
* add meta file for num_parts, add more tests, refine docstring
* remove args.num_parts
* create pydantic class for partition metadata
* refine
* rename json file
* Distributed Lookup service which is for retrieving global_nids to shuffle-global-nids/partition-id mappings
1. Implemented a class to provide distributed lookup service
2. This class can be used to retrieve global-nids mappings
* Code changes to address CI comments.
1. Removed some unneeded type_casts to numpy.int64
2. Added additional comments when iterating over the partition-ids list.
3.Added docstring to the class and adjusted comments where it is relevant.
* Updated code comments and variable names...
1. Changed the variable names to appropriately represent the values stored in these variables.
2. Updated the docstring correctly.
* Corrected docstring as per the suggestion... and removed all the capital letters for Global nids and Shuffle Global nids...
* Addressing CI review comments.
* Code changes to address the updated file format support for massively large graphs.
1. Updated the docstring for the starting function 'gen_dist_partitions" to describe the newly proposed file format for input dataset.
2. Code which was dependent on the structure of the old-metadata json object has been updated to read from the newly proposed metadata file.
3. Fixed some errors when appropriate functions were invoked and the calling function expects return values from the invoked furnction.
4. This modified code has been tested on "mag" dataset using 4-way partitions and verified the results
* Code changes to address the CI review comments
1. Improved docstrings for some functions.
2. Added a new function in the utils.py to compute the id ranges and this is used in multiple places.
* Added TODO to indicate the redundant data structure.
Because of the new file format changes, one of the dictionaries (node_feature_tids, node_tids) will be redundant. Added TODO text so that this will be removed in the next iteration of code changes.
* Code changes for the following
1. Generating node data at each process
2. Reading csv files using pyarrow
3. feature complete code.
* Removed some typo's because of which unit tests were failing
1. Change the file name to correct file name when loading edges from file
2. When storing node-features after shuffling, use the correct key to store the global-nids of node features which are received after transmitted.
* Code changes to address CI comments by reviewers
1. Removed some redundant code and added text in the doc-strings to describe the functionality of some functions.
2 function signatures and invocations now match w.r.t argument list
3. Added detailed description of the metadata json structure so that the users understand the the type of information present in this file and how it is used through out the code.
* Addressing code review comments
1. Addressed all the CI comments and some of the changes include simplifying the code related to the concatenation of lists and enhancing the docstrings of functions which are changed in this process.
* Update docstring's of two functions appropriately in response to code review comments
Removed "todo" from the docstring of the gen_nodedata function.
Added "todo" to the gen_dist_partitions function when node-id to partition-id's are read for the first time.
Removed 'num-node-weights' from the docstring for the get_dataset function and added schema_map docstring to the argument list.
* Added code to support multiple-file-support feature and removed single-file-support code
1. Added code to read dataset in multiple-file-format
2. Removed code for single-file format
* added files missing in the previous commit
This commit includes dataset_utils.py, which reads the dataset in multiple-file-format, gloo_wrapper function calls to support exchanging dictionaries as objects and helper functions in utils.py
* Update convert_partition.py
Updated function call "create_metadata_json" file to include partition_id so that each rank only creates its own metadata object and later on these are accumulated on rank-0 to create graph-level metadata json file.
* addressing code review comments during the CI process
code changes resulting from the code review comments received during the CI process.
* Code reorganization
Addressing CI comments and code reorganization for easier understanding.
* Removed commented out line
removed commented out line.
* Initial implementation of Distributed data processing step in the Distributed Training pipeline
Implemented the following:
1) Read the output of parmetis (node-id to partition-id mappings)
2) Read the original graph files
3) Shuffle the node/edge metadata and features
4) output the partition specific files in DGL format using convert_partition.py functionality
5) Graph meta data is serialized in json format on rank-0 machine.
* Bug Fixes identified during verification of the dataset
1. When sending out global-id lookups for non-local nodes, in the msg_alltoall.py, conditional filter was used to identify the indices in node_data which is incorrect. Replaced the conditional filter with intersect1d to find out the common node ids and appropriate indices which are later used to identify the needed information to communicate.
2. When writing the graph level json file in distributed processing, the edge_offset on non-rank-0 machines was starting from 0 instead of the appropriate offset. Now added code to start the edge(s) from correct starting offset instead of 0 always.
* Restructuring and consolidation of code
1) Fixed issue when running verify_mag_dataset.py, Now we read xxx_removed_edges.txt and add these edges to `edge_data`. This will ensure that the self-loops and duplicate edges are handling appropriately when compared to the original dataset.
2) Consolidated code into a fewer files and changed code to following the python naming convention.
* Code changes addressing code review comments
Following changes are made in this commit.
1) Naming convention is defined and code is changed accordingly. Definition of various global_ids are defined and how to read them is mentioned.
2) All the code review comments are addressed
3)Files are moved to a new directory with dgl/tools directory as per suggestion
4) README.md file is include and it contains detailed information about the Naming convention adopted by the code, high level overview of the algorithm used in data-shuffling, example command-line to use on a single machine.
* addressing github review comments
Made code changes addressing all the review comments from GitHub.
* Addressing latest code review comments
Addressed all the latest code reviewing comments. One of the major changes is treating the node and edge metadata as dictionary objects and removing all the python lists with numpy arrays.
* Update README.md
Text rendering corrections
* Addressed code review comments
Addressed code review comments for the latest code review
Co-authored-by: xiang song(charlie.song) <classicxsong@gmail.com>