Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
allocbench
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Fischer
allocbench
Commits
05c3559e
Commit
05c3559e
authored
6 years ago
by
Florian Fischer
Browse files
Options
Downloads
Patches
Plain Diff
fix save and load
parent
3d2103cc
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
benchmark.py
+4
-4
4 additions, 4 deletions
benchmark.py
with
4 additions
and
4 deletions
benchmark.py
+
4
−
4
View file @
05c3559e
...
@@ -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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment