Skip to content

Commit

Permalink
Change _DictFetchMapper to not use __setitem__ on a Mapping, since th…
Browse files Browse the repository at this point in the history
…ese may be immutable.

PiperOrigin-RevId: 261735810
  • Loading branch information
tensorflower-gardener committed Aug 5, 2019
1 parent c4bdfed commit e917436
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tensorflow/python/client/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,9 @@ def unique_fetches(self):
return self._unique_fetches

def build_results(self, values):
results = self._fetch_type()
for k, m, vi in zip(self._keys, self._mappers, self._value_indices):
results[k] = m.build_results([values[j] for j in vi])
return results
return self._fetch_type(
(k, m.build_results([values[j] for j in vi]))
for k, m, vi in zip(self._keys, self._mappers, self._value_indices))


class _AttrsFetchMapper(_FetchMapper):
Expand Down

0 comments on commit e917436

Please sign in to comment.