Comments (11)
Hi Jose,
can you tell us more about your build configuration (compiler, OS)? for the supported configurations, everything looks green from our side, but happy to take a closer look.
Also: If it's just this error, it might be easy to fix - can you find out in which file it occurs?
from yggdrasil-decision-forests.
Hi Richard
Thanks for the reply.
OS: Windows 10 Enterprise 64-bit
set BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC (full version: 14.29.30133)
Python 3.10.1
Bazel 5.1.1 (just because that's the one mentioned in the installation page, but I have also tried with 6.0.0)
Running test_bazel.bat as follows:
set BAZEL=bazel-5.1.1-windows-x86_64.exe
set BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC
%BAZEL% version
set TF_SUPPORT=0
IF %TF_SUPPORT%==0 (
copy /Y WORKSPACE_NO_TF WORKSPACE
set FLAGS=--config=windows_cpp17 --config=windows_avx2 --jobs 1
%BAZEL% build %FLAGS% //yggdrasil_decision_forests/cli:all || goto :error
[...]
causes the designated initializers error. The reason I added --jobs 1 is that with default 12 threads there were some timing issues. Previously I managed to build 0.2.3 using the above configuration and package (C++17) with only a few code changes. The error so far has only happened at:
yggdrasil_decision_forests/serving/decision_forest/quick_scorer_extended.cc(890)
I have VS 2022 so I can also use C++20. I have tried alternatively adding C++20 to .bazelrc as in my message above and using instead:
set BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC
set BAZEL_VC_FULL_VERSION=14.30.30705
and:
set FLAGS=--config=windows_cpp20 --config=windows_avx2 --jobs 1
%BAZEL% build %FLAGS% //yggdrasil_decision_forests/cli:all || goto :error
But this causes the consinit error.
Let me know if you need anything else.
from yggdrasil-decision-forests.
Unfortunately, this same error appears in several places. So far I have seen it also at:
yggdrasil_decision_forests/serving/decision_forest/decision_forest.cc(734)
external/com_google_absl/absl/crc/internal/crc_memcpy_x86_64.cc(391, 403, 409, 413)
For the first one (together with the quick_scorer_extended one) I'm making this change:
- change: src.CheckStructure({.global_imputation_is_higher = true});
- to: src.CheckStructure(decision_tree::CheckStructureOptions::GlobalImuptation());
I'm unsure about how to fix the absl one. I'll keep looking into it...
from yggdrasil-decision-forests.
Hi Jose,
Sorry about the hurdle.
It seems some c++20 only features were added to our code base. I'll remove them by the end of the week.
In the meantime, you can enabled c++20 in visual studio by adding the following line to the .bazelrc
file:
build:windows_cpp20 --cxxopt=/std:c++20
and replace the flag --config=windows_cpp17
with --config=windows_cpp20
in your build command line (only adding the flag will do nothing).
Note that only the most recent version of visual studio have support for c++.
Cheers,
Math
from yggdrasil-decision-forests.
Hi Mathieu
Thanks for the reply above.
Unfortunately, I have already tried your suggestion by changing the .bazelrc file and building using:
set BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC
set BAZEL_VC_FULL_VERSION=14.30.30705
set BAZEL=bazel-5.1.1-windows-x86_64.exe
%BAZEL% version
set TF_SUPPORT=0
IF %TF_SUPPORT%==0 (
copy /Y WORKSPACE_NO_TF WORKSPACE
set FLAGS=--config=windows_cpp20 --config=windows_avx2 --jobs 1
%BAZEL% build %FLAGS% //yggdrasil_decision_forests/cli:all || goto :error
[...]
But I get different errors. One of them:
yggdrasil_decision_forests/learner/gradient_boosted_trees/loss/loss_imp_mean_square_error.cc(74): error C2039: 'accumulate': is not a member of 'std'
is easily fixed by adding the correct include in that file. However, there is another one on the protobuf folder which I'm unsure about how to fix:
external/com_google_protobuf/src/google/protobuf/generated_message_util.cc(81): error C2127: 'fixed_address_empty_string_test': illegal initialization of 'constinit' entity with a non-constant expression
The error is probably related to the use of PROTOBUF_CONSTINIT in that file. Have you tried building with C++20 and do you see a similar error? Any ideas? I see people in github.com/protocolbuffers suggesting hacks that I can try...
from yggdrasil-decision-forests.
With a few hacks I managed to build using C++20 - thanks for your replies!
from yggdrasil-decision-forests.
Hi Jose,
That's great to hear! Would you mind sharing the hacks you had to use? Others might be facing the same issues and we can use them to see if we can integrate a C++20 windows build in our list of supported configurations.
from yggdrasil-decision-forests.
Of course...
- ERROR: yggdrasil_decision_forests/learner/gradient_boosted_trees/loss/loss_imp_mean_square_error.cc(74): error C2039: 'accumulate': is not a member of 'std'
=> #include numeric lib - ERROR: external/com_google_protobuf/src/google/protobuf/generated_message_util.cc(81): error C2127: 'fixed_address_empty_string_test': illegal initialization of 'constinit' entity with a non-constant expression
=> at google\protobuf\port_def.inc, change #define PROTOBUF_CONSTINIT constinit to #define PROTOBUF_CONSTINIT (this
definitely is a hack, as the compiler complaint may be correct and we are just hiding it) - At one point some files were not being generated/found by the compiler - this turned out to be an issue with long paths on my machine. I made 2 changes here that make things work:
=> enable long path behavior set the registry key at HKLM\SYSTEM\CurrentControlSet\Control\FileSystem
LongPathsEnabled (Type: REG_DWORD) to true (or 0x00000001)
=> set flag --output_user_root=D:/ in the bazel build call - At one point there were files not generated on time for the compiler to find them - this turned out to be an issue with using 12 threads on my machine and lack of synchronization between tasks. To fix this:
=> add flag --jobs 1 to bazel build call (it's slower but it works)
After these changes building completed successfully.
Hope this helps.
from yggdrasil-decision-forests.
Thank you very much!
from yggdrasil-decision-forests.
Hi Jose,
Thanks for the pointers.
We added them (except for jobs 1)to YDF.
Thanks :).
from yggdrasil-decision-forests.
No problem - glad I could help :)
from yggdrasil-decision-forests.
Related Issues (20)
- may you help to understand how unbalanced data treaded in your code? HOT 4
- in which file you read all data sets from your paper HOT 3
- Documentation for using Go is out of date HOT 1
- Go module buried in this repo prevents the module importing properly HOT 14
- Go module only supports binary classification HOT 1
- Go model serving does not support DISCRETIZED_NUMERICAL HOT 4
- Running quick Scorer Extended Model HOT 2
- Windows Build Fails - Compiling .cc files results in syntax error HOT 2
- Missing whitespace on page /cli_install.html and please use sudo in build_binary_release.sh HOT 5
- Don't pollute my home !! HOT 1
- minor typo on page /intro_df.html HOT 1
- Cannot import ydf from windows vsc HOT 5
- Cannot compile standalone example on macOS HOT 1
- No aarch64 wheel or source distro HOT 2
- rich reports not rendering graphs in vscode HOT 3
- Cannot use 'discretize_numerical_columns' in tuner HOT 1
- Loading big models is slow HOT 9
- On MacOSX, Mac M Hardware (ARM), a segmentation fault happened with YDF when pyarrow is installed HOT 8
- MHLD_OBLIQUE is unknown while mentioned in the documentation HOT 2
- porting an example from tensorflow HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yggdrasil-decision-forests.