diff --git a/catenets/datasets/network.py b/catenets/datasets/network.py index 0f39c02..5076aa3 100644 --- a/catenets/datasets/network.py +++ b/catenets/datasets/network.py @@ -7,7 +7,7 @@ from pathlib import Path from typing import Optional -from google_drive_downloader import GoogleDriveDownloader as gdd +import gdown def download_gdrive_if_needed(path: Path, file_id: str) -> None: @@ -26,7 +26,7 @@ def download_gdrive_if_needed(path: Path, file_id: str) -> None: if path.exists(): return - gdd.download_file_from_google_drive(file_id=file_id, dest_path=path) + gdown.download(id=file_id, output=str(path), quiet=False) def download_http_if_needed(path: Path, url: str) -> None: @@ -98,6 +98,7 @@ def download_if_needed( unarchive_folder: str Mandatory if you set unarchive to True. """ + download_path = Path(download_path) if file_id is not None: download_gdrive_if_needed(download_path, file_id) elif http_url is not None: @@ -108,4 +109,8 @@ def download_if_needed( if unarchive and unarchive_folder is None: raise ValueError("Please provide a folder for the archive") if unarchive and unarchive_folder is not None: - unarchive_if_needed(download_path, unarchive_folder) + try: + unarchive_if_needed(download_path, unarchive_folder) + except BaseException as e: + print(f"Failed to unpack {download_path}. Error {e}") + download_path.unlink() diff --git a/catenets/version.py b/catenets/version.py index 3ced358..b5fdc75 100644 --- a/catenets/version.py +++ b/catenets/version.py @@ -1 +1 @@ -__version__ = "0.2.1" +__version__ = "0.2.2" diff --git a/experiments/__init__.py b/experiments/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/experiments/experiments_benchmarks_NeurIPS21/__init__.py b/experiments/experiments_benchmarks_NeurIPS21/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/experiments/experiments_inductivebias_NeurIPS21/__init__.py b/experiments/experiments_inductivebias_NeurIPS21/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt index dcf6f44..1de9462 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -googledrivedownloader +gdown jax>=0.3.16 jaxlib>=0.3.14; sys_platform != 'win32' loguru>=0.5.3