tensorflow / data-validation

Library for exploring and validating machine learning data
Apache License 2.0
758 stars 172 forks source link

Error building data-validation #236

Open ammarck opened 1 year ago

ammarck commented 1 year ago

When I try to build from source (docker and source directly), I get the following error:

external/com_github_tfx_bsl/tfx_bsl/cc/statistics/sql_util.cc: In function 'absl::lts_20210324::StatusOr<bool> tfx_bsl::statistics::EvaluatePredicate(const tensorflow::metadata::v0::FeatureNameStatistics&, const string&)':
external/com_github_tfx_bsl/tfx_bsl/cc/statistics/sql_util.cc:75:32: error: invalid initialization of reference of type 'const absl::lts_20210324::StatusOr<zetasql::Value>&' from expression of type 'zetasql_base::StatusOr<zetasql::Value>'
   return GetResult(expr.Execute(
                    ~~~~~~~~~~~~^
       {{"feature", zetasql::values::Proto(proto_type, feature_statistics)}}));
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
external/com_github_tfx_bsl/tfx_bsl/cc/statistics/sql_util.cc:32:22: note: in passing argument 1 of 'absl::lts_20210324::StatusOr<bool> tfx_bsl::statistics::{anonymous}::GetResult(const absl::lts_20210324::StatusOr<zetasql::Value>&)'
 absl::StatusOr<bool> GetResult(
                      ^~~~~~~~~
external/com_github_tfx_bsl/tfx_bsl/cc/statistics/sql_util.cc: In function 'absl::lts_20210324::StatusOr<bool> tfx_bsl::statistics::EvaluatePredicate(const tensorflow::metadata::v0::FeatureNameStatistics&, const tensorflow::metadata::v0::FeatureNameStatistics&, const string&)':
external/com_github_tfx_bsl/tfx_bsl/cc/statistics/sql_util.cc:104:32: error: invalid initialization of reference of type 'const absl::lts_20210324::StatusOr<zetasql::Value>&' from expression of type 'zetasql_base::StatusOr<zetasql::Value>'
   return GetResult(expr.Execute(
                    ~~~~~~~~~~~~^
       {{"feature_base",
       ~~~~~~~~~~~~~~~~~
         zetasql::values::Proto(proto_type, feature_statistics_base)},
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        {"feature_test",
        ~~~~~~~~~~~~~~~~
         zetasql::values::Proto(proto_type, feature_statistics_test)}}));
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I am running it on my Mac Intel. Does anyone one know what to do?

singhniraj08 commented 1 year ago

@ammarck, Could you please make sure Numpy and Bazel is installed before installing tensorflow data-validation. Thank you!

@caveness, Please have a look into this issue? I tried replicating but got stuck in another issue with Bazel. Thanks!

Screenshot 2023-03-09 at 1 30 11 PM
ammarck commented 1 year ago

@singhniraj08 I think your problem is because of using a newer bazel version. To rectify that problem, you can create a file in root .bazelversion that has 4.x inside to make it work.

ammarck commented 1 year ago

@singhniraj08 Shouldn't that be added in the project?

singhniraj08 commented 1 year ago

@ammarck, Thank you for your suggestions. I will definitely try that out. And answering your questions, Numpy and Bazel are not added in project as needs to be installed as prerequisites for installing data-validation.

Please try installing data-validation with the prerequisites installed as shown here and let us know if you face any issues. Thank you!

ammarck commented 1 year ago

@singhniraj08 I already installed both bazel and Numpy and thats the error I got when I try to build.