forked from pytorch/torchrec
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
positional and kwargs corner case fix in for _build_args_kwargs (pyto…
…rch#2714) Summary: ## Context: Setting None in positional args is colliding with the kwargs in situations when kwargs contains the argument name accepted by the method. Eg : ``` def input_dist(ctx, id_feature_list): ... // If _build_args_kwargs returns: args = [None] kwargs = {'id_feature_list': KJT} input_dist(ctx, *args, **kwargs) // extends to input_dist(ctx, None, id_feature_list=KJT) ``` which results in "TypeError: got multiple values for argument 'id_feature_list'" because id_feature_list is provided both positionally (None) and via kwargs. Reviewed By: sarckk Differential Revision: D68892351
- Loading branch information
1 parent
96abf2a
commit b90ac7e
Showing
2 changed files
with
91 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters