Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions from_mwt_ds/DataScience/vw_executor/vw.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,11 @@ def __init__(self):
super().__init__(None)

def run(self, args: str, filename=None) -> Iterable[str]:
from multiprocessing import Pool
with Pool(1) as p:
# Use spawn context to avoid fork issues with pybind11
# Each VW call runs in its own subprocess for isolation
import multiprocessing
ctx = multiprocessing.get_context('spawn')
with ctx.Pool(1) as p:
return p.apply(_run_pyvw, [args], {"filename": filename})

def symlink(source:Path, link_name:Path):
Expand Down
Loading