TypeError due to load_dataset
Hello All,I have the following line:dataset = load_dataset(dataset_path, split="train", streaming=False)dataset_path is a Path object with the value of PosixPath(‘/home/roland/Documents/hun_tale_gen/hun_tale_gen/data/dataset’)The referenced dataset_path is created by an earlier save_to_disk method call and the folder structure looks like this:dataset–test----data-00000-of-00001.arrow----dataset_info.json----state.json–train----data-00000-of-00001.arrow----dataset_info.json----state.json–dataset_dict.jsonI got a TypeError exception from the load.py file. Path.replace() takes2 positional arguments but 3 were given. This comes from the 1402nd raw of load.py:filename = list(filter(lambda x: x, path.replace(os.sep, "/").split("/")))[-1]I have no idea what is wrong here because it is clear that the method caLL above has only two parameters
2023-10-17T16:33:53Z
pathlib’sPathis currently not supported inload_dataset, so replacingdataset_pathwithstr(dataset_path)should fix the issue.
2023-10-23T10:15:08Z
Thanks@mariosaskoit is working now