pickle handling in sparse coding