for key, df in df_dict.items():
if key == "val":
key = "dev"
df.to_pickle(os.path.join(base_dir, "{}.pd.pkl".format(key)))
if meta_data is not None:
with open(os.path.join(base_dir, "metadata.json"), "w") as f:
json.dump(meta_data, f)
After Change
base_dir = os.path.join(args.data_dir, task)
if os.path.exists(base_dir):
print("Found!")
continue
zip_dir_name = None
with zipfile.ZipFile(data_file) as zipdata:
if zip_dir_name is None:
zip_dir_name = os.path.dirname(zipdata.infolist()[0].filename)