-
Notifications
You must be signed in to change notification settings - Fork 375
Raise error on nonexistent datasets #684
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
Raise error on nonexistent datasets #684
Conversation
lgtm, thanks @jaketae ! |
Thanks @jaketae! This would be a really nice thing to add. The challenge is that a templates.yaml might not exist for two reasons:
So with the current PR, if you go to prompt a new dataset, it also raises the exception. Not sure how best to fix. One option is to have the Any ideas? |
ah, that's a very good point @stephenbach here's what I suggest: instead of an error, we raise a warning, something like "You are instantiating DatasetTemplates for XX, but XX doesn't have any prompts yet. Please ignore if you are creating new prompts for this dataset." |
@VictorSanh @stephenbach Thank you for pointing out the edge case and the proposal! I'll implement your suggestion and keep you posted. |
Did you get a chance to look at this @jaketae ? will pin v0.2 very soon... |
Hey @VictorSanh, apologies for the delay. I replaced the |
Fixes #680 by adding a
raise
statement after the directory check.Using the same examples from the original issue thread:
cc @arnaudstiegler @stephenbach @VictorSanh