MCPcopy
hub / github.com/dmlc/dgl / run_preprocess_data

Function run_preprocess_data

tools/distpartitioning/parmetis_preprocess.py:381–405  ·  view source on GitHub ↗

Main function which will help create graph files for ParMETIS processing Parameters: ----------- params : argparser object An instance of argparser class which stores command line arguments.

(params)

Source from the content-addressed store, hash-verified

379
380
381def run_preprocess_data(params):
382 """Main function which will help create graph files for ParMETIS processing
383
384 Parameters:
385 -----------
386 params : argparser object
387 An instance of argparser class which stores command line arguments.
388 """
389 logging.info("Starting to generate ParMETIS files...")
390 rank = get_proc_info()
391
392 assert os.path.isdir(
393 params.input_dir
394 ), f"Please check `input_dir` argument: {params.input_dit}."
395
396 schema_map = read_json(os.path.join(params.input_dir, params.schema_file))
397 gen_node_weights_files(schema_map, params)
398 logging.info("Done with node weights....")
399
400 gen_edge_files(rank, schema_map, params)
401 logging.info("Done with edge weights...")
402
403 if rank == 0:
404 gen_parmetis_input_args(params, schema_map)
405 logging.info("Done generating files for ParMETIS run ..")
406
407
408if __name__ == "__main__":

Callers 1

Calls 7

read_jsonFunction · 0.90
get_proc_infoFunction · 0.85
gen_node_weights_filesFunction · 0.85
gen_edge_filesFunction · 0.85
gen_parmetis_input_argsFunction · 0.85
infoMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected