Skip to content

Commit

Permalink
Fix an issue when unpickling functions through the escape hatch (#1770)
Browse files Browse the repository at this point in the history
  • Loading branch information
romain-intel authored Mar 23, 2024
1 parent fbe4aa1 commit 57640fd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion metaflow/plugins/env_escape/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,13 @@ def name_to_parent_name(name):
raise RuntimeError("Local function unpickling without an object ID")
if obj_id not in self._proxied_standalone_functions:
self._proxied_standalone_functions[obj_id] = create_class(
self, "__function_%s" % obj_id, {}, {}, {}, {"__call__": ""}, []
self,
"__main__.__function_%s" % obj_id,
{},
{},
{},
{"__call__": ""},
[],
)
return self._proxied_standalone_functions[obj_id]
local_class = self._proxied_classes.get(lookup_name, None)
Expand Down

0 comments on commit 57640fd

Please sign in to comment.