Probably related to #140
Description
The number of workers are 1
objc[18920]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[18920]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
Expected Behavior
This was giving an error when I was initializing a GPT 3 object.
Possible fix:
with multiprocessing.get_context("spawn").Pool() as pool:
pool.map(annotate,img_urls)
[Optional] Additional Context
Sample Code
@app.get("/")
async def h(requests):
engines = openai.Engine.list()
# print the first engine's id
print(engines.data[0].id)
# create a completion
completion = openai.Completion.create(engine="ada", prompt="Hello world")
# print the completion
print(completion.choices[0].text)
openai.Completion.create(
engine="davinci",
prompt="Make a list of astronomical observatories:"
)
return "Hello, world!"
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too