Skip to content
Snippets Groups Projects
Commit 05c3559e authored by Florian Fischer's avatar Florian Fischer
Browse files

fix save and load

parent 3d2103cc
No related branches found
No related tags found
No related merge requests found
...@@ -2,16 +2,16 @@ import pickle ...@@ -2,16 +2,16 @@ import pickle
class Benchmark (object): class Benchmark (object):
def save(self, path=None, verbose=False): def save(self, path=None, verbose=False):
f = path if path else self.file_name + ".save" f = path if path else self.name + ".save"
if verbose: if verbose:
print("Saving results to:", self.file_name + ".save") print("Saving results to:", self.name + ".save")
with open(f, "wb") as f: with open(f, "wb") as f:
pickle.dump(self.results, f) pickle.dump(self.results, f)
def load(self, path=None, verbose=False): def load(self, path=None, verbose=False):
f = path if path else self.file_name + ".save" f = path if path else self.name + ".save"
if verbose: if verbose:
print("Loading results from:", self.file_name + ".save") print("Loading results from:", self.name + ".save")
with open(f, "rb") as f: with open(f, "rb") as f:
self.results = pickle.load(f) self.results = pickle.load(f)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment