bespokelabsai / curator

Apache License 2.0
14 stars 1 forks source link

Check batch file size before upload #111

Open RyanMarten opened 3 hours ago

RyanMarten commented 3 hours ago

openai.BadRequestError: Error code: 400 - {'error': {'message': 'File is too large.', 'type': 'invalid_request_error', 'param': None, 'code': None}}

We fixed the max requests (50,000) The other constraint is 200 MB in size

Reference: https://platform.openai.com/docs/guides/batch/overview https://platform.openai.com/docs/api-reference/batch/create

RyanMarten commented 3 hours ago

NOTE: This should be less of an issue now that the default batch size is 1,000

However this limit can be exceeded if users send really large prompts and increase the batch size manually.

I ran into this error since the cache had old requests.jsonl that violated the 50,000 request constraint that were > 200 MB. Had to clear the cache, which should resolve, but marking this issue as I see it.