Minor bug in pylearn2/utils/serial.py

20 views
Skip to first unread message

Björn Heinen

unread,
Nov 18, 2015, 11:00:46 AM11/18/15
to pylearn-dev

Hi guys,

 

 

 

In pylearn2/utils/serial.py in the load function (line 29), you have a parameter ‘retry’. The problem is that when the call is delegated to the _load function (line 53), the retry parameter is not actually passed but is always set to true instead.

 

 

 

Another suggestion: I just started using pylearn2 and wanted to try the quick start example (http://deeplearning.net/software/pylearn2/tutorial/index.html#tutorial).

The problem is that my cifar10 batches can’t be loaded by joblib.load (pylearn2/utils/serial.py -> line 520) for some reason. According to the

exponential_backoff() function, though, it still tries this 9 times (with exponential waiting time of course) before it finally uses cPickle.loads().

And this for every batch. Of course, I didn’t want to wait that long so I went into pylearn2/datasets/cifar10.py and set ‘retry=False’ in lines 92+101 where serial.load is actually called. The problem is that the _load function then gives up immediately after the joblib.load fails and doesn’t try cPickle.loads. I actually ended up setting the default recurse_depth to 10 in the load delegation call (line 53) because that was more or less the only

(quick) solution to load the data in an acceptable amount of time… My suggestion would be to make the number of retries parameterizable so that one doesn’t have to wait for 40+ minutes just because it’s actually cPickle that should do the loading and not joblib…

 

 

 

Keep it up!

David Warde-Farley

unread,
Nov 18, 2015, 2:09:37 PM11/18/15
to pylea...@googlegroups.com
The exponential backoff was to deal with flaky network filesystems,
which were unfortunately a fact of life where pylearn2 was developed.

As for joblib not working I expect it has something to do with the
fact that you're (probably) using Python 3, and Python 2 pickle files
need some special encoding fairy dust to be loaded correctly by Python
3, which joblib doesn't provide access to.

Pull requests are welcome but pylearn2 isn't really being actively
developed anymore.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "pylearn-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pylearn-dev...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages