baml
baml copied to clipboard
Segmentation fault when using multiprocessing
Example:
from multiprocessing import Process
from baml_client import b
def run():
b.ExtractResume("test")
if __name__ == "__main__":
current = Process(target=run)
current.start()
current.join()
This exits with a seg fault.
lazy import works though
from multiprocessing import Process
def run():
from baml_client import b
b.ExtractResume("test")
if __name__ == "__main__":
current = Process(target=run)
current.start()
current.join()
I can reproduce this with 0.82.0 on the following platforms:
- python:3.12 arm64 docker image
- python:3.10 arm64 docker image
- python:3.12 amd64 docker image
- amazon linux 2023 with python 3.9
Seems to be working without any issues on my M2 mac though (python 3.10).
If you would like me to solve this issue, either tag me in a comment or check this box:
- [ ] Solve Issue
You can disable automatic comments on my settings page
Has this issue been resolved? I'm encountering the same error.
- baml 0.89.0
- python:3.12 amd64 docker image
follow this for the resolution: https://github.com/BoundaryML/baml/issues/1821 We are looking into it now
#1990 fixes this