Skip to content

Commit

Permalink
[Core] Fix a Typo in dict_to_state function parameter name (ray-proje…
Browse files Browse the repository at this point in the history
…ct#47822)

Signed-off-by: Mengjin Yan <mengjinyan3@gmail.com>
Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
  • Loading branch information
MengjinYan authored and ujjawal-khare committed Oct 15, 2024
1 parent aa4bb87 commit 38f9fe1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/ray/util/state/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,8 @@ def remove_ansi_escape_codes(text: str) -> str:
return re.sub(r"\x1b[^m]*m", "", text)


def dict_to_state(d: Dict, state_source: StateResource) -> StateSchema:
def dict_to_state(d: Dict, state_resource: StateResource) -> StateSchema:

"""Convert a dict to a state schema.
Args:
Expand All @@ -1678,6 +1679,7 @@ def dict_to_state(d: Dict, state_source: StateResource) -> StateSchema:
A state schema.
"""
try:
return resource_to_schema(state_source)(**d)
return resource_to_schema(state_resource)(**d)

except Exception as e:
raise RayStateApiException(f"Failed to convert {d} to StateSchema: {e}") from e

0 comments on commit 38f9fe1

Please sign in to comment.