1 /* Copyright 2017 The TensorFlow Authors. All Rights Reserved. 2 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14 ==============================================================================*/ 15 #ifndef TENSORFLOW_CORE_SUMMARY_SUMMARY_DB_WRITER_H_ 16 #define TENSORFLOW_CORE_SUMMARY_SUMMARY_DB_WRITER_H_ 17 18 #include "tensorflow/core/kernels/summary_interface.h" 19 #include "tensorflow/core/lib/core/status.h" 20 #include "tensorflow/core/lib/db/sqlite.h" 21 #include "tensorflow/core/platform/env.h" 22 23 namespace tensorflow { 24 25 /// \brief Creates SQLite SummaryWriterInterface. 26 /// 27 /// This can be used to write tensors from the execution graph directly 28 /// to a database. The schema must be created beforehand. Entries in 29 /// Users, Experiments, and Runs tables will be created automatically 30 /// if they don't already exist. 31 /// 32 /// Please note that the type signature of this function may change in 33 /// the future if support for other DBs is added to core. 34 /// 35 /// The result holds a new reference to db. 36 Status CreateSummaryDbWriter(Sqlite* db, const string& experiment_name, 37 const string& run_name, const string& user_name, 38 Env* env, SummaryWriterInterface** result); 39 40 } // namespace tensorflow 41 42 #endif // TENSORFLOW_CORE_SUMMARY_SUMMARY_DB_WRITER_H_ 43