diff --git a/examples/customized_models/HGT/hgt_nc.py b/examples/customized_models/HGT/hgt_nc.py index 6da88e6870..7164266def 100644 --- a/examples/customized_models/HGT/hgt_nc.py +++ b/examples/customized_models/HGT/hgt_nc.py @@ -393,8 +393,7 @@ def main(args): argparser.add_argument("--local_rank", type=int, help="The rank of the trainer. \ For customized models, MUST have this argument!!") + args = argparser.parse_args() - # Ignore unknown args to make script more robust to input arguments - args, _ = argparser.parse_known_args() print(args) main(args) diff --git a/examples/temporal_graph_learning/main_nc.py b/examples/temporal_graph_learning/main_nc.py index 20fe18889b..cf3f360874 100644 --- a/examples/temporal_graph_learning/main_nc.py +++ b/examples/temporal_graph_learning/main_nc.py @@ -106,8 +106,8 @@ def generate_parser(): if __name__ == "__main__": arg_parser = generate_parser() - # Ignore unknown args to make script more robust to input arguments - args, _ = arg_parser.parse_known_args() + args = arg_parser.parse_args() + print(args) main(args) diff --git a/python/graphstorm/run/gsgnn_dt/distill_gnn.py b/python/graphstorm/run/gsgnn_dt/distill_gnn.py index 556ad9940e..17c9b3becd 100644 --- a/python/graphstorm/run/gsgnn_dt/distill_gnn.py +++ b/python/graphstorm/run/gsgnn_dt/distill_gnn.py @@ -92,6 +92,6 @@ def generate_parser(): if __name__ == '__main__': arg_parser=generate_parser() - # Ignore unknown args to make script more robust to input arguments - gs_args, _ = arg_parser.parse_known_args() - main(gs_args) + args = arg_parser.parse_args() + print(args) + main(args) diff --git a/python/graphstorm/run/gsgnn_emb/gsgnn_node_emb.py b/python/graphstorm/run/gsgnn_emb/gsgnn_node_emb.py index a4d6eee6a3..4f402600b0 100644 --- a/python/graphstorm/run/gsgnn_emb/gsgnn_node_emb.py +++ b/python/graphstorm/run/gsgnn_emb/gsgnn_node_emb.py @@ -103,6 +103,5 @@ def generate_parser(): if __name__ == '__main__': arg_parser = generate_parser() - # Ignore unknown args to make script more robust to input arguments - gs_args, _ = arg_parser.parse_known_args() - main(gs_args) + args = arg_parser.parse_args() + main(args) diff --git a/python/graphstorm/run/gsgnn_ep/ep_infer_gnn.py b/python/graphstorm/run/gsgnn_ep/ep_infer_gnn.py index 8a6bd6b98b..7ae09cab29 100644 --- a/python/graphstorm/run/gsgnn_ep/ep_infer_gnn.py +++ b/python/graphstorm/run/gsgnn_ep/ep_infer_gnn.py @@ -99,6 +99,5 @@ def generate_parser(): if __name__ == '__main__': arg_parser=generate_parser() - # Ignore unknown args to make script more robust to input arguments - gs_args, _ = arg_parser.parse_known_args() - main(gs_args) + args = arg_parser.parse_args() + main(args) diff --git a/python/graphstorm/run/gsgnn_ep/ep_infer_lm.py b/python/graphstorm/run/gsgnn_ep/ep_infer_lm.py index e26d8a8118..7e43ff18cb 100644 --- a/python/graphstorm/run/gsgnn_ep/ep_infer_lm.py +++ b/python/graphstorm/run/gsgnn_ep/ep_infer_lm.py @@ -89,6 +89,5 @@ def generate_parser(): if __name__ == '__main__': arg_parser=generate_parser() - # Ignore unknown args to make script more robust to input arguments - gs_args, _ = arg_parser.parse_known_args() - main(gs_args) + args = arg_parser.parse_args() + main(args) diff --git a/python/graphstorm/run/gsgnn_ep/gsgnn_ep.py b/python/graphstorm/run/gsgnn_ep/gsgnn_ep.py index b347030278..e68e1227c0 100644 --- a/python/graphstorm/run/gsgnn_ep/gsgnn_ep.py +++ b/python/graphstorm/run/gsgnn_ep/gsgnn_ep.py @@ -179,6 +179,5 @@ def generate_parser(): if __name__ == '__main__': arg_parser=generate_parser() - # Ignore unknown args to make script more robust to input arguments - gs_args, _ = arg_parser.parse_known_args() - main(gs_args) + args = arg_parser.parse_args() + main(args) diff --git a/python/graphstorm/run/gsgnn_ep/gsgnn_lm_ep.py b/python/graphstorm/run/gsgnn_ep/gsgnn_lm_ep.py index 39c54c995c..2a85a49011 100644 --- a/python/graphstorm/run/gsgnn_ep/gsgnn_lm_ep.py +++ b/python/graphstorm/run/gsgnn_ep/gsgnn_lm_ep.py @@ -148,6 +148,5 @@ def generate_parser(): if __name__ == '__main__': arg_parser=generate_parser() - # Ignore unknown args to make script more robust to input arguments - gs_args, _ = arg_parser.parse_known_args() - main(gs_args) + args = arg_parser.parse_args() + main(args) diff --git a/python/graphstorm/run/gsgnn_lp/gsgnn_lm_lp.py b/python/graphstorm/run/gsgnn_lp/gsgnn_lm_lp.py index cfd3d5fe3e..143fd58e06 100644 --- a/python/graphstorm/run/gsgnn_lp/gsgnn_lm_lp.py +++ b/python/graphstorm/run/gsgnn_lp/gsgnn_lm_lp.py @@ -197,6 +197,5 @@ def generate_parser(): if __name__ == '__main__': arg_parser=generate_parser() - # Ignore unknown args to make script more robust to input arguments - gs_args, _ = arg_parser.parse_known_args() - main(gs_args) + args = arg_parser.parse_args() + main(args) diff --git a/python/graphstorm/run/gsgnn_lp/gsgnn_lp.py b/python/graphstorm/run/gsgnn_lp/gsgnn_lp.py index acc0c2fdbc..92a40dc737 100644 --- a/python/graphstorm/run/gsgnn_lp/gsgnn_lp.py +++ b/python/graphstorm/run/gsgnn_lp/gsgnn_lp.py @@ -223,6 +223,5 @@ def generate_parser(): if __name__ == '__main__': arg_parser=generate_parser() - # Ignore unknown args to make script more robust to input arguments - gs_args, _ = arg_parser.parse_known_args() - main(gs_args) + args = arg_parser.parse_args() + main(args) diff --git a/python/graphstorm/run/gsgnn_lp/lp_infer_gnn.py b/python/graphstorm/run/gsgnn_lp/lp_infer_gnn.py index 0e95a89841..50a2e97acc 100644 --- a/python/graphstorm/run/gsgnn_lp/lp_infer_gnn.py +++ b/python/graphstorm/run/gsgnn_lp/lp_infer_gnn.py @@ -88,6 +88,5 @@ def generate_parser(): if __name__ == '__main__': arg_parser=generate_parser() - # Ignore unknown args to make script more robust to input arguments - gs_args, _ = arg_parser.parse_known_args() - main(gs_args) + args = arg_parser.parse_args() + main(args) diff --git a/python/graphstorm/run/gsgnn_lp/lp_infer_lm.py b/python/graphstorm/run/gsgnn_lp/lp_infer_lm.py index aa7c051b90..e196d3fd83 100644 --- a/python/graphstorm/run/gsgnn_lp/lp_infer_lm.py +++ b/python/graphstorm/run/gsgnn_lp/lp_infer_lm.py @@ -90,6 +90,5 @@ def generate_parser(): if __name__ == '__main__': arg_parser=generate_parser() - # Ignore unknown args to make script more robust to input arguments - gs_args, _ = arg_parser.parse_known_args() - main(gs_args) + args = arg_parser.parse_args() + main(args) diff --git a/python/graphstorm/run/gsgnn_np/gsgnn_np.py b/python/graphstorm/run/gsgnn_np/gsgnn_np.py index 085581be40..ad719bf8ed 100644 --- a/python/graphstorm/run/gsgnn_np/gsgnn_np.py +++ b/python/graphstorm/run/gsgnn_np/gsgnn_np.py @@ -190,6 +190,5 @@ def generate_parser(): if __name__ == '__main__': arg_parser=generate_parser() - # Ignore unknown args to make script more robust to input arguments - gs_args, _ = arg_parser.parse_known_args() - main(gs_args) + args = arg_parser.parse_args() + main(args) diff --git a/python/graphstorm/run/gsgnn_np/np_infer_gnn.py b/python/graphstorm/run/gsgnn_np/np_infer_gnn.py index 10a84e9108..3c58f33a6b 100644 --- a/python/graphstorm/run/gsgnn_np/np_infer_gnn.py +++ b/python/graphstorm/run/gsgnn_np/np_infer_gnn.py @@ -94,6 +94,5 @@ def generate_parser(): if __name__ == '__main__': arg_parser=generate_parser() - # Ignore unknown args to make script more robust to input arguments - gs_args, _ = arg_parser.parse_known_args() - main(gs_args) + args = arg_parser.parse_args() + main(args) diff --git a/sagemaker/launch/launch_infer.py b/sagemaker/launch/launch_infer.py index d47e588e51..725d23da57 100644 --- a/sagemaker/launch/launch_infer.py +++ b/sagemaker/launch/launch_infer.py @@ -92,7 +92,6 @@ def run_job(input_args, image, unknownargs): # We must handle cases like # --target-etype query,clicks,asin query,search,asin # --feat-name ntype0:feat0 ntype1:feat1 - # --column-names nid,~id emb,embedding unknow_idx = 0 while unknow_idx < len(unknownargs): print(unknownargs[unknow_idx])