diff --git a/README.md b/README.md index c508482..10ecdbd 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ NeurIPS page with video and slides [here](https://neurips.cc/virtual/2023/poster ### Standalone library Install the core `lagrangebench` library from PyPi as ```bash +python3.10 -m venv venv +source venv/bin/activate pip install lagrangebench --extra-index-url=https://download.pytorch.org/whl/cpu ``` @@ -191,6 +193,13 @@ You should also run the unit tests locally before creating a PR. Do this simply pytest ``` +### Clone vs Library +LagrangeBench can be installed by cloning the repository or as a standalone library. This offers more flexibility, but it also comes with its disadvantages: the necessity to implement some things twice. If you change any of the following things, make sure to update its counterpart as well: +- General setup in `experiments/` and `notebooks/tutorial.ipynb` +- Configs in `configs/` and `lagrangebench/defaults.py` +- Zenodo URLs in `download_data.sh` and `lagrangebench/data/data.py` +- Dependencies in `pyproject.toml`, `requirements_cuda.txt`, and `docs/requirements.txt` + ## Citation The paper (at NeurIPS 2023 Datasets and Benchmarks) can be cited as: diff --git a/download_data.sh b/download_data.sh index 6191e34..1a01522 100644 --- a/download_data.sh +++ b/download_data.sh @@ -21,7 +21,7 @@ fi DATASET_NAME="$1" OUTPUT_DIR="$2" -ZENODO_PREFIX="https://zenodo.org/records/10021926/files/" +ZENODO_PREFIX="https://zenodo.org/records/10491868/files/" # Check if there is a trailing slash in $OUTPUT_DIR and remove it if [[ $OUTPUT_DIR == */ ]]; then diff --git a/lagrangebench/data/data.py b/lagrangebench/data/data.py index 077d7cb..1513d28 100644 --- a/lagrangebench/data/data.py +++ b/lagrangebench/data/data.py @@ -18,14 +18,15 @@ from lagrangebench.utils import NodeType +ZENODO_PREFIX = "https://zenodo.org/records/10491868/files/" URLS = { - "tgv2d": "https://zenodo.org/records/10491868/files/2D_TGV_2500_10kevery100.zip", - "rpf2d": "https://zenodo.org/records/10491868/files/2D_RPF_3200_20kevery100.zip", - "ldc2d": "https://zenodo.org/records/10491868/files/2D_LDC_2708_10kevery100.zip", - "dam2d": "https://zenodo.org/records/10491868/files/2D_DAM_5740_20kevery100.zip", - "tgv3d": "https://zenodo.org/records/10491868/files/3D_TGV_8000_10kevery100.zip", - "rpf3d": "https://zenodo.org/records/10491868/files/3D_RPF_8000_10kevery100.zip", - "ldc3d": "https://zenodo.org/records/10491868/files/3D_LDC_8160_10kevery100.zip", + "tgv2d": f"{ZENODO_PREFIX}2D_TGV_2500_10kevery100.zip", + "rpf2d": f"{ZENODO_PREFIX}2D_RPF_3200_20kevery100.zip", + "ldc2d": f"{ZENODO_PREFIX}2D_LDC_2708_10kevery100.zip", + "dam2d": f"{ZENODO_PREFIX}2D_DAM_5740_20kevery100.zip", + "tgv3d": f"{ZENODO_PREFIX}3D_TGV_8000_10kevery100.zip", + "rpf3d": f"{ZENODO_PREFIX}3D_RPF_8000_10kevery100.zip", + "ldc3d": f"{ZENODO_PREFIX}3D_LDC_8160_10kevery100.zip", }