Comments (9)
Actually I think its just a problem finding the module. From the root directory try running pip install -e .
and running model_run.py again.
from tf-trusted.
Hey there,
Try running model_run.py
from the root directory. Like:
python tf_trusted_custom_op/model_run.py <args>
from tf-trusted.
Thanks Justin for the prompt reply, unfortunately I still have the same error
python3 tf_trusted_custom_op/model_run.py --model_file ~/inception5h/tensorflow_inception_graph.pb --input_file ~/data_npy/3892.npy --input_name input --output_name output
Traceback (most recent call last):
File "tf_trusted_custom_op/model_run.py", line 7, in
import tf_trusted_custom_op as tft
ModuleNotFoundError: No module named 'tf_trusted_custom_op'
Does it matter if I run it inside the tf_trusted_custom_op container or in the host machine ? I am running it in the host machine
from tf-trusted.
If the host machine is a linux box then there's a good chance that it should still work. I'm not sure this is problem though. I'd give that a try to start though.
from tf-trusted.
so I think since the build completes successfully, but my installed python version cannot see the new custom op, is there a way I should copy this file "model_enclave_op.so" somewhere else so it can be seen by my installed python version. I am not sure how python imports the custom_op
from tf-trusted.
Thanks @justin1121 the custom_op is now installed but I have another issue. When I try to run model_run.py, it gives me the following error
bazel-out/k8-fastbuild/genfiles/external/local_config_tf/include/tensorflow/core/lib/core/refcount.h:90] Check failed: ref_.load() == 0 (1 vs. 0)
My environment is ubuntu 18.04, python 3.6.8, tensorflow 1.13.1
I tried to search for solution, and the proposed workaround here (tensorflow/tensorflow#17316) is to add the flag -DNDEBUG in the compiler_flags of the custom_op, I tried to append this flag to the TF_CFLAGS in tf_trusted_custom_op/configure.sh but It did not work for me ? Please advise if you have faced that error before
from tf-trusted.
I've run into this issue in the past before but its happened to me sporadically and never found a good solution. Seems to me some form of the issue you found would be a good way to solve. I don't think bazel looking at the TF_CFLAGS so I'd try adding it to the BUILD
file https://github.com/dropoutlabs/tf-trusted/blob/master/tf_trusted_custom_op/BUILD#L31. Like:
copts = ["-pthread", "-std=c++11", "-D_GLIBCXX_USE_CXX11_ABI=0", -DNDEBUG]
Let me know if that works. Also if you feel up to it it'd be great if you could submit documentation changes and whatever other changes you end up creating. Thanks!
from tf-trusted.
Hi justin, thanks alot, it works now after I did this modification. What would be the best way to update the documentation with this workaround. Should I submit a change to the README file of the custom_op repo ?
from tf-trusted.
Hey, you can update the BUILD
file directly with the -DNDEBUG
flag like above and then add something to the README.md
about making sure tf_trusted_custom_op is installed before running the model_run.py
script.
from tf-trusted.
Related Issues (20)
- Testing, Linting and Continuous Integration
- Error while building Custom Op
- Error while building and Running Tf-Trusted
- Error while running model HOT 7
- Update to Asylo 0.3.4 once tf 1.13.1 is released HOT 1
- Can't build simulation mode on non-SGX machine HOT 11
- Upgrade to Asylo 0.4.0
- Investigate how to do training HOT 1
- Is there any example provided for testing HOT 4
- TF prediction computation inside the enclave
- Failure to run model inside SGX enclave HOT 3
- Issue in Hardware Mode: ERROR: Unrecognized option: --incompatible_disallow_filetype=false
- Issue in Start Container (linux build) TF Trusted Custom Operation
- "tf_trusted_config_proto" or "tf_trusted_config_proto_cc" as target deps in BUILD file? HOT 1
- Use TF Trusted instead of tf-trusted
- Approach for performing Deep Learning Inference inside Trusted Enclave HOT 8
- Build error for tf-trusted custom op HOT 10
- Investigate how to implement Remote Attestation
- Audit TF Trusted to remove unneeded exits and system calls
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 tf-trusted.