I have this code in colab that has been working for a month or two straight:
ds_glass_train, ds_glass_test = tfds.load('mnist_corrupted/glass_blur', split=['train', 'test'], as_supervised=True, batch_size=-1)
x_train_corrupt, _ = tfds.as_numpy(ds_glass_train)
x_test_corrupt, _ = tfds.as_numpy(ds_glass_test)
ds_clean_train, ds_clean_test = tfds.load('mnist_corrupted/identity', split=['train', 'test'], as_supervised=True, batch_size=-1)
x_train_clean, _ = tfds.as_numpy(ds_clean_train)
x_test_clean, _ = tfds.as_numpy(ds_clean_test)
x_train_corrupt = x_train_corrupt.astype(np.float32) / 255.0
x_test_corrupt = x_test_corrupt.astype(np.float32) / 255.0
x_train_clean = x_train_clean.astype(np.float32) / 255.0
x_test_clean = x_test_clean.astype(np.float32) / 255.0
x_train_corrupt = np.squeeze(x_train_corrupt)
x_test_corrupt = np.squeeze(x_test_corrupt)
x_train_clean = np.squeeze(x_train_clean)
x_test_clean = np.squeeze(x_test_clean)
x_train_corrupt = np.expand_dims(x_train_corrupt, axis=-1)
x_test_corrupt = np.expand_dims(x_test_corrupt, axis=-1)
x_train_clean = np.expand_dims(x_train_clean, axis=-1)
x_test_clean = np.expand_dims(x_test_clean, axis=-1)
y_train = x_train_clean
y_test = x_test_clean
x_test_corrupt, y_test, x_val_corrupt, y_val = DatasetManager._split_test_val(x_test_corrupt, y_test)
return x_train_corrupt, y_train, x_test_corrupt, y_test, x_val_corrupt, y_val
I went to load my notebook and run some experiments today, and suddenly I get this error out of the blue. I am using tfds=4.9.7
FailedPreconditionError: /root/tensorflow_datasets/downloads/mnist_corrupted/zenodo.org_record_3239543_files_mnist_cr57oxqgVhwx_3eWvhMe_jbC8-h9BBW24OHEDf7pw5JM.zip/mnist_c/glass_blur/train_labels.npy; Not a directory
Has anyone encountered this error, or can help me fix it? i have deleted the cached dataset and redownloaded again, I have checked if tfds has been updated recently which it has not, I don’t know why it suddenly broke over night?