sotopia-lab / sotopia

Sotopia: an Open-ended Social Learning Environment (ICLR 2024 spotlight)
https://docs.sotopia.world
MIT License
127 stars 16 forks source link

[FEAT]: Improved error msg #62

Open XuhuiZhou opened 2 months ago

XuhuiZhou commented 2 months ago

Description

We currently have no error msg when https://github.com/sotopia-lab/sotopia/blob/c3436baf5fc8d7cfe9e72db76fe9a7ba06c06a05/sotopia/generation_utils/generate.py#L706

fails.

I suggest we get rid of the try, except behavior

Additional Information

No response

ProKil commented 1 month ago

Then how should we handle the exception? Can you propose a taxonomy of different kinds of exceptions?

XuhuiZhou commented 1 month ago

https://github.com/sotopia-lab/sotopia/blob/c3436baf5fc8d7cfe9e72db76fe9a7ba06c06a05/sotopia/generation_utils/generate.py#L448

I think we should really focus on this function instead and give error msg for each step if it fails

ProKil commented 1 month ago

Yeah, so what are the possible errors and how we should deal with each of them?

ProKil commented 1 month ago

For examples, we should deal with parsing errors (not outputting correct schema) and API errors (rate limit, end point not available) differently.