tensorflow-serving-arm
tensorflow-serving-arm copied to clipboard
Adding Decision Forests Op
Hi- thank you so much for this repo- it has been a lifesaver so far.
I am trying to follow these instructions whilst still compiling for arm, but running into some trouble.
I added the needed lines to a new workspace file inf the tensorflow_model_server folder and added the SUPPORTED_TENSORFLOW_OPS
to the BUILD file in that folder. It compiled ok and I got a docker image out of it, but the added ops aren't present.
Any help would be much appreciated.
Oh, one last thing- is there a command to compile an image for all architectures, or do you have to manually combine them all at the end?
Thanks for the note of appreciation!
Additional tensorflow ops for tensorflow-serving-arm is something I have not yet considered, so it's very possible it's just not supported in this project yet. I'll have a look over those instructions and with a little luck hopefully it will be straight forward to implement support here.
As for the images, if I am building all arches (which I don't do too often), I tend to just run something like:
bazel run //tensorflow_model_server:project_image --config=release --config=linux_amd64_avx_sse4.2 && \
bazel run //tensorflow_model_server:project_image_debug --config=release --config=linux_amd64_avx_sse4.2 && \
bazel run //tensorflow_model_server:project_image --config=release --config=linux_arm64_armv8-a && \
bazel run //tensorflow_model_server:project_image_debug --config=release --config=linux_arm64_armv8-a && \
bazel run //tensorflow_model_server:project_image --config=release --config=linux_arm64_armv8.2-a && \
bazel run //tensorflow_model_server:project_image_debug --config=release --config=linux_arm64_armv8.2-a && \
bazel run //tensorflow_model_server:project_image --config=release --config=linux_arm_armv7-a_neon_vfpv4 && \
bazel run //tensorflow_model_server:project_image_debug --config=release --config=linux_arm_armv7-a_neon_vfpv4 && \
bazel run //tensorflow_model_server:project_image --config=release --config=linux_arm_armv7-a_neon_vfpv3 && \
bazel run //tensorflow_model_server:project_image_debug --config=release --config=linux_arm_armv7-a_neon_vfpv3
publishing (multi-arch manifest creation) is scripted in:
tensorflow_model_server/tools/ci/publish.sh
ok, one thing to try before digging deeper:
follow all proposed instructions except for this modification:
instead of changing tensorflow_model_server/BUILD
as the instructions suggest, can you try incorporating the target label into deps
for the main_lib
target?
tensorflow_model_server/BUILD
...
cc_library(
name = "main_lib",
srcs = [
"main.cc",
],
linkstamp = "stamp.cc",
deps = [
"@org_tensorflow//tensorflow/c:c_api",
"@org_tensorflow//tensorflow/compiler/jit:xla_cpu_jit",
"@org_tensorflow//tensorflow/core:lib",
"@org_tensorflow//tensorflow/core/platform/cloud:gcs_file_system",
"@org_tensorflow//tensorflow/core/platform/hadoop:hadoop_file_system",
"@org_tensorflow//tensorflow/core/platform/s3:s3_file_system",
"@tf_serving//tensorflow_serving/model_servers:server_lib",
"@org_tensorflow_decision_forests//tensorflow_decision_forests/tensorflow/ops/inference:kernel_and_op",
],
)
...
Thank you for the reply
So far I've been trying to do it with a couple of patches which doesn't seem to be working.
I'll give your method a go next- I just don't know where to add the SUPPORTED_TENSORFLOW_OPS
part and how to add the extra compile args (use_tensorflow_io
for example).
Ok, you were spot on- adding that into that build file cause the df stuff to be build, but it seems to error:
In file included from external/ydf/yggdrasil_decision_forests/dataset/data_spec.h:35:
external/ydf/yggdrasil_decision_forests/utils/compatibility.h:120:18: error: no matching constructor for initialization of 'std::__1::vector<yggdrasil_decision_forests::model::proto::VariableImportance, std::__1::allocator<yggdrasil_decision_forests::model::proto::VariableImportance>>'
new (&data_) T(std::move(data));
^ ~~~~~~~~~~~~~~~
This is what I have so far. I am then trying to compile it with:
bazel run //tensorflow_model_server:project_image --define use_tensorflow_io=1 --define no_absl_statusor=1 --config=linux_amd64_avx_sse4.2
My suspicion is that the use_tensorflow_io
and no_absl_statusor
from here aren't being passed through.
Appologies for documenting this here and I don't expect this repo to support this in the end, but more than willing to add any findings to a readme in the end.
can you post the compile command that generates the above error?
This one?
ERROR: /root/.cache/bazel/_bazel_root/933c2f549343e099e3a6911b282cb71c/external/ydf/yggdrasil_decision_forests/model/random_forest/BUILD:11:15: Compiling yggdrasil_decision_forests/model/random_forest/random_forest.cc failed: (Exit 1): clang failed: error executing command
(cd /root/.cache/bazel/_bazel_root/933c2f549343e099e3a6911b282cb71c/execroot/com_github_emacski_tensorflowservingarm && \
exec env - \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
PWD=/proc/self/cwd \
/usr/lib/llvm-11/bin/clang '--target=x86_64-unknown-linux-gnu' -nostdinc -U_FORTIFY_SOURCE -fstack-protector -fno-omit-frame-pointer -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -idirafter /usr/include/c++/v1 -idirafter /usr/lib/clang/11.0.1/include -idirafter /usr/include/x86_64-linux-gnu -idirafter /usr/include -idirafter /usr/include -idirafter /usr/include/linux -idirafter /usr/include/asm -idirafter /usr/include/asm-generic -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections '-std=c++17' -nostdinc++ -MD -MF bazel-out/k8-opt/bin/external/ydf/yggdrasil_decision_forests/model/random_forest/_objs/random_forest/random_forest.d -DYGG_CONCURRENCY_USES_DEFAULT -DYGG_ABSL_NO_STATUSOR -DTF_USE_SNAPPY -DEIGEN_MPL2_ONLY '-DEIGEN_MAX_ALIGN_BYTES=64' -DHAVE_SYS_UIO_H -DYGG_FILESYSTEM_USES_DEFAULT -DYGG_FILESYSTEM_USES_TENSORFLOW -iquote external/ydf -iquote bazel-out/k8-opt/bin/external/ydf -iquote external/com_google_protobuf -iquote bazel-out/k8-opt/bin/external/com_google_protobuf -iquote external/zlib -iquote bazel-out/k8-opt/bin/external/zlib -iquote external/com_google_absl -iquote bazel-out/k8-opt/bin/external/com_google_absl -iquote external/farmhash_archive -iquote bazel-out/k8-opt/bin/external/farmhash_archive -iquote external/org_tensorflow -iquote bazel-out/k8-opt/bin/external/org_tensorflow -iquote external/org_boost -iquote bazel-out/k8-opt/bin/external/org_boost -iquote external/eigen_archive -iquote bazel-out/k8-opt/bin/external/eigen_archive -iquote external/nsync -iquote bazel-out/k8-opt/bin/external/nsync -iquote external/double_conversion -iquote bazel-out/k8-opt/bin/external/double_conversion -iquote external/gif -iquote bazel-out/k8-opt/bin/external/gif -iquote external/libjpeg_turbo -iquote bazel-out/k8-opt/bin/external/libjpeg_turbo -iquote external/com_googlesource_code_re2 -iquote bazel-out/k8-opt/bin/external/com_googlesource_code_re2 -iquote external/fft2d -iquote bazel-out/k8-opt/bin/external/fft2d -iquote external/highwayhash -iquote bazel-out/k8-opt/bin/external/highwayhash -iquote external/snappy -iquote bazel-out/k8-opt/bin/external/snappy -isystem external/com_google_protobuf/src -isystem bazel-out/k8-opt/bin/external/com_google_protobuf/src -isystem external/zlib/zlib/include -isystem bazel-out/k8-opt/bin/external/zlib/zlib/include -isystem external/farmhash_archive/src -isystem bazel-out/k8-opt/bin/external/farmhash_archive/src -isystem external/org_boost/libs/accumulators/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/accumulators/include -isystem external/org_boost/libs/algorithm/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/algorithm/include -isystem external/org_boost/libs/align/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/align/include -isystem external/org_boost/libs/any/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/any/include -isystem external/org_boost/libs/array/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/array/include -isystem external/org_boost/libs/asio/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/asio/include -isystem external/org_boost/libs/assert/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/assert/include -isystem external/org_boost/libs/assign/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/assign/include -isystem external/org_boost/libs/atomic/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/atomic/include -isystem external/org_boost/libs/beast/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/beast/include -isystem external/org_boost/libs/bimap/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/bimap/include -isystem external/org_boost/libs/bind/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/bind/include -isystem external/org_boost/libs/callable_traits/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/callable_traits/include -isystem external/org_boost/libs/chrono/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/chrono/include -isystem external/org_boost/libs/circular_buffer/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/circular_buffer/include -isystem external/org_boost/libs/compatibility/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/compatibility/include -isystem external/org_boost/libs/compute/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/compute/include -isystem external/org_boost/libs/concept_check/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/concept_check/include -isystem external/org_boost/libs/config/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/config/include -isystem external/org_boost/libs/container/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/container/include -isystem external/org_boost/libs/container_hash/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/container_hash/include -isystem external/org_boost/libs/context/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/context/include -isystem external/org_boost/libs/contract/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/contract/include -isystem external/org_boost/libs/conversion/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/conversion/include -isystem external/org_boost/libs/convert/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/convert/include -isystem external/org_boost/libs/core/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/core/include -isystem external/org_boost/libs/coroutine/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/coroutine/include -isystem external/org_boost/libs/coroutine2/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/coroutine2/include -isystem external/org_boost/libs/crc/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/crc/include -isystem external/org_boost/libs/date_time/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/date_time/include -isystem external/org_boost/libs/detail/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/detail/include -isystem external/org_boost/libs/dll/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/dll/include -isystem external/org_boost/libs/dynamic_bitset/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/dynamic_bitset/include -isystem external/org_boost/libs/endian/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/endian/include -isystem external/org_boost/libs/exception/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/exception/include -isystem external/org_boost/libs/fiber/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/fiber/include -isystem external/org_boost/libs/filesystem/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/filesystem/include -isystem external/org_boost/libs/flyweight/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/flyweight/include -isystem external/org_boost/libs/foreach/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/foreach/include -isystem external/org_boost/libs/format/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/format/include -isystem external/org_boost/libs/function/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/function/include -isystem external/org_boost/libs/function_types/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/function_types/include -isystem external/org_boost/libs/functional/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/functional/include -isystem external/org_boost/libs/fusion/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/fusion/include -isystem external/org_boost/libs/geometry/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/geometry/include -isystem external/org_boost/libs/gil/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/gil/include -isystem external/org_boost/libs/graph/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/graph/include -isystem external/org_boost/libs/graph_parallel/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/graph_parallel/include -isystem external/org_boost/libs/hana/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/hana/include -isystem external/org_boost/libs/heap/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/heap/include -isystem external/org_boost/libs/histogram/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/histogram/include -isystem external/org_boost/libs/hof/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/hof/include -isystem external/org_boost/libs/icl/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/icl/include -isystem external/org_boost/libs/integer/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/integer/include -isystem external/org_boost/libs/interprocess/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/interprocess/include -isystem external/org_boost/libs/intrusive/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/intrusive/include -isystem external/org_boost/libs/io/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/io/include -isystem external/org_boost/libs/iostreams/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/iostreams/include -isystem external/org_boost/libs/iterator/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/iterator/include -isystem external/org_boost/libs/json/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/json/include -isystem external/org_boost/libs/lambda/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/lambda/include -isystem external/org_boost/libs/leaf/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/leaf/include -isystem external/org_boost/libs/lexical_cast/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/lexical_cast/include -isystem external/org_boost/libs/local_function/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/local_function/include -isystem external/org_boost/libs/locale/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/locale/include -isystem external/org_boost/libs/lockfree/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/lockfree/include -isystem external/org_boost/libs/log/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/log/include -isystem external/org_boost/libs/logic/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/logic/include -isystem external/org_boost/libs/math/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/math/include -isystem external/org_boost/libs/metaparse/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/metaparse/include -isystem external/org_boost/libs/move/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/move/include -isystem external/org_boost/libs/mp11/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/mp11/include -isystem external/org_boost/libs/mpi/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/mpi/include -isystem external/org_boost/libs/mpl/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/mpl/include -isystem external/org_boost/libs/mpl/preprocessed/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/mpl/preprocessed/include -isystem external/org_boost/libs/msm/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/msm/include -isystem external/org_boost/libs/multi_array/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/multi_array/include -isystem external/org_boost/libs/multi_index/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/multi_index/include -isystem external/org_boost/libs/multiprecision/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/multiprecision/include -isystem external/org_boost/libs/nowide/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/nowide/include -isystem external/org_boost/libs/numeric/conversion/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/numeric/conversion/include -isystem external/org_boost/libs/numeric/interval/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/numeric/interval/include -isystem external/org_boost/libs/numeric/odeint/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/numeric/odeint/include -isystem external/org_boost/libs/numeric/ublas/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/numeric/ublas/include -isystem external/org_boost/libs/optional/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/optional/include -isystem external/org_boost/libs/outcome/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/outcome/include -isystem external/org_boost/libs/parameter/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/parameter/include -isystem external/org_boost/libs/parameter_python/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/parameter_python/include -isystem external/org_boost/libs/pfr/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/pfr/include -isystem external/org_boost/libs/phoenix/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/phoenix/include -isystem external/org_boost/libs/phoenix/test/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/phoenix/test/include -isystem external/org_boost/libs/poly_collection/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/poly_collection/include -isystem external/org_boost/libs/polygon/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/polygon/include -isystem external/org_boost/libs/pool/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/pool/include -isystem external/org_boost/libs/predef/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/predef/include -isystem external/org_boost/libs/preprocessor/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/preprocessor/include -isystem external/org_boost/libs/process/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/process/include -isystem external/org_boost/libs/program_options/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/program_options/include -isystem external/org_boost/libs/property_map/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/property_map/include -isystem external/org_boost/libs/property_tree/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/property_tree/include -isystem external/org_boost/libs/proto/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/proto/include -isystem external/org_boost/libs/ptr_container/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/ptr_container/include -isystem external/org_boost/libs/python/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/python/include -isystem external/org_boost/libs/qvm/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/qvm/include -isystem external/org_boost/libs/random/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/random/include -isystem external/org_boost/libs/range/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/range/include -isystem external/org_boost/libs/ratio/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/ratio/include -isystem external/org_boost/libs/rational/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/rational/include -isystem external/org_boost/libs/regex/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/regex/include -isystem external/org_boost/libs/safe_numerics/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/safe_numerics/include -isystem external/org_boost/libs/scope_exit/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/scope_exit/include -isystem external/org_boost/libs/serialization/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/serialization/include -isystem external/org_boost/libs/signals2/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/signals2/include -isystem external/org_boost/libs/smart_ptr/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/smart_ptr/include -isystem external/org_boost/libs/sort/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/sort/include -isystem external/org_boost/libs/spirit/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/spirit/include -isystem external/org_boost/libs/stacktrace/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/stacktrace/include -isystem external/org_boost/libs/statechart/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/statechart/include -isystem external/org_boost/libs/static_assert/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/static_assert/include -isystem external/org_boost/libs/static_string/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/static_string/include -isystem external/org_boost/libs/stl_interfaces/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/stl_interfaces/include -isystem external/org_boost/libs/system/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/system/include -isystem external/org_boost/libs/test/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/test/include -isystem external/org_boost/libs/thread/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/thread/include -isystem external/org_boost/libs/throw_exception/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/throw_exception/include -isystem external/org_boost/libs/timer/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/timer/include -isystem external/org_boost/libs/tokenizer/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/tokenizer/include -isystem external/org_boost/libs/tti/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/tti/include -isystem external/org_boost/libs/tuple/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/tuple/include -isystem external/org_boost/libs/type_erasure/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/type_erasure/include -isystem external/org_boost/libs/type_index/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/type_index/include -isystem external/org_boost/libs/type_traits/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/type_traits/include -isystem external/org_boost/libs/typeof/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/typeof/include -isystem external/org_boost/libs/units/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/units/include -isystem external/org_boost/libs/unordered/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/unordered/include -isystem external/org_boost/libs/utility/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/utility/include -isystem external/org_boost/libs/uuid/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/uuid/include -isystem external/org_boost/libs/variant/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/variant/include -isystem external/org_boost/libs/variant2/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/variant2/include -isystem external/org_boost/libs/vmd/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/vmd/include -isystem external/org_boost/libs/wave/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/wave/include -isystem external/org_boost/libs/winapi/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/winapi/include -isystem external/org_boost/libs/xpressive/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/xpressive/include -isystem external/org_boost/libs/yap/include -isystem bazel-out/k8-opt/bin/external/org_boost/libs/yap/include -isystem external/org_tensorflow/third_party/eigen3/mkl_include -isystem bazel-out/k8-opt/bin/external/org_tensorflow/third_party/eigen3/mkl_include -isystem external/eigen_archive -isystem bazel-out/k8-opt/bin/external/eigen_archive -isystem external/nsync/public -isystem bazel-out/k8-opt/bin/external/nsync/public -isystem external/double_conversion -isystem bazel-out/k8-opt/bin/external/double_conversion -isystem external/gif -isystem bazel-out/k8-opt/bin/external/gif -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -O3 -Wno-sign-compare -fopenmp -Wno-pass-failed -Wno-overriding-t-option -mavx -msse4.2 '-std=c++14' '--sysroot=/' -c external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc -o bazel-out/k8-opt/bin/external/ydf/yggdrasil_decision_forests/model/random_forest/_objs/random_forest/random_forest.o)
Execution platform: @local_execution_config_platform//:platform
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:16:
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.h:34:
In file included from external/ydf/yggdrasil_decision_forests/model/abstract_model.h:39:
In file included from external/ydf/yggdrasil_decision_forests/model/fast_engine_factory.h:24:
In file included from external/ydf/yggdrasil_decision_forests/serving/fast_engine.h:34:
external/ydf/yggdrasil_decision_forests/serving/example_set.h:976:8: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
if constexpr (format == ExampleFormat::FORMAT_EXAMPLE_MAJOR) {
^
external/ydf/yggdrasil_decision_forests/serving/example_set.h:979:15: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
} else if constexpr (format == ExampleFormat::FORMAT_FEATURE_MAJOR) {
^
external/ydf/yggdrasil_decision_forests/serving/example_set.h:615:8: warning: 'SetBoolean' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
void SetBoolean(const int example_idx, const BooleanFeatureId feature_id,
^
external/ydf/yggdrasil_decision_forests/serving/example_set.h:1034:9: note: in instantiation of template class 'yggdrasil_decision_forests::serving::ExampleSetNumericalOrCategoricalFlat<yggdrasil_decision_forests::serving::EmptyModel, yggdrasil_decision_forests::serving::ExampleFormat::FORMAT_FEATURE_MAJOR>' requested here
const ExampleSet::FeaturesDefinition& features() const {
^
external/ydf/yggdrasil_decision_forests/serving/example_set.h:428:16: note: overridden virtual function is here
virtual void SetBoolean(int example_idx,
^
external/ydf/yggdrasil_decision_forests/serving/example_set.h:1059:3: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(CopyVerticalDatasetToAbstractExampleSet(
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:16:
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.h:34:
In file included from external/ydf/yggdrasil_decision_forests/model/abstract_model.h:39:
In file included from external/ydf/yggdrasil_decision_forests/model/fast_engine_factory.h:24:
In file included from external/ydf/yggdrasil_decision_forests/serving/fast_engine.h:34:
external/ydf/yggdrasil_decision_forests/serving/example_set.h:1100:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
if constexpr (format == ExampleFormat::FORMAT_EXAMPLE_MAJOR) {
^
external/ydf/yggdrasil_decision_forests/serving/example_set.h:1105:13: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
} else if constexpr (format == ExampleFormat::FORMAT_FEATURE_MAJOR) {
^
external/ydf/yggdrasil_decision_forests/serving/example_set.h:1148:7: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(ParseUnstackedFeatureFromTfExample(
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:16:
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.h:34:
In file included from external/ydf/yggdrasil_decision_forests/model/abstract_model.h:39:
In file included from external/ydf/yggdrasil_decision_forests/model/fast_engine_factory.h:24:
In file included from external/ydf/yggdrasil_decision_forests/serving/fast_engine.h:34:
external/ydf/yggdrasil_decision_forests/serving/example_set.h:1156:9: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(ParseBaseFeatureFromTfExample(
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:16:
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.h:36:
In file included from external/ydf/yggdrasil_decision_forests/model/decision_tree/decision_tree.h:38:
external/ydf/yggdrasil_decision_forests/utils/sharded_io.h:139:3: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(ExpandOutputShards(sharded_path, &paths_));
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:16:
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.h:36:
In file included from external/ydf/yggdrasil_decision_forests/model/decision_tree/decision_tree.h:38:
external/ydf/yggdrasil_decision_forests/utils/sharded_io.h:149:5: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(OpenNextShard());
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:16:
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.h:36:
In file included from external/ydf/yggdrasil_decision_forests/model/decision_tree/decision_tree.h:38:
external/ydf/yggdrasil_decision_forests/utils/sharded_io.h:151:3: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(WriteInShard(value));
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:16:
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.h:36:
In file included from external/ydf/yggdrasil_decision_forests/model/decision_tree/decision_tree.h:38:
external/ydf/yggdrasil_decision_forests/utils/sharded_io.h:170:3: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(ExpandInputShards(sharded_path, &paths_));
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:16:
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.h:36:
In file included from external/ydf/yggdrasil_decision_forests/model/decision_tree/decision_tree.h:38:
external/ydf/yggdrasil_decision_forests/utils/sharded_io.h:207:3: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(OpenShard(paths_[cur_path_idx_]));
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:43:
In file included from external/ydf/yggdrasil_decision_forests/model/decision_tree/structure_analysis.h:26:
external/ydf/yggdrasil_decision_forests/utils/histogram.h:88:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
if constexpr (std::numeric_limits<T>::is_integer) {
^
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:49:
external/ydf/yggdrasil_decision_forests/utils/filesystem.h:63:5: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(Close());
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:49:
external/ydf/yggdrasil_decision_forests/utils/filesystem.h:70:7: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(stream_->Close());
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:71:3: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(file::RecursivelyCreateDir(directory, file::Defaults()));
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:82:3: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(decision_tree::SaveTreesToDisk(
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:97:3: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(file::SetBinaryProto(
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:105:3: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(file::GetBinaryProto(
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:107:3: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(decision_tree::LoadTreesFromDisk(
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:126:3: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(AbstractModel::Validate());
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:158:9: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(tree->Validate(data_spec(), validate_classification));
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:163:9: warning: 'if' initialization statements are a C++17 extension [-Wc++17-extensions]
RETURN_IF_ERROR(tree->Validate(data_spec(), validate_regression));
^
external/ydf/yggdrasil_decision_forests/utils/status_macros_default.h:32:7: note: expanded from macro 'RETURN_IF_ERROR'
if (auto _status = expr; ABSL_PREDICT_FALSE(!_status.ok())) { \
^
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:16:
In file included from external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.h:32:
In file included from external/ydf/yggdrasil_decision_forests/dataset/vertical_dataset.h:40:
In file included from external/ydf/yggdrasil_decision_forests/dataset/data_spec.h:35:
external/ydf/yggdrasil_decision_forests/utils/compatibility.h:120:18: error: no matching constructor for initialization of 'std::__1::vector<yggdrasil_decision_forests::model::proto::VariableImportance, std::__1::allocator<yggdrasil_decision_forests::model::proto::VariableImportance>>'
new (&data_) T(std::move(data));
^ ~~~~~~~~~~~~~~~
external/ydf/yggdrasil_decision_forests/model/random_forest/random_forest.cc:442:10: note: in instantiation of function template specialization 'yggdrasil_decision_forests::utils::StatusOr<std::__1::vector<yggdrasil_decision_forests::model::proto::VariableImportance, std::__1::allocator<yggdrasil_decision_forests::model::proto::VariableImportance>>>::StatusOr<const yggdrasil_decision_forests::utils::StatusOr<std::__1::vector<yggdrasil_decision_forests::model::proto::VariableImportance, std::__1::allocator<yggdrasil_decision_forests::model::proto::VariableImportance>>>>' requested here
return general_vi;
^
/usr/include/c++/v1/vector:503:40: note: candidate constructor not viable: no known conversion from 'typename remove_reference<const StatusOr<vector<VariableImportance, allocator<VariableImportance>>> &>::type' (aka 'const yggdrasil_decision_forests::utils::StatusOr<std::__1::vector<yggdrasil_decision_forests::model::proto::VariableImportance, std::__1::allocator<yggdrasil_decision_forests::model::proto::VariableImportance>>>') to 'const std::__1::vector<yggdrasil_decision_forests::model::proto::VariableImportance, std::__1::allocator<yggdrasil_decision_forests::model::proto::VariableImportance>>::allocator_type' (aka 'const std::__1::allocator<yggdrasil_decision_forests::model::proto::VariableImportance>') for 1st argument
_LIBCPP_INLINE_VISIBILITY explicit vector(const allocator_type& __a)
^
/usr/include/c++/v1/vector:515:14: note: candidate constructor not viable: no known conversion from 'typename remove_reference<const StatusOr<vector<VariableImportance, allocator<VariableImportance>>> &>::type' (aka 'const yggdrasil_decision_forests::utils::StatusOr<std::__1::vector<yggdrasil_decision_forests::model::proto::VariableImportance, std::__1::allocator<yggdrasil_decision_forests::model::proto::VariableImportance>>>') to 'std::__1::vector<yggdrasil_decision_forests::model::proto::VariableImportance, std::__1::allocator<yggdrasil_decision_forests::model::proto::VariableImportance>>::size_type' (aka 'unsigned long') for 1st argument
explicit vector(size_type __n);
^
/usr/include/c++/v1/vector:559:5: note: candidate constructor not viable: no known conversion from 'typename remove_reference<const StatusOr<vector<VariableImportance, allocator<VariableImportance>>> &>::type' (aka 'const yggdrasil_decision_forests::utils::StatusOr<std::__1::vector<yggdrasil_decision_forests::model::proto::VariableImportance, std::__1::allocator<yggdrasil_decision_forests::model::proto::VariableImportance>>>') to 'const std::__1::vector<yggdrasil_decision_forests::model::proto::VariableImportance, std::__1::allocator<yggdrasil_decision_forests::model::proto::VariableImportance>>' for 1st argument
vector(const vector& __x);
^
/usr/include/c++/v1/vector:566:5: note: candidate constructor not viable: no known conversion from 'typename remove_reference<const StatusOr<vector<VariableImportance, allocator<VariableImportance>>> &>::type' (aka 'const yggdrasil_decision_forests::utils::StatusOr<std::__1::vector<yggdrasil_decision_forests::model::proto::VariableImportance, std::__1::allocator<yggdrasil_decision_forests::model::proto::VariableImportance>>>') to 'initializer_list<std::__1::vector<yggdrasil_decision_forests::model::proto::VariableImportance, std::__1::allocator<yggdrasil_decision_forests::model::proto::VariableImportance>>::value_type>' (aka 'initializer_list<yggdrasil_decision_forests::model::proto::VariableImportance>') for 1st argument
vector(initializer_list<value_type> __il);
^
/usr/include/c++/v1/vector:572:5: note: candidate constructor not viable: no known conversion from 'typename remove_reference<const StatusOr<vector<VariableImportance, allocator<VariableImportance>>> &>::type' (aka 'const yggdrasil_decision_forests::utils::StatusOr<std::__1::vector<yggdrasil_decision_forests::model::proto::VariableImportance, std::__1::allocator<yggdrasil_decision_forests::model::proto::VariableImportance>>>') to 'std::__1::vector<yggdrasil_decision_forests::model::proto::VariableImportance, std::__1::allocator<yggdrasil_decision_forests::model::proto::VariableImportance>>' for 1st argument
vector(vector&& __x)
^
/usr/include/c++/v1/vector:497:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
^
/usr/include/c++/v1/vector:517:14: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
explicit vector(size_type __n, const allocator_type& __a);
^
/usr/include/c++/v1/vector:519:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
vector(size_type __n, const value_type& __x);
^
/usr/include/c++/v1/vector:522:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
vector(_InputIterator __first,
^
/usr/include/c++/v1/vector:537:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
vector(_ForwardIterator __first,
^
/usr/include/c++/v1/vector:560:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
vector(const vector& __x, const allocator_type& __a);
^
/usr/include/c++/v1/vector:569:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
vector(initializer_list<value_type> __il, const allocator_type& __a);
^
/usr/include/c++/v1/vector:580:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
vector(vector&& __x, const allocator_type& __a);
^
/usr/include/c++/v1/vector:520:5: note: candidate constructor not viable: requires 3 arguments, but 1 was provided
vector(size_type __n, const value_type& __x, const allocator_type& __a);
^
/usr/include/c++/v1/vector:530:9: note: candidate constructor template not viable: requires at least 3 arguments, but 1 was provided
vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
^
/usr/include/c++/v1/vector:544:9: note: candidate constructor template not viable: requires at least 3 arguments, but 1 was provided
vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a,
^
I just came across this issue - @grantstephens I'm not sure if you ever got this working but Tensorflow serving, as of version 2.11.0, natively supports Tensorflow Decision Forests.
@emacski Any chance you fancy making some new Docker images based upon Tensorflow serving 2.11.0 so we can get Decision Forests on M1? :) I am not yet on M1 but have colleagues who need this!