Revert "fix: correct dictionary unpacking in recursively_apply function (#3766)" (#3787)

This reverts commit 3db9fb6991a296d0535e97d765f53da6b7246ff3.
This commit is contained in:
Marc Sun
2025-09-19 12:50:53 +02:00
committed by GitHub
parent 6997855ace
commit a737437c8a

View File

@ -116,7 +116,7 @@ def recursively_apply(func, data, *args, test_type=is_torch_tensor, error_on_oth
) )
elif isinstance(data, Mapping): elif isinstance(data, Mapping):
return type(data)( return type(data)(
**{ {
k: recursively_apply( k: recursively_apply(
func, v, *args, test_type=test_type, error_on_other_type=error_on_other_type, **kwargs func, v, *args, test_type=test_type, error_on_other_type=error_on_other_type, **kwargs
) )