Skip to content

Commit

Permalink
fix: fix cuda initialization error in experiment grid (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaiejj authored Apr 9, 2024
1 parent efe7d9c commit 63bdd34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion omnisafe/common/experiment_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from __future__ import annotations

import json
import multiprocessing as mp
import os
import string
from concurrent.futures import ProcessPoolExecutor as Pool
Expand Down Expand Up @@ -440,7 +441,7 @@ def run(
announcement = f'\n{joined_var_names}\n\n{line}'
print(announcement)

pool = Pool(max_workers=num_pool)
pool = Pool(max_workers=num_pool, mp_context=mp.get_context('spawn'))
# run the variants.
results = []
exp_names = []
Expand Down

0 comments on commit 63bdd34

Please sign in to comment.