不能浅拷贝,是支持直接赋值的,paddle内部集成的数据集是支持,本地数据按内部格式直接加载的!
My guess is that you used code like dev_ds=train_ds, which is a copy instead of deepcopy. So there is only one dataset in memory with two names train_ds and dev_ds. When the program start to process dev_ds, it is actually processing train_ds again. That is why convert_example raise a exception since the data inside has already changed. The code below works fine.