NervanaSystems / he-transformer

nGraph-HE: Deep learning with Homomorphic Encryption (HE) through Intel nGraph
Apache License 2.0
221 stars 39 forks source link

Issue with examples requiring a client/server exchange #243

Closed mlayou closed 5 years ago

mlayou commented 5 years ago

Hi, I was trying to run the examples where a client is needed to carry out some of the non-polynomial computations (e.g., ReLu, etc.). The example that I'm referring to here specifically is the MNIST-MLP (but I've seen the same error with other examples such MNIST-Cryptonets-Relu).

As indicated in the instructions that come with example, I've run the following on the server side.

**source $HE_TRANSFORMER/build/external/venv-tf-py3/bin/activate

NGRAPH_ENABLE_CLIENT=1 \
NGRAPH_ENCRYPT_DATA=1 \
NGRAPH_HE_SEAL_CONFIG=../../test/model/he_seal_ckks_config_N12_L4.json \
NGRAPH_TF_BACKEND=HE_SEAL \
python test.py --batch_size=2048**

Then, I have connected to the same container as indicated below, and run the client side code on it. (hopeful_mendeleev in the command line below is the name of the container where the server is running).

> docker exec -i -t hopeful_mendeleev /bin/bash
> root@21de08d10582:/home# cd /home/he-transformer && source build/external/venv-tf-py3/bin/activate
> (venv-tf-py3) root@21de08d10582:/home/he-transformer# cd examples/
> (venv-tf-py3) root@21de08d10582:/home/he-transformer/examples# python pyclient_mnist.py --batch_size=1024

Below are the server-side and client-side logs, respectively.

Server-side logs

(venv-tf-py3) root@21de08d10582:/home/he-transformer/examples/MNIST-MLP# NGRAPH_ENABLE_CLIENT=1 \
> NGRAPH_ENCRYPT_DATA=1 \
> NGRAPH_HE_SEAL_CONFIG=../../test/model/he_seal_ckks_config_N11_L1.json \
> NGRAPH_TF_BACKEND=HE_SEAL \
> python test.py --batch_size=1024
Successfully downloaded train-images-idx3-ubyte.gz 9912422 bytes.
Extracting /tmp/tensorflow/mnist/input_data/train-images-idx3-ubyte.gz
Successfully downloaded train-labels-idx1-ubyte.gz 28881 bytes.
Extracting /tmp/tensorflow/mnist/input_data/train-labels-idx1-ubyte.gz
Successfully downloaded t10k-images-idx3-ubyte.gz 1648877 bytes.
Extracting /tmp/tensorflow/mnist/input_data/t10k-images-idx3-ubyte.gz
Successfully downloaded t10k-labels-idx1-ubyte.gz 4542 bytes.
Extracting /tmp/tensorflow/mnist/input_data/t10k-labels-idx1-ubyte.gz
2019-07-25 14:09:52.622850: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3497745000 Hz
2019-07-25 14:09:52.623349: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x3e44a40 executing computations on platform Host. Devices:
2019-07-25 14:09:52.623391: I tensorflow/compiler/xla/service/service.cc:158]   StreamExecutor device (0): <undefined>, <undefined>
/
| Encryption parameters :
|   scheme: CKKS
|   poly_modulus_degree: 2048
|   coeff_modulus size: 54 (54) bits
\
[INFO] 2019-07-25T14:09:52z src/seal/he_seal_backend.cpp 86 Scale 2.37266e+07
[INFO] 2019-07-25T14:09:52z src/seal/he_seal_executable.cpp 153 Setting up client in constructor
[INFO] 2019-07-25T14:09:52z src/seal/he_seal_executable.cpp 172 Enable client
[INFO] 2019-07-25T14:09:52z src/seal/he_seal_executable.cpp 176 Starting server
[INFO] 2019-07-25T14:09:52z src/seal/he_seal_executable.cpp 199 Server accepting connections
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_executable.cpp 206 Connection accepted
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_executable.cpp 210 Session started
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_executable.cpp 337 Server set public key
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_executable.cpp 353 Parameter shape 1024x784
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_executable.cpp 357 num_param_elements before batch size divide 802816
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_executable.cpp 360 num_param_elements after batch size divide 784
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_executable.cpp 364 Requesting total of 784 parameter elements
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_executable.cpp 370 Server sending message of type: parameter_size
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_executable.cpp 460 Waiting until m_client_inputs.size() == 1
/
| Encryption parameters :
|   scheme: CKKS
|   poly_modulus_degree: 2048
|   coeff_modulus size: 54 (54) bits
\
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_executable.cpp 251 Loading 784 ciphertexts
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_executable.cpp 262 Done loading 784 ciphertexts
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_executable.cpp 293 Setting m_client_inputs
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_executable.cpp 466 client_inputs_received
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_executable.cpp 474 Encrypting data
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_executable.cpp 477 Batching data with batch size 1024
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_executable.cpp 489 Processing client inputs
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 324  new_scale 3.16913e+29 (97 bits) out of bounds
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 324  new_scale 3.16913e+29 (97 bits) out of bounds
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 324  new_scale 3.16913e+29 (97 bits) out of bounds
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 324  new_scale 3.16913e+29 (97 bits) out of bounds
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 324  new_scale 3.16913e+29 (97 bits) out of bounds
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 324  new_scale 3.16913e+29 (97 bits) out of bounds
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 326  Coeff mod bit count 54
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 324  new_scale 3.16913e+29 (97 bits) out of bounds
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 324  new_scale 3.16913e+29 (97 bits) out of bounds
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 326  Coeff mod bit count 54
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 324  new_scale 3.16913e+29 (97 bits) out of bounds
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 326  Coeff mod bit count 54
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 326  Coeff mod bit count 54
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 326  Coeff mod bit count 54
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 326  Coeff mod bit count 54
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 326  Coeff mod bit count 54
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 326  Coeff mod bit count 54
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 324  new_scale 3.16913e+29 (97 bits) out of bounds
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 324  new_scale 3.16913e+29 (97 bits) out of bounds
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 326  Coeff mod bit count 54
terminate called after throwing an instance of 'ngraph::ngraph_error'
terminate called recursively
terminate called recursively
terminate called recursively
terminate called recursively
terminate called recursively
[INFO] 2019-07-25T14:10:07z src/seal/seal_util.cpp 326  Coeff mod bit count 54
Aborted (core dumped)

