Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-milea committed Feb 8, 2024
1 parent 47bfb1e commit 77a8f48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/syft/src/syft/service/code/user_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,9 +1060,9 @@ def locate_launch_jobs(context: TransformContext) -> TransformContext:
raise Exception(user_code.message)
# TODO: Not great
print(user_code)
user_code_link = LinkedObject.from_obj(user_code[0], node_uid=context.node.id)
user_code_link = LinkedObject.from_obj(user_code[-1], node_uid=context.node.id)

nested_codes[call] = (user_code_link, user_code[0].nested_codes)
nested_codes[call] = (user_code_link, user_code[-1].nested_codes)
context.output["nested_codes"] = nested_codes
return context

Expand Down
2 changes: 1 addition & 1 deletion packages/syft/tests/syft/users/user_code_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def test_nested_requests(worker, guest_client: User):

root_domain_client = worker.root_client
request = root_domain_client.requests[-1]
assert request.code.nested_requests == {"test_inner_func": "latest"}

root_domain_client.api.services.request.apply(request.id)
request = root_domain_client.requests[-1]

Expand Down

0 comments on commit 77a8f48

Please sign in to comment.