Skip to content

Commit

Permalink
fix scope of loading the registering the action based lib objects
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham3121 committed Apr 9, 2024
1 parent c6c5cca commit 049e1f0
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions packages/syft/src/syft/service/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,15 @@ def register_lib_obj(lib_obj: CMPBase) -> None:

LibConfigRegistry.register(lib_config)

# hacky, prevent circular imports
for lib_obj in action_execute_registry_libs.flatten():
# # for functions
# func_name = func.__name__
# # for classes
# func_name = path.split(".")[-1]
if isinstance(lib_obj, CMPFunction) or isinstance(lib_obj, CMPClass):
register_lib_obj(lib_obj)

# hacky, prevent circular imports
for lib_obj in action_execute_registry_libs.flatten():
# # for functions
# func_name = func.__name__
# # for classes
# func_name = path.split(".")[-1]
if isinstance(lib_obj, CMPFunction) or isinstance(lib_obj, CMPClass):
register_lib_obj(lib_obj)


def deconstruct_param(param: inspect.Parameter) -> dict[str, Any]:
Expand Down

0 comments on commit 049e1f0

Please sign in to comment.