Client-side logs

(venv-tf-py3) root@21de08d10582:/home/he-transformer/examples# python pyclient_mnist.py --batch_size=1024
WARNING:tensorflow:From pyclient_mnist.py:14: read_data_sets (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
Instructions for updating:
Please use alternatives such as official/mnist/dataset.py from tensorflow/models.
WARNING:tensorflow:From /home/he-transformer/build/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:260: maybe_download (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.
Instructions for updating:
Please write your own downloading logic.
WARNING:tensorflow:From /home/he-transformer/build/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:262: extract_images (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
Instructions for updating:
Please use tf.data to implement this functionality.
Extracting /tmp/tensorflow/mnist/input_data/train-images-idx3-ubyte.gz
WARNING:tensorflow:From /home/he-transformer/build/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:267: extract_labels (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
Instructions for updating:
Please use tf.data to implement this functionality.
Extracting /tmp/tensorflow/mnist/input_data/train-labels-idx1-ubyte.gz
WARNING:tensorflow:From /home/he-transformer/build/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:110: dense_to_one_hot (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
Instructions for updating:
Please use tf.one_hot on tensors.
Extracting /tmp/tensorflow/mnist/input_data/t10k-images-idx3-ubyte.gz
Extracting /tmp/tensorflow/mnist/input_data/t10k-labels-idx1-ubyte.gz
WARNING:tensorflow:From /home/he-transformer/build/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:290: DataSet.__init__ (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.
Instructions for updating:
Please use alternatives such as official/mnist/dataset.py from tensorflow/models.
Client batch size from FLAG:  1024
complex_scale_factor 1
new_batch_size 1024
[INFO] 2019-07-25T14:10:06z src/tcp/tcp_client.hpp 46   Client starting async connection
[INFO] 2019-07-25T14:10:06z src/tcp/tcp_client.hpp 74   Connected to server
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_client.cpp 180 Loaded encryption parmeters
/
| Encryption parameters :
|   scheme: CKKS
|   poly_modulus_degree: 2048
|   coeff_modulus size: 54 (54) bits
\
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_client.cpp 73  Client scale 2.37266e+07
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_client.cpp 189 Sending public key
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_client.cpp 197 Sending evaluation key
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_client.cpp 91  Parameter size 784
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_client.cpp 92  Client batch size 1024
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_client.cpp 134 Creating execute message
[INFO] 2019-07-25T14:10:06z src/seal/he_seal_client.cpp 137 Sending execute message with 784 ciphertexts
[INFO] 2019-07-25T14:10:07z src/tcp/tcp_client.hpp 99   Client error reading header: End of file
Sleeping until client is done

Any thoughts on the cause of this error?

Thanks.

fboemer commented 5 years ago

In general, setting OMP_NUM_THREADS=1 will produce a more meaningful error message for the ngraph::ngraph_error. I suspect the error might be a mismatch between the batch size on server and client (1024 vs. 2048).

fboemer commented 5 years ago

246 made some updates to the client/server communication. I would recommend updating and seeing if the error persists.

mlayou commented 5 years ago

Thanks! I'm currently testing the updated version. Does the new Makefile persist the build?

I'm asking because on the Makefile uses both the -v volume option as well as the --rm option in most of the targets (e.g., in the build_gcc target it usesdocker run --rm ${VOLUME}). If --rm removes the container immediately after the docker build command completes, is it possible to run a container again mount it the previous volume without the need to rebuild from scratch?

The other shell scripts like make_docker_image.shand build-he-transformer-and-test.sh do also use the --rm option (e.g., docker build --rm=true). I guess the question above applies to them too.

fboemer commented 5 years ago

The new Makefile does not persist the build. Removing the --rm flag may persist the build, but we haven't tested this.

mlayou commented 5 years ago

Thanks for your help with this. I took the updated version, and run the example described at https://github.com/NervanaSystems/he-transformer/tree/master/examples

Following is what I get on the server side, and the client side, respectively. Note how both of them are running on the same container. I made sure to run source $HE_TRANSFORMER/build/external/venv-tf-py3/bin/activate on the container. See below a list of the environment variables on the container.

Server logs

(venv-tf-py3) dockuser@9392d5fb239e:~/he-transformer-test/examples$ NGRAPH_ENABLE_CLIENT=1 NGRAPH_ENCRYPT_DATA=1 NGRAPH_TF_BACKEND=HE_SEAL python ax.py
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
2019-08-07 16:56:35.625511: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3498085000 Hz
2019-08-07 16:56:35.626573: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x3c983b0 executing computations on platform Host. Devices:
2019-08-07 16:56:35.626598: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
2019-08-07 16:56:35.629789: I /home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/src/ngraph_rewrite_pass.cc:247] NGraph using backend: HE_SEAL
[WARN] 2019-08-07T16:56:35z src/seal/he_seal_backend.cpp 59 Parameter selection does not enforce minimum security level
/
| Encryption parameters :
|   scheme: CKKS
|   poly_modulus_degree: 1024
|   coeff_modulus size: 150 (30 + 30 + 30 + 30 + 30) bits
\
[INFO] 2019-08-07T16:56:35z src/seal/he_seal_backend.cpp 87 Scale 1.0737e+09
[INFO] 2019-08-07T16:56:35z src/seal/he_seal_executable.cpp 151 Setting up client in constructor
[INFO] 2019-08-07T16:56:35z src/seal/he_seal_executable.cpp 169 Enable client
[INFO] 2019-08-07T16:56:35z src/seal/he_seal_executable.cpp 173 Starting server
[INFO] 2019-08-07T16:56:35z src/seal/he_seal_executable.cpp 195 Server accepting connections

Client logs

(venv-tf-py3) dockuser@9392d5fb239e:~/he-transformer-test/examples$ python pyclient.py
Traceback (most recent call last):
  File "pyclient.py", line 17, in <module>
    import he_seal_client
ImportError: No module named 'he_seal_client'
(venv-tf-py3) dockuser@9392d5fb239e:~/he-transformer-test/examples$ env
HOSTNAME=9392d5fb239e
TERM=xterm
OLDPWD=/home/dockuser/he-transformer-test
VIRTUAL_ENV=/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3
PATH=/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/home/dockuser/he-transformer-test/examples
PS1=(venv-tf-py3) ${debian_chroot:+($debian_chroot)}\u@\h:\w\$ 
RUN_UID=1004
SHLVL=1
HOME=/home/dockuser
_=/usr/bin/env
(venv-tf-py3) dockuser@9392d5fb239e:~/he-transformer-test/examples$ 
fboemer commented 5 years ago

Currently the docker builds do not build the python wheel. You would need to install this (see here) before running the examples

mlayou commented 5 years ago

Thanks that solves it. The basic client-server example works now.

However, there seems to be another problem while trying the MNIST examples.

For example, here's the error I get when I run the Cryptonets example. There seems to be a problem with the config parser. I get the same error with Cryptonets-Relu as well.

(venv-tf-py3) dockuser@73d8c870f849:~/he-transformer-test/examples/MNIST/Cryptonets$ NGRAPH_ENCRYPT_DATA=1 \
> NGRAPH_HE_SEAL_CONFIG=$HE_TRANSFORMER/configs/he_seal_ckks_config_N13_L7.json \
> NGRAPH_TF_BACKEND=HE_SEAL \
> python test.py --batch_size=4096
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/build_cmake/venv-tf-py3/lib/python3.5/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
2019-08-07 19:03:06.204579: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3498085000 Hz
2019-08-07 19:03:06.205193: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x3aa5580 executing computations on platform Host. Devices:
2019-08-07 19:03:06.205211: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
2019-08-07 19:03:06.214124: I /home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/src/ngraph_rewrite_pass.cc:247] NGraph using backend: HE_SEAL
2019-08-07 19:03:06.214564: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set.  If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU.  To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
2019-08-07 19:03:06.243597: I /home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/src/ngraph_rewrite_pass.cc:247] NGraph using backend: HE_SEAL
2019-08-07 19:03:06.340674: I /home/dockuser/he-transformer-test/BUILD-GCC/ext_ngraph_tf/src/ext_ngraph_tf/src/ngraph_rewrite_pass.cc:247] NGraph using backend: HE_SEAL
terminate called after throwing an instance of 'ngraph::ngraph_error'
  what():  Error parsing NGRAPH_HE_SEAL_CONFIG: [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal
(venv-tf-py3) dockuser@73d8c870f849:~/he-transformer-test/examples/MNIST/Cryptonets$ 
fboemer commented 5 years ago

This error probably means the .json file does not exist at the path indicated. Perhaps $HE_TRANSFORMER is not set?

mlayou commented 5 years ago

You're right. That's the problem. $HE_TRANSFORMER was not set. Thanks Fabian! I really appreciate it.