automl icon indicating copy to clipboard operation
automl copied to clipboard

Code removes savedmodel file

Open uysalmustafa opened this issue 6 years ago • 1 comments

Hi, thanks for this great repo. I've modified saved_model_video function. When I run my code I see this error. It says that there is no savedmodel. But problem is, before I run modelinspect.py there is savedmodel. After I run modelinspect.py, something removes savedmodel. I couldn't understand details of Traceback. Why saved model is being removed? What causes that?

Traceback (most recent call last):
  File "model_inspect.py", line 711, in <module>
    tf.app.run(main)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 299, in run
    _run_main(main, args)
  File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "model_inspect.py", line 705, in main
    trace_filename=FLAGS.trace_filename)
  File "model_inspect.py", line 386, in run_model
    self.export_saved_model(**config_dict)
AttributeError: 'ModelInspector' object has no attribute 'export_saved_model'
2020-05-07 11:27:17.671325: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/compat/v2_compat.py:96: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term
2020-05-07 11:27:19.663005: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency: 2300000000 Hz
2020-05-07 11:27:19.663217: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7110000 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-05-07 11:27:19.663247: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2020-05-07 11:27:19.665095: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-05-07 11:27:19.766950: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-05-07 11:27:19.767617: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x71101c0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-05-07 11:27:19.767647: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0
2020-05-07 11:27:19.767828: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-05-07 11:27:19.768422: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties: 
pciBusID: 0000:00:04.0 name: Tesla P100-PCIE-16GB computeCapability: 6.0
coreClock: 1.3285GHz coreCount: 56 deviceMemorySize: 15.90GiB deviceMemoryBandwidth: 681.88GiB/s
2020-05-07 11:27:19.768470: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
2020-05-07 11:27:19.768535: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10
2020-05-07 11:27:19.770032: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10
2020-05-07 11:27:19.770112: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10
2020-05-07 11:27:19.770144: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10
2020-05-07 11:27:19.770769: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10
2020-05-07 11:27:19.770843: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2020-05-07 11:27:19.770947: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-05-07 11:27:19.771531: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-05-07 11:27:19.772025: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1703] Adding visible gpu devices: 0
2020-05-07 11:27:19.772072: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
2020-05-07 11:27:20.274864: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-05-07 11:27:20.274921: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108]      0 
2020-05-07 11:27:20.274938: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1121] 0:   N 
2020-05-07 11:27:20.275174: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-05-07 11:27:20.275783: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-05-07 11:27:20.276309: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.
2020-05-07 11:27:20.276354: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1247] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 14974 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)
Traceback (most recent call last):
  File "model_inspect.py", line 711, in <module>
    tf.app.run(main)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 299, in run
    _run_main(main, args)
  File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "model_inspect.py", line 705, in main
    trace_filename=FLAGS.trace_filename)
  File "model_inspect.py", line 395, in run_model
    kwargs['input_video'], kwargs['output_video'], **config_dict)
  File "model_inspect.py", line 176, in saved_model_video
    driver.load(self.saved_model_dir)
  File "model_inspect.py", line 569, in load
    graph_def.ParseFromString(f.read())
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/lib/io/file_io.py", line 116, in read
    self._preread_check()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/lib/io/file_io.py", line 79, in _preread_check
    self.__name, 1024 * 512)
tensorflow.python.framework.errors_impl.NotFoundError: savedmodel; No such file or directory

uysalmustafa avatar May 07 '20 11:05 uysalmustafa

Your problem should be gone if you check out the latest code.

mingxingtan avatar Jun 08 '20 06:06 mingxingtan