Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create data/minicubes directory if it doesn't already exist #160

Merged
merged 5 commits into from
Feb 26, 2024

Conversation

weiji14
Copy link
Contributor

@weiji14 weiji14 commented Feb 22, 2024

Prevents an AssertionError on the partial-inputs jupyter notebook when the data/minicubes folder doesn't exist, by just creating the folder!

Patches #149

Prevents an AssertionError on the partial-inputs jupyter notebook.
@weiji14 weiji14 requested a review from yellowcap February 22, 2024 16:08
@weiji14 weiji14 self-assigned this Feb 22, 2024
@@ -204,7 +204,7 @@
"outputs": [],
"source": [
"outdir = Path(\"data/minicubes\")\n",
"assert outdir.exists()\n",
"outdir.mkdir(exist_ok=True)\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this need parents=True as well for folks that don't have the data directory yet?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Forgot that parents=False is the default at https://docs.python.org/3/library/pathlib.html#pathlib.Path.mkdir. I've added parents=True in commit 6921c5a, and made sure that the partial-inputs-flood-tutorial.ipynb notebook has that too.

Oh, and I've also fixed a small typo in the huggingface checkpoint URL in 08aa4fd 😉

Copy link
Member

@yellowcap yellowcap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks @weiji14

@weiji14 weiji14 enabled auto-merge (squash) February 26, 2024 00:01
@weiji14 weiji14 merged commit 22b3148 into main Feb 26, 2024
5 checks passed
@weiji14 weiji14 deleted the patch/create-minicube-dir branch February 26, 2024 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants