-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #332 from ZmeiGorynych/ray
Add support for Ray in running trials, fix Pandas warning
- Loading branch information
Showing
10 changed files
with
456 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
def remote_exec(function, args, use_ray=False): | ||
if use_ray: | ||
import ray | ||
|
||
remote_function = ray.remote(function) | ||
return ray.get(remote_function.remote(*args)) | ||
else: | ||
from joblib import Parallel, delayed | ||
|
||
return Parallel(n_jobs=2, backend="threading")(delayed(function)(*args) for i in range(1))[ | ||
0 | ||
] |
Oops, something went wrong.