mirror of
https://github.com/huggingface/accelerate.git
synced 2025-10-20 18:13:46 +08:00
fix: correct dictionary unpacking in recursively_apply function (#3766)
This commit is contained in:
committed by
GitHub
parent
fe795fd324
commit
3db9fb6991
@ -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
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user