Skip to content

Commit ba3da62

Browse files
authored
[Embedding] 'GetSnapshot()' interface backward compatibility. (#362)
1 parent c6b7fe4 commit ba3da62

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tensorflow/core/framework/embedding/embedding_var.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,11 @@ class EmbeddingVar : public ResourceBase {
210210

211211
int64 GetSnapshot(std::vector<K>* key_list, std::vector<V* >* value_list,
212212
std::vector<int64>* version_list, std::vector<int64>* freq_list,
213-
embedding::Iterator** it) {
213+
embedding::Iterator** it = nullptr) {
214+
// for Interface Compatible
215+
// TODO Multi-tiered Embedding should use iterator in 'GetSnapshot' caller
216+
embedding::Iterator* _it = nullptr;
217+
it = (it == nullptr) ? &_it : it;
214218
return storage_manager_->GetSnapshot(key_list, value_list, version_list,
215219
freq_list, emb_config_, filter_, it);
216220
}

0 commit comments

Comments
 (0)