Update kMaxListSummarySize to 50
PiperOrigin-RevId: 322601670 Change-Id: I30335a012b66366afc17dceeb19253f17bc666b8
This commit is contained in:
parent
177790aafc
commit
f97ced1b20
tensorflow/core/framework
@ -278,7 +278,7 @@ string SummarizeAttrValue(const AttrValue& attr_value) {
|
||||
pieces.push_back(SummarizeFunc(attr_value.list().func(i)));
|
||||
}
|
||||
}
|
||||
constexpr int kMaxListSummarySize = 15;
|
||||
constexpr int kMaxListSummarySize = 50;
|
||||
if (pieces.size() >= kMaxListSummarySize) {
|
||||
pieces.erase(pieces.begin() + 5, pieces.begin() + (pieces.size() - 6));
|
||||
pieces[5] = "...";
|
||||
|
@ -160,12 +160,12 @@ TEST(AttrValueUtil, SummarizeAttrValueDoesNotElideShortLists) {
|
||||
}
|
||||
|
||||
TEST(AttrValueUtil, SummarizeAttrValueElidesLongLists) {
|
||||
std::vector<int> alist(30);
|
||||
std::vector<int> alist(60);
|
||||
std::iota(alist.begin(), alist.end(), 0);
|
||||
|
||||
AttrValue attr_value;
|
||||
SetAttrValue(alist, &attr_value);
|
||||
EXPECT_EQ("[0, 1, 2, 3, 4, ..., 25, 26, 27, 28, 29]",
|
||||
EXPECT_EQ("[0, 1, 2, 3, 4, ..., 55, 56, 57, 58, 59]",
|
||||
SummarizeAttrValue(attr_value));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user