Skip to content

Commit

Permalink
fix: 🐛 copy adj of ca
Browse files Browse the repository at this point in the history
  • Loading branch information
zezhishao committed Mar 1, 2024
1 parent 07616f4 commit 318f223
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/data_preparation/CA/generate_training_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ def generate_data(args: argparse.Namespace):
with open(output_dir + "/data_in_{0}_out_{1}_rescale_{2}.pkl".format(history_seq_len, future_seq_len, if_rescale), "wb") as f:
pickle.dump(data, f)
# copy adj
shutil.copyfile(graph_file_path, output_dir + "/adj_mx.pkl")
adj_mx = np.load(graph_file_path)
with open(output_dir + "/adj_mx.pkl", "wb") as f:
pickle.dump(adj_mx, f)
# copy adj meta data
shutil.copyfile(graph_file_path, output_dir + "/adj_meta.pkl")
shutil.copyfile(graph_file_path, output_dir + "/adj_meta.csv")


if __name__ == "__main__":
Expand Down

0 comments on commit 318f223

Please sign in to comment.