Skip to content

Commit

Permalink
Create data/minicubes directory if it doesn't already exist (#160)
Browse files Browse the repository at this point in the history
* 🐛 Create data/minicubes directory if it doesn't already exist

Prevents an AssertionError on the partial-inputs jupyter notebook.

* Set parents=True in mkdir method call

Ensure that the data/ folder is also created if it doesn't already exist.

* Fix typo on url to model checkpoint on HuggingFace
  • Loading branch information
weiji14 authored Feb 26, 2024
1 parent 4343c1f commit 22b3148
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/partial-inputs-flood-tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
"outputs": [],
"source": [
"outdir = Path(\"data/minicubes\")\n",
"assert outdir.exists()\n",
"outdir.mkdir(exist_ok=True, parents=True)\n",
"\n",
"# Write tile to output dir\n",
"for tile in stack:\n",
Expand Down Expand Up @@ -303,8 +303,8 @@
"metadata": {},
"outputs": [],
"source": [
"DATA_DIR = \"/home/ubuntu/data/minicubes\"\n",
"CKPT_PATH = \"https://huggingface.co/made-with-clay/Clay1/resolve/main/Clay_v0.1_epoch-24_val-loss-0.46.ckpt\"\n",
"DATA_DIR = \"data/minicubes\"\n",
"CKPT_PATH = \"https://huggingface.co/made-with-clay/Clay/resolve/main/Clay_v0.1_epoch-24_val-loss-0.46.ckpt\"\n",
"\n",
"# Load model\n",
"multi_model = CLAYModule.load_from_checkpoint(\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/partial-inputs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
"outputs": [],
"source": [
"outdir = Path(\"data/minicubes\")\n",
"assert outdir.exists()\n",
"outdir.mkdir(exist_ok=True, parents=True)\n",
"\n",
"# Write tile to output dir\n",
"for tile in stack:\n",
Expand Down Expand Up @@ -265,7 +265,7 @@
],
"source": [
"DATA_DIR = \"data/minicubes\"\n",
"CKPT_PATH = \"https://huggingface.co/made-with-clay/Clay1/resolve/main/Clay_v0.1_epoch-24_val-loss-0.46.ckpt\"\n",
"CKPT_PATH = \"https://huggingface.co/made-with-clay/Clay/resolve/main/Clay_v0.1_epoch-24_val-loss-0.46.ckpt\"\n",
"\n",
"# Load model\n",
"rgb_model = CLAYModule.load_from_checkpoint(\n",
Expand Down

0 comments on commit 22b3148

Please sign in to comment.