Hello, I am currently trying to learn how to use Fuel.
When I run this piece of code :
#! usr/bin/python
from fuel.datasets import MNIST
mnist = MNIST("train")
I get the following error :
Traceback (most recent call last):
File "test_fuel.py", line 5, in <module>
mnist = MNIST("train")
File "/home/francois/.local/lib/python2.7/site-packages/fuel/datasets/mnist.py", line 36, in __init__
super(MNIST, self).__init__(self.data_path, which_set, **kwargs)
File "/home/francois/.local/lib/python2.7/site-packages/fuel/datasets/hdf5.py", line 142, in __init__
if which_set not in self.available_splits:
File "/home/francois/.local/lib/python2.7/site-packages/fuel/datasets/hdf5.py", line 254, in available_splits
return tuple(self.split_dict.keys())
File "/home/francois/.local/lib/python2.7/site-packages/fuel/datasets/hdf5.py", line 237, in split_dict
split_array = handle.attrs['split']
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/tmp/pip_build_francois/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/tmp/pip_build_francois/h5py/h5py/_objects.c:2461)
File "/home/francois/.local/lib/python2.7/site-packages/h5py/_hl/attrs.py", line 52, in __getitem__
attr = h5a.open(self._id, self._e(name))
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/tmp/pip_build_francois/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/tmp/pip_build_francois/h5py/h5py/_objects.c:2461)
File "h5a.pyx", line 77, in h5py.h5a.open (/tmp/pip_build_francois/h5py/h5py/h5a.c:2107)
KeyError: "Can't open attribute (Can't locate attribute: 'split')"
Sorry if this question has already been asked somewhere else, but I couldn't find how to fix it anywhere else on the Internet.
My OS is Ubuntu.
If you need additional infos, do not hesitate.
Thank you.
1 #! usr/bin/python
2
3 import fuel
4 from fuel.datasets import MNIST
5
6 mnist=MNIST("train")
7 fuel-convert mnist
File "test_fuel.py", line 7
fuel-convert mnist
^
SyntaxError: invalid syntax
--
You received this message because you are subscribed to the Google Groups "fuel-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fuel-users+...@googlegroups.com.
To post to this group, send email to fuel-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fuel-users/f4513d17-4d17-493d-a022-71c677295cb3%40googlegroups.com.
fuel-convert is a bash command that you should run in your terminal, not a Python command.First set your FUEL_DATA_PATH (as described here) and then run the commands "cd $FUEL_DATA_PATH" (to go to the data folder) and then "fuel-download mnist" followed by the command "fuel-convert mnist" to download MNIST and convert it into a Fuel-compatible HDF5 format. After doing that, `MNIST("train")` should work in Python.
On Sat, May 16, 2015 at 7:04 PM, François Dupré <franco...@gmail.com> wrote:
When was the last time you generated the HDF5 file with fuel-convert?
I don't think I did.
The interface has changed slightly in the last weeks, try running fuel-convert mnist again to see if it solves your problem.
1 #! usr/bin/python
2
3 import fuel
4 from fuel.datasets import MNIST
5
6 mnist=MNIST("train")
7 fuel-convert mnist
I get this error :
File "test_fuel.py", line 7
fuel-convert mnist
^
SyntaxError: invalid syntax
--
You received this message because you are subscribed to the Google Groups "fuel-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fuel-users+unsubscribe@googlegroups.com.
To post to this group, send email to fuel-...@googlegroups.com.
francois@francois ~ % export FUEL_DATA_PATH=/home/your_data
francois@francois /home % cd $FUEL_DATA_PATH
francois@francois /home/your_data
% fuel-download mnist
zsh: command not found: fuel-download
--
You received this message because you are subscribed to the Google Groups "fuel-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fuel-users+...@googlegroups.com.
To post to this group, send email to fuel-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fuel-users/3e0afd55-9576-44ea-b0cb-6c01e0a6d9f5%40googlegroups.com.
francois@francois ~ % python setup.py install
python: can't open file 'setup.py': [Errno 2] No such file or directory
francois@francois ~ % pip install -e .
Directory '.' is not installable. File 'setup.py' not found.
Storing debug log for failure in /home/francois/.pip/pip.log
--
You received this message because you are subscribed to the Google Groups "fuel-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fuel-users+...@googlegroups.com.
To post to this group, send email to fuel-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fuel-users/e4474a86-2d26-4d4b-b9a2-614ab09ae5fc%40googlegroups.com.
francois@francois ~/blocks % ls
bin CONTRIBUTING.rst examples req-scrutinizer.txt setup.py
blocks dist LICENSE req-travis-conda.txt tests
blocks.egg-info docs README.rst req-travis-pip.txt
build doctests req-rtd.txt requirements.txt
francois@francois ~/blocks % fuel-download mnist
zsh: command not found: fuel-download
francois@francois ~ % python tuto_fuel.py
Traceback (most recent call last):
File "tuto_fuel.py", line 4, in <module>
mnist = MNIST(which_set='train')
File "/usr/local/lib/python2.7/dist-packages/fuel-0.0.1-py2.7.egg/fuel/datasets/mnist.py", line 36, in __init__
super(MNIST, self).__init__(self.data_path, which_set, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/fuel-0.0.1-py2.7.egg/fuel/datasets/hdf5.py", line 142, in __init__
if which_set not in self.available_splits:
File "/usr/local/lib/python2.7/dist-packages/fuel-0.0.1-py2.7.egg/fuel/datasets/hdf5.py", line 254, in available_splits
return tuple(self.split_dict.keys())
File "/usr/local/lib/python2.7/dist-packages/fuel-0.0.1-py2.7.egg/fuel/datasets/hdf5.py", line 235, in split_dict
self._out_of_memory_open()
File "/usr/local/lib/python2.7/dist-packages/fuel-0.0.1-py2.7.egg/fuel/datasets/hdf5.py", line 304, in _out_of_memory_open
name=self.path, mode="r", driver=self.driver)
File "/home/francois/.local/lib/python2.7/site-packages/h5py/_hl/files.py", line 260, in __init__
fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)
File "/home/francois/.local/lib/python2.7/site-packages/h5py/_hl/files.py", line 89, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/tmp/pip_build_francois/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/tmp/pip_build_francois/h5py/h5py/_objects.c:2461)
File "h5f.pyx", line 76, in h5py.h5f.open (/tmp/pip_build_francois/h5py/h5py/h5f.c:1837)
IOError: Unable to open file (Unable to open file: name = 'home/your_data/mnist.hdf5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)
francois@francois ~ % cd /home/your_data
francois@francois /home/your_data
% ls
fuel fuel-master mnist.hdf5
#! usr/bin/python
from fuel.datasets import
MNIST
mnist = MNIST(which_set='train')
Did you set FUEL_DATA_PATH to home/... instead of /home/...?
--
You received this message because you are subscribed to the Google Groups "fuel-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fuel-users+...@googlegroups.com.
To post to this group, send email to fuel-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fuel-users/a3cc378b-8cf0-41aa-a0be-db626d8d15ff%40googlegroups.com.
Did you set FUEL_DATA_PATH to home/... instead of /home/...?
echo "data_path: /home/your_data" >> ~/.fuelrc
francois@francois ~ % python tuto_fuel.py
Traceback (most recent call last):
File "tuto_fuel.py", line 4, in <module>
mnist = MNIST(which_set='train')
File "/usr/local/lib/python2.7/dist-packages/fuel-0.0.1-py2.7.egg/fuel/datasets/mnist.py", line 36, in __init__
super(MNIST, self).__init__(self.data_path, which_set, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/fuel-0.0.1-py2.7.egg/fuel/datasets/hdf5.py", line 142, in __init__
if which_set not in self.available_splits:
File "/usr/local/lib/python2.7/dist-packages/fuel-0.0.1-py2.7.egg/fuel/datasets/hdf5.py", line 254, in available_splits
return tuple(self.split_dict.keys())
File "/usr/local/lib/python2.7/dist-packages/fuel-0.0.1-py2.7.egg/fuel/datasets/hdf5.py", line 237, in split_dict
split_array = handle.attrs['split']
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/tmp/pip_build_francois/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/tmp/pip_build_francois/h5py/h5py/_objects.c:2461)
File "/home/francois/.local/lib/python2.7/site-packages/h5py/_hl/attrs.py", line 52, in __getitem__
attr = h5a.open(self._id, self._e(name))
File "_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/tmp/pip_build_francois/h5py/h5py/_objects.c:2508)
File "_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/tmp/pip_build_francois/h5py/h5py/_objects.c:2461)
--
You received this message because you are subscribed to the Google Groups "fuel-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fuel-users+...@googlegroups.com.
To post to this group, send email to fuel-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fuel-users/656321be-da64-481a-ad23-d347cf7dcc82%40googlegroups.com.