From ef4c92f373cbb7530d086cca39f683f3f1d77a45 Mon Sep 17 00:00:00 2001 From: Aaron Berdy Date: Thu, 2 Nov 2023 13:10:31 -0700 Subject: [PATCH] feat: simplify entry point wrapper (#781) --- src/braket/jobs/hybrid_job.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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)