We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 456bde8 commit 7f4eebaCopy full SHA for 7f4eeba
torchx/specs/finder.py
@@ -287,7 +287,9 @@ def _get_path_to_function_decl(
287
my_component defined in some_file.py, imported in other_file.py
288
and the component is invoked as other_file.py:my_component
289
"""
290
- path_to_function_decl = inspect.getabsfile(function)
+ # Unwrap decorated functions to get the original function
291
+ unwrapped_function = inspect.unwrap(function)
292
+ path_to_function_decl = inspect.getabsfile(unwrapped_function)
293
if path_to_function_decl is None or not os.path.isfile(path_to_function_decl):
294
return self._filepath
295
return path_to_function_decl
0 commit comments