Skip to content

Commit

Permalink
changes to func and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amandarichardsonn committed Oct 2, 2023
1 parent a20fa6a commit f46a4e7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/python/module/smartredis/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,8 @@ def run_script_multigpu(
self,
name: str,
fn_name: str,
inputs: str,
outputs: str,
inputs: t.Optional[t.Union[str, t.List[str]]],
outputs: t.Optional[t.Union[str, t.List[str]]],
offset: int,
first_gpu: int,
num_gpus: int,
Expand Down Expand Up @@ -533,8 +533,8 @@ def run_script_multigpu(
"""
typecheck(name, "name", str)
typecheck(fn_name, "fn_name", str)
typecheck(inputs, "inputs", str)
typecheck(outputs, "outputs", str)
# typecheck(inputs, "inputs", str)
# typecheck(outputs, "outputs", str)
typecheck(offset, "offset", int)
typecheck(first_gpu, "first_gpu", int)
typecheck(num_gpus, "num_gpus", int)
Expand Down
11 changes: 7 additions & 4 deletions tests/python/test_script_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,15 @@ def test_run_script_multi(use_cluster, context):
c = Client(None, use_cluster, logger_name=context)
c.put_tensor("srpt-multi-out-data-1", data)
c.put_tensor("srpt-multi-out-data-2", data_2)
c.set_function("two-to-one", two_to_one)
c.run_script(
c.set_function_multigpu("two-to-one", two_to_one, 0, 2)
c.run_script_multigpu(
"two-to-one",
"two_to_one",
"srpt-multi-out-data-1 srpt-multi-out-data-2", #here
"srpt-multi-out-output",
["srpt-multi-out-data-1", "srpt-multi-out-data-2"], #here
["srpt-multi-out-output"],
0,
0,
2
)
out = c.get_tensor("srpt-multi-out-output")
expected = np.array([4, 8])
Expand Down

0 comments on commit f46a4e7

Please sign in to comment.