MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST_F

Function TEST_F

tensorflow/cc/saved_model/loader_test.cc:103–115  ·  view source on GitHub ↗

Test for resource leaks related to TensorFlow session closing requirements when loading and unloading large numbers of SavedModelBundles. TODO(sukritiramesh): Increase run iterations and move outside of the test suite.

Source from the content-addressed store, hash-verified

101// TODO(sukritiramesh): Increase run iterations and move outside of the test
102// suite.
103TEST_F(LoaderTest, ResourceLeakTest) {
104 SavedModelBundle bundle;
105 SessionOptions session_options;
106 RunOptions run_options;
107
108 const string export_dir =
109 io::JoinPath(testing::TensorFlowSrcRoot(), kTestDataSharded);
110 for (int i = 0; i < 100; ++i) {
111 TF_ASSERT_OK(LoadSavedModel(session_options, run_options, export_dir,
112 {kSavedModelTagServe}, &bundle));
113 CheckSavedModelBundle(export_dir, bundle);
114 }
115}
116
117TEST_F(LoaderTest, TagMatch) {
118 SavedModelBundle bundle;

Callers

nothing calls this directly

Calls 6

MaybeSavedModelDirectoryFunction · 0.85
LoadSavedModelFunction · 0.70
JoinPathFunction · 0.50
TensorFlowSrcRootFunction · 0.50
StrContainsFunction · 0.50
okMethod · 0.45

Tested by

no test coverage detected