apple / tensorflow_macos

TensorFlow for macOS 11.0+ accelerated using Apple's ML Compute framework.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

h5py plugin read (and write?) issue

olafx opened this issue · comments

h5py plugin can read and write models through TensorFlow, but standalone h5py is very broken. Reading data doesn't work.

For example, store an array a.h5/1. h5py.File('a.h5', 'r')['1'][:] fails. Maybe writing doesn't work either, haven't tested.

File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "/Users/olaf/venv/tensorflow/lib/python3.8/site-packages/h5py/_hl/dataset.py", line 573, in __getitem__
    self.id.read(mspace, fspace, arr, mtype, dxpl=self._dxpl)
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5d.pyx", line 182, in h5py.h5d.DatasetID.read
  File "h5py/_proxy.pyx", line 130, in h5py._proxy.dset_rw
  File "h5py/_proxy.pyx", line 84, in h5py._proxy.H5PY_H5Dread
OSError: Can't read data (can't open directory: /usr/local/hdf5/lib/plugin)

The directory /usr/local/hdf5 doesn't exist, even if HDF5 has been installed through official installer or Homebrew. It's related to HDF5_PLUGIN_PATH.