Skip to content

Commit

Permalink
feat: simplify entry point wrapper (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajberdy authored Nov 2, 2023
1 parent 4f4938e commit ef4c92f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/braket/jobs/hybrid_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):

def _serialize_entry_point(entry_point: Callable, args: tuple, kwargs: dict) -> str:
"""Create an entry point from a function"""

def wrapped_entry_point() -> Any:
"""Partial function wrapping entry point with given parameters"""
return entry_point(*args, **kwargs)
wrapped_entry_point = functools.partial(entry_point, *args, **kwargs)

try:
serialized = cloudpickle.dumps(wrapped_entry_point)
Expand Down

0 comments on commit ef4c92f

Please sign in to comment.