@@ -114,15 +114,15 @@ def _to_abs_path_set(self, l):
114114
115115 .. sourcecode:: python
116116
117- from graphlab.util import gl_pickle
118- import graphlab as gl
117+ import sframe
118+ from sframe import GLPickle
119119
120120 obj = {'foo': gl.SFrame([1,2,3]),
121121 'bar': gl.SArray([1,2,3]),
122122 'foo-bar': ['foo-and-bar', gl.SFrame()]}
123123
124124 # Setup the GLPickler
125- pickler = gl_pickle. GLPickler(filename = 'foo-bar')
125+ pickler = GLPickler(filename = 'foo-bar')
126126 pickler.dump(obj)
127127
128128 # The pickler has to be closed to make sure the files get closed.
@@ -132,7 +132,7 @@ def _to_abs_path_set(self, l):
132132
133133 .. sourcecode:: python
134134
135- unpickler = gl_pickle. GLUnpickler(filename = 'foo-bar')
135+ unpickler = GLUnpickler(filename = 'foo-bar')
136136 obj = unpickler.load()
137137 unpickler.close()
138138 print obj
@@ -143,14 +143,13 @@ def _to_abs_path_set(self, l):
143143
144144 .. sourcecode:: python
145145
146- unpickler = gl_pickle. GLUnpickler('foo-bar')
146+ unpickler = GLUnpickler('foo-bar')
147147 obj = unpickler.load()
148148 unpickler.close()
149149 print obj
150150
151-
152151 Notes
153- --------
152+ -----
154153
155154 The GLC pickler saves the files into single zip archive with the following
156155 file layout.
@@ -173,8 +172,6 @@ def _to_abs_path_set(self, l):
173172
174173 "gl_archive_dir_N"
175174
176-
177-
178175 """
179176 def __init__ (self , filename , protocol = - 1 , min_bytes_to_save = 0 ):
180177 """
@@ -335,10 +332,6 @@ def __gl_pickle_load__(cls, filename):
335332 ("SGraph", 'sgraph-save-path')
336333 ("Model", 'model-save-path')
337334
338- Note that the key difference between version 1.0 and 2.0 is that 2.0 of
339- GLPickle is that version 2.0 saves the load_sframe method while 1.0
340- saves the string name for the class (which was hard-coded in)
341-
342335 References
343336 ----------
344337 - Python Pickle Docs(https://docs.python.org/2/library/_pickle.html)
0 commit comments