Skip to content

Commit

Permalink
merge zenode fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arturtoshev committed Feb 23, 2024
2 parents 5e5233f + ee9167a commit fa2d604
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion download_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 8 additions & 7 deletions lagrangebench/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}


Expand Down

0 comments on commit fa2d604

Please sign in to comment.