From 266fdada2a547493d4560579c14a51797d8a2715 Mon Sep 17 00:00:00 2001 From: salvaRC Date: Mon, 6 Nov 2023 15:49:25 -0800 Subject: [PATCH] Minor edits --- README.md | 8 ++++---- src/train.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a065aca..c569011 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ If you use this code, please consider citing our work. Copy the bibtex from the Salva Rühling Cachay, Bo Zhao, Hailey Joren, and Rose Yu,\ *Advances in Neural Information Processing Systems (NeurIPS)*, 2023 -## Environment Setup +## | Environment Setup We recommend installing ``dyffusion`` in a virtual environment from PyPi or Conda. For more details about installing [PyTorch](https://pytorch.org/get-started/locally/), please refer to their official documentation. @@ -31,7 +31,7 @@ For some compute setups you may want to install pytorch first for proper GPU sup python3 -m pip install .[train] -## Downloading Data +## | Downloading Data **Navier-Stokes and spring mesh:** Follow the instructions given by the [original dataset paper](https://github.com/karlotness/nn-benchmark). @@ -54,7 +54,7 @@ If you want to use a different directory, you need to change the permanently edit the ``data_dir`` variable in the [src/configs/datamodule/_base_data_config.yaml](src/configs/datamodule/_base_data_config.yaml) file. -## Running experiments +## | Running experiments Please see the [src/README.md](src/README.md) file for detailed instructions on how to run experiments, navigate the code and running with different configurations. @@ -125,7 +125,7 @@ To debug the physical systems experiments, feel free to use fewer training traje regional boxes (the default is 11 boxes) with ``python run.py 'datamodule.boxes=[88]'``. Generally, you can also try mixed precision training with ``python run.py trainer.precision=16``. -## Citation +## | Citation @inproceedings{cachay2023dyffusion, title={{DYffusion:} A Dynamics-informed Diffusion Model for Spatiotemporal Forecasting}, diff --git a/src/train.py b/src/train.py index 31abab6..3a49034 100644 --- a/src/train.py +++ b/src/train.py @@ -39,7 +39,7 @@ def run_model(config: DictConfig) -> float: # If not resuming training, check if run already exists (with same hyperparameters and seed) config = cfg_utils.extras(config, if_wandb_run_already_exists="resume") - wandb_id = config.logger.wandb.get("id") + wandb_id = config.logger.wandb.get("id") if hasattr(config.logger, "wandb") else None uses_wandb = wandb_id is not None if uses_wandb and config.wandb_status == "resume": # Reload model checkpoint if needed to resume training