Skip to content

Commit

Permalink
fix error of outdated debug dataset automatically being downloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
lukashermann committed Dec 18, 2023
1 parent c561639 commit 59103e9
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions calvin_models/calvin_agent/datasets/calvin_data_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

logger = logging.getLogger(__name__)
DEFAULT_TRANSFORM = OmegaConf.create({"train": None, "val": None})
ONE_EP_DATASET_URL = "http://www.informatik.uni-freiburg.de/~meeso/50steps.tar.xz"


class CalvinDataModule(pl.LightningDataModule):
Expand Down Expand Up @@ -51,17 +50,11 @@ def prepare_data(self, *args, **kwargs):

# download and unpack images
if not dataset_exist:
if "CI" not in os.environ:
print(f"No dataset found in {self.training_dir}.")
print("For information how to download to full CALVIN dataset, please visit")
print("https://github.com/mees/calvin/tree/main/dataset")
print("Do you wish to download small debug dataset to continue training?")
s = input("YES / no")
if s == "no":
exit()
logger.info(f"downloading dataset to {self.training_dir} and {self.val_dir}")
torchvision.datasets.utils.download_and_extract_archive(ONE_EP_DATASET_URL, self.training_dir)
torchvision.datasets.utils.download_and_extract_archive(ONE_EP_DATASET_URL, self.val_dir)
logger.error(f"""No dataset found in {Path(self.training_dir).parent}.
Please make sure you set the correct dataset path.
For information how to download one of the CALVIN datasets, please visit
https://github.com/mees/calvin/tree/main/dataset""")
exit()

if self.use_shm:
# When using shared memory dataset, initialize lookups
Expand Down

0 comments on commit 59103e9

Please sign in to comment.