diff --git a/src/braket/jobs/hybrid_job.py b/src/braket/jobs/hybrid_job.py index cb4792a24..da0b8436a 100644 --- a/src/braket/jobs/hybrid_job.py +++ b/src/braket/jobs/hybrid_job.py @@ -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)