Giter VIP home page Giter VIP logo

Comments (8)

zendevil avatar zendevil commented on August 27, 2024 1

Full Error:

[2019-03-16 22:34:09,690] {__init__.py:51} INFO - Using executor SequentialExecutor DB: sqlite:////home/Prikshet/airflow/airflow.db [2019-03-16 22:34:13,182] {db.py:338} INFO - Creating tables INFO [alembic.runtime.migration] Context impl SQLiteImpl. INFO [alembic.runtime.migration] Will assume non-transactional DDL. WARNI [airflow.utils.log.logging_mixin.LoggingMixin] cryptography not found - values will not be stored encrypted. WARNING: Logging before flag parsing goes to stderr. E0316 22:34:42.615537 140442188777216 models.py:377] Failed to import: /home/Prikshet/airflow/dags/taxi/taxi_pipeline_simple.py Traceback (most recent call last): File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/airflow/models.py", line 374, in process_file m = imp.load_source(mod_name, filepath) File "/home/Prikshet/airflow/dags/taxi/taxi_pipeline_simple.py", line 23, in <module> from tfx.components.evaluator.component import Evaluator File "/mnt/c/Users/Prikshet/Desktop/tfx/tfx/components/evaluator/component.py", line 24, in <module> from tfx.components.evaluator import executor File "/mnt/c/Users/Prikshet/Desktop/tfx/tfx/components/evaluator/executor.py", line 25, in <module> from tfx.proto import evaluator_pb2 ImportError: cannot import name evaluator_pb2 Done.

from tfx.

aaronlelevier avatar aaronlelevier commented on August 27, 2024

Google protobuf is used to generate tfx.proto.evaluator_pb2

Try running python setup.py. You should get:

(taxi_pipeline) aaron@ ~/Documents/github/tfx (object_detection) $ python setup.py 
Generating tfx/proto/evaluator_pb2.py...
protoc is not installed nor found in ../src.  Please compile it or install the binary package.

I followed this blog and installed Google protobuf, now python setup.py works.

airflow initdb worked for me without installing Google protobuf though. Maybe check if you have the pip package protobuf==3.7.0 installed?

from tfx.

zendevil avatar zendevil commented on August 27, 2024

Upon doing
pip install proytobuf==3.7.0, I get the following message:
tensorflow-model-analysis 0.12.1 has requirement protobuf==3.7.0rc2, but you'll have protobuf 3.7.0 which is incompatible. tensorflow-transform 0.12.0 has requirement protobuf==3.7.0rc2, but you'll have protobuf 3.7.0 which is incompatible.
and then upon running airflow initdb I get the following error:

[2019-03-17 17:20:47,393] {__init__.py:51} INFO - Using executor SequentialExecutor DB: sqlite:////home/Prikshet/airflow/airflow.db [2019-03-17 17:20:48,130] {db.py:338} INFO - Creating tables INFO [alembic.runtime.migration] Context impl SQLiteImpl. INFO [alembic.runtime.migration] Will assume non-transactional DDL. WARNI [airflow.utils.log.logging_mixin.LoggingMixin] cryptography not found - values will not be stored encrypted. WARNING: Logging before flag parsing goes to stderr. E0317 17:21:18.438030 139938166474496 timeout.py:41] Process timed out E0317 17:21:18.440391 139938166474496 models.py:377] Failed to import: /home/Prikshet/airflow/dags/taxi/taxi_pipeline_simple.py Traceback (most recent call last): File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/airflow/models.py", line 374, in process_file m = imp.load_source(mod_name, filepath) File "/home/Prikshet/airflow/dags/taxi/taxi_pipeline_simple.py", line 23, in <module> from tfx.components.evaluator.component import Evaluator File "/mnt/c/Users/Prikshet/Desktop/tfx/tfx/components/evaluator/component.py", line 24, in <module> from tfx.components.evaluator import executor File "/mnt/c/Users/Prikshet/Desktop/tfx/tfx/components/evaluator/executor.py", line 22, in <module> import tensorflow_model_analysis as tfma File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow_model_analysis/__init__.py", line 19, in <module> from tensorflow_model_analysis import view File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow_model_analysis/view/__init__.py", line 15, in <module> from tensorflow_model_analysis.view.widget_view import render_plot File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow_model_analysis/view/widget_view.py", line 21, in <module> from tensorflow_model_analysis.api import model_eval_lib File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow_model_analysis/api/model_eval_lib.py", line 31, in <module> from tensorflow_model_analysis import types File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow_model_analysis/types.py", line 24, in <module> from tensorflow_transform.beam import shared File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow_transform/__init__.py", line 19, in <module> from tensorflow_transform.analyzers import * File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow_transform/analyzers.py", line 39, in <module> from tensorflow_transform import tf_utils File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow_transform/tf_utils.py", line 24, in <module> from tensorflow.contrib.proto.python.ops import encode_proto_op File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow/contrib/__init__.py", line 94, in <module> from tensorflow.contrib import tensor_forest File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow/contrib/tensor_forest/__init__.py", line 21, in <module> from tensorflow.contrib.tensor_forest.client import * File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow/contrib/tensor_forest/client/__init__.py", line 22, in <module> from tensorflow.contrib.tensor_forest.client import random_forest File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow/contrib/tensor_forest/client/random_forest.py", line 27, in <module> from tensorflow.contrib.tensor_forest.python import tensor_forest File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow/contrib/tensor_forest/python/__init__.py", line 21, in <module> from tensorflow.contrib.tensor_forest.python import tensor_forest File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow/contrib/tensor_forest/python/tensor_forest.py", line 31, in <module> from tensorflow.contrib.tensor_forest.python.ops import stats_ops File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow/contrib/tensor_forest/python/ops/stats_ops.py", line 20, in <module> from tensorflow.contrib.tensor_forest.python.ops import gen_stats_ops File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow/contrib/tensor_forest/python/ops/gen_stats_ops.py", line 146, in <module> _ops.RegisterShape("FertileStatsDeserialize")(None) File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2515, in __call__ self._op_type) File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/tensorflow/python/framework/registry.py", line 67, in register stack = traceback.extract_stack() File "/usr/lib/python2.7/traceback.py", line 305, in extract_stack linecache.checkcache(filename) File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/linecache.py", line 64, in checkcache stat = os.stat(fullname) File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/airflow/utils/timeout.py", line 42, in handle_timeout raise AirflowTaskTimeout(self.error_message) AirflowTaskTimeout: Timeout Done.

