27 int32_t model_version = 1;
29 ::circlechef::ModelRecipe model_recipe;
33 google::protobuf::io::IstreamInputStream iis{&is};
34 if (!google::protobuf::TextFormat::Parse(&iis, &model_recipe))
36 std::cerr <<
"ERROR: Failed to parse recipe" << std::endl;
40 if (model_recipe.has_version())
42 model_version = model_recipe.version();
46 if (model_version > 1)
48 std::cerr <<
"ERROR: Unsupported recipe version: " << model_version << std::endl;
55 std::cout.write(generated_model.base(), generated_model.size());