File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ def save(self,filepath):
8888 if archive :
8989 np .savez (filepath ,** archive )
9090 else :
91- pickle .dump (self ,open (filepath ,'w ' ))
91+ pickle .dump (self ,open (filepath ,'wb ' ))
9292
9393 def _create_archive (self ):
9494 """
@@ -119,7 +119,7 @@ def load(filepath):
119119 if isinstance (r ,BaseRecommender ):
120120 model = r
121121 else :
122- model = np .loads (str ( r ['model' ]) )
122+ model = np .loads (r ['model' ])
123123 model ._load_archive (r ) # restore any fields serialized separately
124124 return model
125125
@@ -150,7 +150,7 @@ def read_recommender_description(filepath):
150150 if isinstance (r ,BaseRecommender ):
151151 model = r
152152 else :
153- model = np .loads (str ( r ['model' ]) )
153+ model = np .loads (r ['model' ])
154154 return str (model )
155155
156156 def __str__ (self ):
You can’t perform that action at this time.
0 commit comments