And when I uninstall protobuf==3.7.0, do pip install protobuf==3.7.0rc2 I get the following message:
ml-metadata 0.13.2 has requirement protobuf<4,>=3.7, but you'll have protobuf 3.7.0rc2 which is incompatible. tfx 0.12.0 has requirement protobuf<4,>=3.7, but you'll have protobuf 3.7.0rc2 which is incompatible.

Then when I try airflow initdb, I get the following message:
[2019-03-17 17:24:14,300] {__init__.py:51} INFO - Using executor SequentialExecutor DB: sqlite:////home/Prikshet/airflow/airflow.db [2019-03-17 17:24:15,262] {db.py:338} INFO - Creating tables INFO [alembic.runtime.migration] Context impl SQLiteImpl. INFO [alembic.runtime.migration] Will assume non-transactional DDL. WARNI [airflow.utils.log.logging_mixin.LoggingMixin] cryptography not found - values will not be stored encrypted. WARNING: Logging before flag parsing goes to stderr. E0317 17:24:37.357676 140114491934464 models.py:377] Failed to import: /home/Prikshet/airflow/dags/taxi/taxi_pipeline_simple.py Traceback (most recent call last): File "/mnt/c/Users/Prikshet/Desktop/tfx/taxi_pipeline/lib/python2.7/site-packages/airflow/models.py", line 374, in process_file m = imp.load_source(mod_name, filepath) File "/home/Prikshet/airflow/dags/taxi/taxi_pipeline_simple.py", line 23, in <module> from tfx.components.evaluator.component import Evaluator File "/mnt/c/Users/Prikshet/Desktop/tfx/tfx/components/evaluator/component.py", line 24, in <module> from tfx.components.evaluator import executor File "/mnt/c/Users/Prikshet/Desktop/tfx/tfx/components/evaluator/executor.py", line 25, in <module> from tfx.proto import evaluator_pb2 ImportError: cannot import name evaluator_pb2

from tfx.

aaronlelevier avatar aaronlelevier commented on August 27, 2024

from tfx.

krazyhaas avatar krazyhaas commented on August 27, 2024

+1 to reinstalling. Another option would be to 'pip freeze' and paste the results into here. Maybe we can reverse-engineer the issue from the packages you have installed.

from tfx.

zhitaoli avatar zhitaoli commented on August 27, 2024

Hi @zendevil, you need to install protobuf compiler protoc (https://github.com/protocolbuffers/protobuf#protocol-compiler-installation) to generate the corresponding protobuf files. I believe the protobuf PyPi package only installs python side libraries, but not the compiler part.

You can quickly test whether protoc is available by running which protoc.

cc + @ruoyu90 for the setup issue: we should document that protoc is necessary for installing source.

from tfx.

ruoyu90 avatar ruoyu90 commented on August 27, 2024

+1 to @zhitaoli protobuf compiler is needed as well as the PyPi protobuf package. Maybe we should error out setup if no protoc found, in addition to adding more documentation.

from tfx.

Harshini-Gadige avatar Harshini-Gadige commented on August 27, 2024

Please find this link which has clear steps to install protobuf compiler.

from tfx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.