We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4335a9d commit a003a8cCopy full SHA for a003a8c
fms_mo/utils/calib_data.py
@@ -399,7 +399,8 @@ def get_tokenized_data(
399
if path_to_save:
400
datasets.Dataset.from_list(traindataset).save_to_disk(path_to_save + "_train")
401
if isinstance(testdataset, BatchEncoding):
402
- os.mkdir(path_to_save + "_test")
+ if not os.path.exists(path_to_save + "_test"):
403
+ os.mkdir(path_to_save + "_test")
404
torch.save(testdataset, path_to_save + "_test/testdataset.pt")
405
elif isinstance(testdataset, list):
406
datasets.Dataset.from_list(testdataset).save_to_disk(path_to_save + "_test")
0 commit comments