Skip to content

Commit

Permalink
Convert Dict to Mapping in input argument
Browse files Browse the repository at this point in the history
  • Loading branch information
taufeeque9 committed Aug 7, 2023
1 parent f8251c7 commit 664fc37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/imitation/scripts/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def _ray_tune_sacred_wrapper(
`ex.run`) and `reporter`. The function returns the run result.
"""

def inner(config: Dict[str, Any], reporter) -> Mapping[str, Any]:
def inner(config: Mapping[str, Any], reporter) -> Mapping[str, Any]:
"""Trainable function with the correct signature for `ray.tune`.
Args:
Expand All @@ -212,7 +212,7 @@ def inner(config: Dict[str, Any], reporter) -> Mapping[str, Any]:
# TODO(shwang): Stop modifying CAPTURE_MODE once the issue is fixed.
sacred.SETTINGS.CAPTURE_MODE = "sys"

run_kwargs = config
run_kwargs = dict(**config)
updated_run_kwargs: Dict[str, Any] = {}
# Import inside function rather than in module because Sacred experiments
# are not picklable, and Ray requires this function to be picklable.
Expand Down

0 comments on commit 664fc37

Please sign in to comment.