-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update documentation using model.h of bazel #149
Comments
I think you can patch the YDF standalone example at https://github.com/google/yggdrasil-decision-forests/tree/main/examples/standalone and replace the Bazel file with
In This will compile the library to run the model (I tested it quickly with Bazel 5.3.0 and the compile options in our .bazelrc, so roughly
Of course, this will only compile a library, you'll still need to implement a main() to actually call this library |
O.K. thanks I was now able to build it and my main.cpp looks like this:
The problem now is, that running the ./main results in this error:
Which changes to
When renaming the header.pb -> saved_model.pb file in the tf_model directory so I guess the code is searching for a file that is not included in the exported model? I am saving the model from python with:
|
I would like to run a trained random forest using c++ and I was following the documentation: https://ydf.readthedocs.io/en/stable/tutorial/cpp/#generate-the-c-code
The “simple” example just mentions that one would have to add some dependencies to bazel, but no mansion on where these dependencies come from. I was not able to get this example up and running because I couldn’t get the dependencies to line up so I and probably others could benefit from an updated documentation, with maybe a fully contained bazel file.
The text was updated successfully, but these errors were encountered: