Closed aphedges closed 1 year ago
I have fixed the conflicts created after #30 was merged.
This is a good idea. Currently if the task settings are incorrect, the ScienceWorld will return an error message. But, if no one is attending to that error message (say from it being exclusively piped into an agent), then a user may have configuration errors and may not have coded in error checking into their agent to know that they're running in an invalid configuration. Throwing an exception Python-side is a good way of handling this.
Thanks for the fix. FYI I've been working on adding more checks Python side. See upcoming changes in my branch https://github.com/allenai/ScienceWorld/blob/enh_gymnasium/scienceworld/scienceworld.py#L66-L90
I'll merge this fix for now, as I don't know when the other checks will get in.
Before this commit, passing in an invalid task name to
load()
, e.g., due to a typo, would fail silently but can display a cryptic error message when making another method call. It is better to fail early with a clear error message to make the user's life easier.