1 #ifndef __TC_ML_MODEL_WRAPPER_HPP_ 2 #define __TC_ML_MODEL_WRAPPER_HPP_ 6 #include <model_server/lib/extensions/model_base.hpp> 7 #include <model_server/lib/toolkit_class_macros.hpp> 18 class MLModelWrapper :
public model_base {
21 MLModelWrapper(std::shared_ptr<CoreML::Model> model) : m_model(
std::move(model)) {}
23 void save(
const std::string& path_to_save_file);
25 void add_metadata(
const std::map<std::string, flexible_type>& context_metadata);
27 std::shared_ptr<CoreML::Model> coreml_model()
const {
return m_model; }
30 std::shared_ptr<CoreML::Model> m_model;
#define BEGIN_CLASS_MEMBER_REGISTRATION(python_facing_classname)
#define REGISTER_CLASS_MEMBER_FUNCTION(function,...)
void add_metadata(CoreML::Specification::Model &model_spec, const std::map< std::string, flexible_type > &context)
#define END_CLASS_MEMBER_REGISTRATION