New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Support multiple function arguments in couler.map() #215
Conversation
3c35100
to
afb1149
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am converting this to draft since there seems to be many debug statements and unnecessary code. Please ping me when ready for review.
Hi, Thanks for the feedback. @terrytangyuan May I ask what do you mean by debugging statements? Do you mean the comments in the code? Other than those there shouldn't be any debugging. Thanks in advance for your answer.
|
Hi @terrytangyuan ,
|
I changed it to WIP.
|
e5c9c1b
to
eea73eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now the code works only with with_items
, but in a PR I will submit soon we'll be able to use with_param
and parallelism
, and I can see it's going to be easy to make map
work with both additions. Nicely done!
Hi @moshewe!
|
Improved comments and naming in loop.py Clean up part 2. Testing Clean up. Update map_test.py deleted debuging. Delete integration_tests.Unix.sh sanity check Map() fix and test map() that accepts several arguments (*arg) whit test for it.) map() arguments modifications and a test function in the works. Create integration_tests.Unix.sh
What changes were proposed in this pull request?
Added changes to accept multiple function arguments in couler.map()
#169 continuing the fix adding the test function for the modifications.
Had to start again from scratch.
Reason:
The previous idea just pretty much loops the arguments in the
map()
.return map(map(function, input_list), *other)
But the return value is a
Step Class
not a function so the firstmap()
will succeed but not the second one or the third... because themap()
checks the function first.inner_step = Step(name=inner_dict["id"], template=template_name)
return inner_step
#32 issue
Why are the changes needed?
#32 issue
Does this PR introduce any user-facing change?
No.
How was this patch tested?
A test was created for it. similar to the one-argument test.
Test