Closed miguelgondu closed 4 months ago
Now all the black boxes that have an isolated function inside them have the following block in their __init__:
__init__
# e.g. dockstring if not force_isolation: try: from poli.objective_repository.dockstring.isolated_function import ( IsolatedDockstringFunction, ) self.inner_function = IsolatedDockstringFunction( target_name=target_name, string_representation=string_representation, ) except ImportError: self.inner_function = instance_function_as_isolated_process( name="dockstring__isolated", target_name=target_name, string_representation=string_representation, ) else: self.inner_function = instance_function_as_isolated_process( name="dockstring__isolated", target_name=target_name, string_representation=string_representation, )
Do we have a way of abstracting this process?
Now all the black boxes that have an isolated function inside them have the following block in their
__init__
:Do we have a way of abstracting this process?