Skip to content

Commit

Permalink
ray remote resources as plain dict (#1737)
Browse files Browse the repository at this point in the history
  • Loading branch information
igorgad committed Aug 24, 2021
1 parent e3ba7cc commit b16baa7
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from hydra.core.singleton import Singleton
from hydra.core.utils import JobReturn, run_job, setup_globals
from hydra.types import HydraContext, TaskFunction
from omegaconf import DictConfig
from omegaconf import DictConfig, OmegaConf

# mypy complains about "unused type: ignore comment" on macos
# workaround adapted from: https://github.com/twisted/twisted/pull/1416
Expand Down Expand Up @@ -64,7 +64,9 @@ def launch_job_on_ray(
singleton_state: Any,
) -> Any:
if ray_remote:
run_job_ray = ray.remote(**ray_remote)(_run_job)
run_job_ray = ray.remote(**OmegaConf.to_container(ray_remote, resolve=True))(
_run_job
)
else:
run_job_ray = ray.remote(_run_job)

Expand Down

0 comments on commit b16baa7

Please sign in to comment.