Datasets:
Update tomatotest.py
Browse files- tomatotest.py +8 -4
tomatotest.py
CHANGED
|
@@ -91,11 +91,15 @@ class RGBSemanticDepthDataset(GeneratorBasedBuilder):
|
|
| 91 |
print(f"\tExtracted {archive} to {extracted_dir}")
|
| 92 |
if self.config.remove_tar and os.path.exists(archive):
|
| 93 |
os.remove(archive)
|
| 94 |
-
|
| 95 |
-
for filename in os.listdir(blob_folder):
|
| 96 |
-
filepath = os.path.join(blob_folder, filename)
|
| 97 |
-
os.remove(filepath)
|
| 98 |
print(f"\tDeleted tar file {archive}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
print("All extracted. exiting")
|
| 100 |
exit()
|
| 101 |
archives = dl_manager.download({"train":self._get_dataset_filenames(),
|
|
|
|
| 91 |
print(f"\tExtracted {archive} to {extracted_dir}")
|
| 92 |
if self.config.remove_tar and os.path.exists(archive):
|
| 93 |
os.remove(archive)
|
| 94 |
+
|
|
|
|
|
|
|
|
|
|
| 95 |
print(f"\tDeleted tar file {archive}")
|
| 96 |
+
blob_folder = '/'.join(archive.replace("snapshots","blobs").split('/')[:-3])
|
| 97 |
+
|
| 98 |
+
if self.config.remove_tar and os.path.exists(blob_folder):
|
| 99 |
+
for filename in os.listdir(blob_folder):
|
| 100 |
+
filepath = os.path.join(blob_folder, filename)
|
| 101 |
+
os.remove(filepath)
|
| 102 |
+
print(f"\tDeleted tar file {blob_folder}")
|
| 103 |
print("All extracted. exiting")
|
| 104 |
exit()
|
| 105 |
archives = dl_manager.download({"train":self._get_dataset_filenames(),
|