Commit d5fc41a8 authored by Yong Tang's avatar Yong Tang Committed by Andrew Harp
Browse files

Fix `TypeError: 'dict_keys'` in contrib.distribute with python 3 (#18212)



This fix tries to fix the issue raised in 18205 where
```
TypeError: 'dict_keys' object does not support indexing
```
was thrown when using contrib.distribute in python 3.

The issue is that DistributedValues.devices returned `self._index.keys()`
which is a `dict_keys` and is not a list in python 3.

This fix converts the `dict_keys` to list for python 3
to fix the issue.

This fix fixes 18205.
This fix als fixes 18188.

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>
parent ffe24e65
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment