6 #ifndef TURI_UNITY_SFRAME_BUILDER_HPP 7 #define TURI_UNITY_SFRAME_BUILDER_HPP 11 #include <core/storage/sframe_data/sframe.hpp> 12 #include <boost/circular_buffer.hpp> 13 #include <model_server/lib/api/unity_sframe_builder_interface.hpp> 15 typedef boost::circular_buffer<std::vector<turi::flexible_type>> row_history_t;
50 void init(
size_t num_segments,
54 std::string save_location);
69 void append(
const std::vector<flexible_type> &row,
size_t segment);
81 void append_multiple(
const std::vector<std::vector<flexible_type>> &rows,
97 std::vector<std::vector<flexible_type>>
read_history(
size_t num_elems,
103 std::shared_ptr<unity_sframe_base>
close();
111 bool m_inited =
false;
112 bool m_closed =
false;
114 std::vector<sframe::iterator> m_out_iters;
115 std::string m_sframe_index_file;
117 std::vector<std::shared_ptr<row_history_t>> m_history;
124 #endif // TURI_UNITY_SFRAME_BUILDER_HPP std::vector< flex_type_enum > column_types()
void append_multiple(const std::vector< std::vector< flexible_type >> &rows, size_t segment)
void append(const std::vector< flexible_type > &row, size_t segment)
void init(size_t num_segments, size_t history_size, std::vector< std::string > column_names, std::vector< flex_type_enum > column_types, std::string save_location)
std::vector< std::string > column_names()
std::vector< std::vector< flexible_type > > read_history(size_t num_elems, size_t segment)
std::shared_ptr< unity_sframe_base > close()